fix(ci): run cold translation when protected-base evidence is missing - #174
Merged
Merged
Conversation
A pull request whose translation, toolchain, and evidence closures are unchanged reused the formal translation evidence of its base commit's successful CI push run, and failed when there was none. That run is often absent: newer merges cancel superseded main runs, and a run can fail in an unrelated job, still be running, or have expired. Every pull request based on such a commit then failed `formal translation` and `CI qualified`, including the one that repairs main. The lookup now records whether it found evidence instead of failing. When it found none, the job runs the same two clean reproductions a cold plan does. Found evidence is still bound by `formal-translation-reuse`, and a binding failure still fails the job. A pull-request reproduction runs in update mode and rewrites drifted generated files in place, so the step that packages that drift now shares the reproduction's condition; otherwise drift found by the fallback would qualify. The formal workflow validator enforces both conditions and that only found evidence is bound, with a test for each and one against the committed workflow. docs/ci/formal-translation-evidence.md documents the selection and the manual recovery (dispatch ci.yml on the branch). The source closure, the assurance-manifest digests (including the stale digests on main that #172 also refreshes), and the semantic freeze are regenerated to match.
# Conflicts: # docs/PROGRAM_BOARD.md # formal/assurance-manifest-v1.toml # formal/qualification/aeneas/source-closure.json # release/semantic-freeze-versions.toml # release/semantic-freeze.json
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
formal translationno longer fails a pull request when the base commit has no protected-base translation evidence. The job runs the same two clean reproductions a cold plan runs. Every digest and binding check is unchanged.Why (a) cold fallback, not (b) broader reuse
8b96f2cafailedformal Lean authoritativeafterformal translationpassed), was cancelled by a newer push (cancel-in-progressonmain), is still running, or its artifact expired. Of the last eightmainpush runs, six were cancelled, one failed, and one is in progress. Under (b), every PR based on the cancelled or in-progress commits would still fail.Changes
.github/workflows/ci.yml, jobformal-translation-run:id: protected-base-translation. It writesfound=falsefirst. It writesfound=trueonly after downloading exactly one evidence file. Every absence ends the step with exit 0 and a summary line naming the reason: no base SHA, no successfulCIpush run onmain, no unexpired artifact, a failed lookup or download, or a malformed artifact.found == 'true'. Its command is unchanged, and a binding failure still fails the job. There is no fallback on mismatch.reused != 'true' && found != 'true', that is, unless a reuse step found evidence.pull_request. In update mode, the reproduction rewrites drifted generated files in place. Without the packaging step, drift found by the fallback would qualify. With it, the update is packaged and "Stop qualification…" fails the job.executed-cold-without-base-evidence.xtask/src/formal_qualification.rs:validate_ci_workflow_gatesnow reads the conditions of the translation job's steps. The bind step must requirefound == 'true'. Reproduction and packaging must share the fallback condition. New tests:ci.yml.docs/ci/formal-translation-evidence.md, covering how evidence is chosen, the fallback, and the manual recovery (dispatchci.ymlon the branch);formal-artifact-regeneration.md;docs/PROGRAM_BOARD.md§4.freezeVersion314.Overlap with #172
mainis red because of stale assurance-manifest digests. This PR can't passformal Lean authoritativewithout refreshing them, so it carries the same refresh. Its manifest diff matches #172's line for line except for the source-closure digest, which differs because this PR changes xtask.Verification
Hosted CI passed on
8110261b. Run 36218032591: all 26 checks pass, includingCI qualified,formal Lean authoritative, andformal evidence.authoritative implementationand passed.formal_closure_changed). That run exercised the new conditions: Locate and Verify were skipped, disk, Nix, Aeneas, reproduction, and packaging ran, the two reproductions were byte-identical, and there was no drift.formal Lean authoritativeproduced no assurance update, so the recomputed manifest digests are exact. The updater made no bot commit.The lookup script, tested against real runs. The fallback only runs for a PR whose closures match its base, which can happen only after this merges. So I ran the step's exact script locally against real
mainruns with a simulatedGITHUB_OUTPUT,GITHUB_ENV, and step summary. For the success case, macOS bash 3.2 has nomapfile, so the local copy replaced that one unchanged line with an equivalent loop; the runners have bash 5.c1dd5517(currentmain)found=false; summary: no successful CI push run on main256e113ffound=false; same reason8b96f2ca(chore(formal): refresh assurance-manifest digests on main #172's base)found=false; same reason8bf2970cfound=true;auths-formal-translation-36056135924-1downloaded, andAUTHS_REUSED_TRANSLATION_EVIDENCEsetfound=false; no base commitLocal runs, used only to build the change:
actionlint: no new findings (its two reports also appear onmain);bash -non the lookup script;cargo fmt;auths-ci-plan formal-source-closure update;cargo xtask semantic-freeze --update.Following the GitHub-first policy, no tests were run locally.
Commit is unsigned. The headless signing agent is not on this host, so re-signing is left to the maintainer.