fix(artifacts): prevent stale verifier evidence after scan - #331
Merged
Conversation
16 tasks
pengfei-threemoonslab
force-pushed
the
codex/issue-317-artifact-lifecycle
branch
from
August 7, 2026 18:22
8722f35 to
edd916c
Compare
pengfei-threemoonslab
marked this pull request as ready for review
August 7, 2026 21:18
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
verifier.json, handoff, PR comment, run projection, verification inputs, identity artifacts, receipt, and copied authorization before publishing the new reportreport.jsonwhen any stale verifier artifact cannot be removed, with an exact-path structured recovery actionbaseline save's supporting scan in an isolated temporary directory so it cannot clobber the current report or forensic verifier evidencellms-full.txtRoot cause
The original lifecycle set removed the terminal receipt and handoff but retained route-bearing surfaces such as
verifier.json,verify-run.json, andpr-comment.md. That could leave a fresh standalonereport.jsonbeside an older actionable verifier route while deleting the receipt that made the mismatch detectable.Separately,
baseline saveinvokedrun_scanwithout an explicit output directory. Its internal scan therefore used the manifest's normal reports directory, replacingreport.jsonand triggering verifier cleanup even though the command only needed the in-memory report.Impact
A standalone scan now retires all 11 verifier route/identity artifacts before publishing a replacement report. No stale control substrate or downstream feedback route survives beside a newer release decision. If cleanup is denied, the existing report remains untouched and agent mode names the exact file to remove.
baseline savenow writes only the requested baseline/audit outputs; an existing verification receipt, handoff, verifier substrate, run projection, PR comment, inputs, and report remain byte-identical.Validation
test_scan.py,test_init_auto.py,test_cli.py,test_verify_orchestrator.py,test_baseline_integrity.py): 167 passedgit diff --check: passedcontrol.state=complete,merge_verdict=mergeable, release decisionpassed, 0 blockers, 0 review itemsCloses #317