Repository navigation
Add candidate, integrate and promote commands for generated cases (operator audits step 5, slice 6) - #4557
Open
evanchooly wants to merge 1 commit into
Open
Add candidate, integrate and promote commands for generated cases (operator audits step 5, slice 6)#4557evanchooly wants to merge 1 commit into
evanchooly wants to merge 1 commit into
Conversation
A candidate regenerates the operator-case namespace outside the checkout and records its base and every file's hash. Integration runs the owning tests in a temporary worktree under both mappers and writes an attestation; promotion applies an attested candidate only to a checkout that still matches its base, atomically.
This branch has not been deployed
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.
Step 5, slice 6 of the operator audits (design). Stacked on #4556.
Problem
Regenerated files have reached the tree through ad hoc steps:
convert,rescenarioand hand-run regeneration scripts. Nothing checked that a regeneration still passes before it lands, or that the checkout it lands in is the one it was generated from. The design calls for one guarded path instead:Changes
candidateregenerates every ledger scenario and the manifest into an output directory, never the checkout.candidate.jsonrecords:integratestages the candidate in a temporary worktree at its base, builds core, and runs the tests owning its cases under Critter, then reflection. It writes an attestation bound to the candidate's digest and always removes the worktree.promoteapplies an attested candidate. It refuses:Everything is applied together, and every original is restored on any failure.
Tests:
CandidatesTesthas 5 cases covering determinism, agreement with the committed tree, promotion, each refusal, rollback, and integration with a fake runner.End-to-end run
I ran all three commands on this branch's checkout. The candidate matched the committed tree, integration passed 442 tests under each mapper in a temporary worktree, and promotion applied with no change to any tracked file. That run found a bug the unit tests missed: the attestation's computed
passedproperty was written to JSON and couldn't be read back. It's now a function, and the test round-trips an attestation.Review note
The independent local reviewer is at its weekly limit until Nov 26, and Codex and Copilot are out of quota, so I reviewed this myself.