[fix] A changed agent artifact now evicts the warm session - #6398
Conversation
…hanges The agent-mount artifact id signs the mount, sets its env var, and lands in the prompt guidance, all baked at acquire. Yet it sat in no fingerprint and no facet, so a changed or newly present id reused the warm sandbox built for the OLD agent (cold/warm audit finding 4, measured with a probe). The id now rides the sandbox facet and the config fingerprint; the rest of runContext stays out, pinned by a volatile-fields test. Claude-Session: https://claude.ai/code/session_0165tsjmvf3qvTPFcb9EV44g
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Cold/warm audit finding 4 (docs/design/lifecycle-cold-warm-audit).
What was wrong
The agent-mount artifact id is baked at acquire: it signs the mount, sets the mount env var, and lands in the prompt guidance. But it sat in no fingerprint and no facet. A run that switched to a different agent artifact, or gained one, reused the warm sandbox that was built for the old agent. A probe measured the reuse.
The fix
runContext.workflow.artifact.idnow rides thesandboxfacet and the config fingerprint. A change rebuilds; everything else inrunContextstays volatile.How to verify
Run
pnpm exec vitest run tests/unit/lifecycle-desired-state.test.ts tests/unit/session-pool.test.tsinservices/runner.Part of the audit-findings stack; base is #6374.
https://claude.ai/code/session_0165tsjmvf3qvTPFcb9EV44g