Skip to content
CAI
Software that uses CAICheck a score

lpgauth/foil

69.4

Adequate · 2 October 2026

337

lines of production code

Erlang

primary language

2

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Foil is a caching system that supports storing and retrieving both literal and non-literal terms, such as maps, PIDs, and ports. It provides a dual-language API, allowing direct interaction from both Erlang and Elixir, and includes utilities for namespace management and safe module execution. The system emphasizes robust error handling and state introspection capabilities.

Features

Elixir shim, namespace enumeration, and non-literal term support

Foil now includes an Elixir shim module (\Foil\) allowing the full API to be called directly from Elixir without extra dependencies. The \foil:namespaces/0\ function has been added to return a list of registered namespaces, simplifying state introspection. Additionally, \foil\_compiler:to\_syntax/1\ now supports maps and non-representable terms (pids, ports, funs, etc.), allowing these values to be cached and returned unchanged. The project also modernized its tooling by migrating CI to GitHub Actions, updating documentation generation to \rebar3\_ex\_doc\, and bumping the \metal\ dependency to 0.1.2.

(repo-wide) · high confidence

Behavioural changes

Elixir API shim and expanded Foil capabilities

Users can now call the Foil API directly from Elixir via the new Elixir.Foil module, which exposes functions like lookup, insert, and all. The core Erlang API gains a new all/1 function to retrieve all keys in a namespace and a namespaces/0 function to list available namespaces. Additionally, the compiler now supports storing and retrieving maps and non-representable terms (such as references, pids, and ports) by smuggling them through integer syntax nodes, and the application version has been bumped to 0.1.7 with added compiler and syntax\_tools dependencies.

src · high confidence

Refine error types and add WITH\_MODULE macro

The \include/foil.hrl\ header now defines a specific \error\_reason()\ type (covering \foil\_not\_started\, \key\_not\_found\, \module\_exists\, and \module\_not\_found\) replacing the generic \atom()\ error type, and introduces a \WITH\_MODULE\ macro for safely looking up and executing code in runtime-compiled modules. Additionally, all generated documentation files in \doc/\ (including \edoc-info\ and module-specific markdown files) have been removed.

bin, doc, include · high confidence

Test coverage

Added tests for error handling, non-literal terms, Elixir shim, and namespaces

Added tests for error handling, non-literal terms, Elixir shim, and namespaces

test · high confidence

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

How this codebase got here

Score

  • CAI 69 → 69 (+0.6)
  • Rubric changed (rubric-2026.09.12 → rubric-2026.09.18) — scores are not directly comparable.

Lenses

  • Code Health 100 → 100 (+0.0)
  • Architecture 69 → 69 (+0.0)
  • Maturity 59 → 59 (+0.0)
  • Readiness 78 → 80 (+2.3)
  • Security 92 → 96 (+4.0)

Resolved (2)

  • Coverage not measured — no coverage collector is wired up
  • Documentation: no licence statement (README.md)

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

Survey your own repository

lpgauth/foil 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 2 October 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit bc734de8ca32fb0d46dd8e41f564754d1501e8c1 — the exact code this score is about.
  • Scored under rubric-2026.09.18 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-e569280dd5e2.