Skip to content
CAI
Software that uses CAICheck a score

edgurgel/mimic

71.4

Strong · 15 November 2026

2k

lines of production code

Elixir

primary language

5

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Behavioural changes

Major API overhaul and documentation rewrite for Mimic

The library has been significantly refactored to improve usability and performance, introducing a new \\_\using\\_\ macro that automatically imports Mimic functions and sets up verification callbacks. The public API has changed: \stub/3\ now validates that the function is exported by the original module rather than just checking if the module is mocked, and a new \stub/1\ variant allows stubbing all public functions in a module. Documentation has been expanded to explain multi-process collaboration via explicit allows and global mode, and internal architecture has shifted to use a Coordinator and Server alias for better structure.

lib · high confidence

Mimic 2.4.2: Fixes global mode race condition and enforces test-process usage

This release addresses a race condition in global mode where asynchronous release of the global lock could cause subsequent tests to fail with 'Expect cannot be called by the current process'. To prevent this, \set\_mimic\_global/1\ now raises if called outside a test process, ensuring the mode is properly managed via \on\_exit\ callbacks. Additionally, a memory leak caused by an incorrect ETS select clause has been fixed, and ExDoc markdown documentation support has been enabled.

(repo-wide) · high confidence

Mimic refactors internal architecture for performance and coverage accuracy

Mimic splits its internal state management into a Coordinator and partitioned Servers to improve concurrency and reduce serialization bottlenecks. The library now introduces a DSL module for more natural stub and expectation syntax, adds experimental type checking for stubs using the Ham library, and significantly improves coverage data handling by preserving and rewriting coverdata when modules are replaced. Additionally, it adds support for struct default values and enforce\_keys in mocked modules, and introduces a new API to retrieve call history.

lib/mimic · high confidence

Removal of legacy Mix.Config module

The project has removed the \config/config.exs\ file, which previously utilized the \Mix.Config\ module. This change eliminates the legacy configuration loading mechanism, likely as part of a migration to a newer configuration system or to clean up unused build-time configuration files.

config · high confidence

Test coverage

Added test support modules for cover analysis and stubbing scenarios; Expanded test coverage for DSL, type checking, and global mode lifecycle.

Dependencies

Mimic 2.4.2: Major dependency upgrades and Elixir 1.16 support

This release updates the Mimic library to version 2.4.2, raising the minimum supported Elixir version to \~\> 1.16. It significantly upgrades development dependencies, moving ex\_doc from 0.18.4 to 0.40.3 and introducing credo (\~\> 1.0) and ham (\~\> 0.3). The application configuration now includes the :tools application and uses a dedicated Application module, while documentation generation is enhanced with markdown formatters and updated metadata.

(dependencies) · high confidence

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 71 → 71 (-0.1)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.4) — scores are not directly comparable.

Lenses

  • Code Health 98 → 98 (-0.3)
  • Architecture 100 → 100 (+0.0)
  • Maturity 58 → 58 (+0.0)
  • Readiness 69 → 69 (+0.0)
  • Security 99 → 98 (-0.3)

Resolved (3)

  • Duplicated block (6 lines × 2) (lib/mimic/server.ex)
  • Off-boarding risk: anonymized user #1
  • Repeated repair: lib/mimic/server.ex (lib/mimic/server.ex)

New (2)

  • Edited copy of a member (10 corresponding lines) (lib/mimic/coordinator.ex)
  • Off-boarding risk: anonymized user #1

Changes since last survey

  • 2 commits — 2 feature/other, 0 fixes

By area

  • (root) — 1 commit
  • lib/mimic — 1 commit

Notable commits

  • change: chore: bump version and update CHANGELOG.md
  • change: perf: make stub/1 and stub_with/2 cheap in large apps (#131)

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

edgurgel/mimic was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 15 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 31e34d209854a3f7e084a7ecfa7b6f8253588e0f — the exact code this score is about.
  • Scored under rubric-2026.11.4 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.65+preprod-3c33c1882dc1.