Files
ai-kit/test
CatoandClaude Opus 5 c51d33b817 feat: resolveChain — a probe on a DB-configured chain must not read a frozen one (#37)
Found wiring the probe into evig, whose provider list lives in a
database: an admin screen with enabled/default rows and per-provider
keys. A chain fixed at construction is a chain frozen at process start,
so the probe would keep reporting on a configuration the operator
changed twenty minutes ago — the exact opposite of "the truth about
right now", which is the module's whole reason to exist.

resolveChain() is called only when a probe actually runs, never on a
cache hit, so a monitor polling the route does not also poll the
database. That second property is the one worth writing down: it is what
keeps the safety guarantee (a cached success costs nothing) true for an
app whose chain is not free to compute.

Both verified by mutation: ignoring resolveChain turns exactly those two
tests red.


Claude-Session: https://claude.ai/code/session_01NHDLTKGirKU7He8q2YR2y4

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-09-06 15:49:48 -07:00
..