Context
PR 3 of the CorpusBackend arc (#65) wired corpus_backend into AtomicAgent and the bundle rendering path with the IRON RULE 5-assertion regression suite at tests/test_corpus_migration_regression.py. The v1.0 IRON RULE tests cover the 166 direct-construction sites for byte-identity. They do not cover the cascade-layout path, where corpus_backend._agent_root may diverge from the instance_root used by bundle.py during rendering. This gap means cascade-with-corpus usage is untested and undocumented.
Evidence
atomic_agents/bundle.py -- bundle rendering references instance_root for path resolution. corpus_backend._agent_root is set at construction time, which in cascade layout may point to a different path than the bundle's instance_root. The IRON RULE tests do not include a cascade fixture. Surfaced as A7 in PR 3 Round 1 adversarial review (cascade-layout corpus_backend._agent_root divergence; deferred to PR 4 backlog).
Proposed fix
Add a cascade-layout fixture to the IRON RULE test suite. Confirm whether corpus_backend._agent_root and instance_root must agree in cascade layout, and document the contract in docs/deployment/programmatic.md under a "Cascade layout and CorpusBackend" callout. If divergence is intentional (per-agent scoping mirroring the existing PersonaBackend cascade discipline), document the operator expectation explicitly so cascade operators know which path drives bundle rendering.
Acceptance criteria
- At least one test covers cascade-layout
AtomicAgent construction with a corpus_backend whose _agent_root differs from the cascade instance_root.
docs/deployment/programmatic.md documents the expected behavior for cascade-with-corpus.
uv run pytest -q passes with zero regressions.
Source
PR 3 of #65 (PR #304), Round 1 adversarial finding A7.
Context
PR 3 of the CorpusBackend arc (#65) wired
corpus_backendintoAtomicAgentand the bundle rendering path with the IRON RULE 5-assertion regression suite attests/test_corpus_migration_regression.py. The v1.0 IRON RULE tests cover the 166 direct-construction sites for byte-identity. They do not cover the cascade-layout path, wherecorpus_backend._agent_rootmay diverge from theinstance_rootused bybundle.pyduring rendering. This gap means cascade-with-corpus usage is untested and undocumented.Evidence
atomic_agents/bundle.py-- bundle rendering referencesinstance_rootfor path resolution.corpus_backend._agent_rootis set at construction time, which in cascade layout may point to a different path than the bundle'sinstance_root. The IRON RULE tests do not include a cascade fixture. Surfaced as A7 in PR 3 Round 1 adversarial review (cascade-layoutcorpus_backend._agent_rootdivergence; deferred to PR 4 backlog).Proposed fix
Add a cascade-layout fixture to the IRON RULE test suite. Confirm whether
corpus_backend._agent_rootandinstance_rootmust agree in cascade layout, and document the contract indocs/deployment/programmatic.mdunder a "Cascade layout and CorpusBackend" callout. If divergence is intentional (per-agent scoping mirroring the existing PersonaBackend cascade discipline), document the operator expectation explicitly so cascade operators know which path drives bundle rendering.Acceptance criteria
AtomicAgentconstruction with acorpus_backendwhose_agent_rootdiffers from the cascadeinstance_root.docs/deployment/programmatic.mddocuments the expected behavior for cascade-with-corpus.uv run pytest -qpasses with zero regressions.Source
PR 3 of #65 (PR #304), Round 1 adversarial finding A7.