Repository navigation
tests: R02/R04 acceptance witnesses; disclose five promotion/evidence gaps (P2) - #111
Merged
Merged
Conversation
R02: single-pair RepeatedPaired refusal, cache_mode/timing_admissible unknown, flaky check outcomes, baseline environment drift across pairs. R04: tie/regressing candidate promotion refusal, zero-completed and invalid comparability lifecycle, superseded evidence, tampered envelope refusal, no rollout decisions on export, failed import withholds complete row, bundle warnings label scores uncalibrated. Tests only; no product code changed.
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
RecursiveIntell
added a commit
that referenced
this pull request
Dec 1, 2026
…e-20261130 forge-engine: gate promotion on retained executions (R02/R04 gaps from #111)
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.
What this does
Adds executable test witnesses for acceptance clauses of work packages R02 (truthful experimental modes, repeat/comparability) and R04 (honest exported evidence and score interpretation) that a read-only acceptance map found had no test. Tests only; no product code.
New test files:
living-memory/living-memory/tests/r02_witness_tests.rs,r02_env_drift_witness_tests.rs,r04_witness_tests.rs, andforge-pilot/tests/r04_witness_tests.rs.Clauses now asserted:
RepeatedPairedwithtrial_count == 1is refused before any dispatch; a baseline environment/provenance fingerprint that drifts across executed pairs is not comparable (with a no-drift control); check outcomes that vary across pairs give an inconclusive violation andFlakySignal; real runs recordcache_mode == Unknownandtiming_admissible == false.weighted_improvementwith no promotion appended (with a +0.10 control); trials present but none completed derive lifecycleUnverified; invalidpair_comparabilityderives lifecycleUnverified; a tampered canonical evidence bundle is refused attransform_envelope_v3with a digest error; a newer contradicted bundle blocks promotion despite an older clean one; the evidence export and transform outputs exercised here contain no rollout/rollback decisions, including for a promoted bundle; a failed import leaves no complete import row and records exactly one failure receipt (with a healthy control); bundle warnings label scores as unavailable / not calibrated confidence, and that label reaches the canonical verification notes.Gaps found (not fixed here)
Five clauses are not met by current product code or contract policy. Their honest tests fail on unmodified
main(c64e9c9), reproduced by a second run on unmodifiedmain. The gap tests are not in this PR. They are deliberately left out of this PR rather than weakened:completed_trial_count == 3(expected 1). Location:living-memory/src/lab/evidence.rsto_canonical_evidence_bundle.promote()reads only the assessment (enforce_verification_evidence). Location:living-memory/src/lab/promote.rsenforce_verification_evidence.PromotionState::Eligibleinderived_promotion_state, while the lifecycle value for the same input isUnverified, so the two disagree. Location:evidence.rsderived_promotion_state. (The gap test stops at this assertion, so whetherpromote()then succeeds was not observed.)Verifiedand promotable; receipt references are not resolved against the store (two failing assertions). Locations:evidence.rslifecycle derivation,promote.rs.promote()has no freshness check. The acceptance contract as written specifies no TTL, so this is a policy gap as much as a code gap; the supersession reading of "stale" is covered above.Note the split: in (2) the lifecycle value is
Unverifiedbutpromote()does not consult it and still succeeds; in (3) the lifecycle value isUnverifiedwhilederived_promotion_statereturnsEligible, a second inconsistency distinct from the gate.Evidence
On head
2698593(rebased ontomainc64e9c9; the witness diff is byte-identical before and after the rebase):cargo fmt --all -- --checkandcargo clippy --locked -p forge-engine -p forge-pilot --lib --tests -- -D warnings: clean.cargo test --locked -p forge-engine -p forge-pilot --lib --tests: 353 passed, 0 failed, 0 ignored.These are local runs on one host; hosted CI results will be reported by this PR's own checks.
Scope and limits