Context
ADR-0019 §4 (B4, safety-critical) calls for a fail-build lint flagging aiConfig.<path> = … runtime assignments in tests — the #12335 orphan-bleed class (a test mutating shared config to point at its own DB → live-DB bleed, ~1,281 orphans). The B4 lint is unshipped (#12451 shipped only the A4 inline-process.env guard via PR #12472).
Scoped per the #12435 decomposition: start with Class A (DB-path mutations — the safety-critical subset), grandfather the current offenders, escape-marker for genuine new exceptions. The broad any aiConfig.<path> = lint + Class B (config-varying) are deferred pending the override-mechanism design question (see the decomposition).
The Fix
buildScripts/util/check-aiconfig-test-mutation.mjs — flags (aiConfig | Memory_Config.data).{storagePaths | engines.chroma.database | collections | logPath} = … assignments in test/** (code only — not comments/strings, mirroring check-ticket-archaeology.mjs), with a file-level allowlist of the current Class-A offenders + an aiconfig-mutation-ok: <reason> escape marker. Wired into lint-staged.
Acceptance Criteria
Out of Scope
- Migrating the current Class-A offenders to by-construction isolation (#12435).
- Class B config-varying mutations + the broad
any aiConfig.<path> = lint (deferred pending the override-mechanism design — see #12435 decomposition).
Related
- Parent: #12435 (B4 migration). Epic: #12456. Authority: ADR-0019 §4 (
learn/agentos/decisions/0019-aiconfig-reactive-provider-ssot.md).
Release classification: post-release (test-infra hygiene; not v13.x-blocking).
Origin Session ID: 0f5d9f1d-0683-452d-aac1-f467297186ac
Authored by Claude Opus 4.8 (Claude Code), @neo-opus-grace (Grace).
Context
ADR-0019 §4 (B4, safety-critical) calls for a fail-build lint flagging
aiConfig.<path> = …runtime assignments in tests — the #12335 orphan-bleed class (a test mutating shared config to point at its own DB → live-DB bleed, ~1,281 orphans). The B4 lint is unshipped (#12451 shipped only the A4 inline-process.envguard via PR #12472).Scoped per the #12435 decomposition: start with Class A (DB-path mutations — the safety-critical subset), grandfather the current offenders, escape-marker for genuine new exceptions. The broad
any aiConfig.<path> =lint + Class B (config-varying) are deferred pending the override-mechanism design question (see the decomposition).The Fix
buildScripts/util/check-aiconfig-test-mutation.mjs— flags(aiConfig | Memory_Config.data).{storagePaths | engines.chroma.database | collections | logPath} = …assignments intest/**(code only — not comments/strings, mirroringcheck-ticket-archaeology.mjs), with a file-level allowlist of the current Class-A offenders + anaiconfig-mutation-ok: <reason>escape marker. Wired intolint-staged.Acceptance Criteria
test/**file (exit 1).==/===/const x = aiConfig.y) do NOT trip it.lint-stagedfor test files.Out of Scope
any aiConfig.<path> =lint (deferred pending the override-mechanism design — see #12435 decomposition).Related
learn/agentos/decisions/0019-aiconfig-reactive-provider-ssot.md).Release classification: post-release (test-infra hygiene; not v13.x-blocking).
Origin Session ID: 0f5d9f1d-0683-452d-aac1-f467297186ac
Authored by Claude Opus 4.8 (Claude Code), @neo-opus-grace (Grace).