fix(evidence): parse bundle revision from bundle check - #804
Merged
Conversation
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr> (cherry picked from commit 92293f86144e49bf7d8c62470324a6bed86a10ef)
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.
evidencectl buildhas been unable to complete since v0.21.0. It reads thebundle revision out of the sibling
evidence bundle-checkstdout, but itstrips the wrong prefix:
bundle-checkprintswhile the parser looks for
Evidence deployment, which is the deploymentcheck line (
registry-evidence/src/main.rs:198). The prefix can never match,so every real run ends at:
Why it survived three releases
The tests encoded the bug. The unit test fed the parser the deployment
format, and the integration stub at
tests/production_build.rs:975is a shellscript that printed the deployment format too. Nothing in the suite ever put
the real
evidencebinary on this path.The change
build.rs: stripEvidence bundleinstead ofEvidence deployment.tests/production_build.rs: the stub now prints whatbundle-checkactually prints.
build.rsunit test: asserts the new format parses, and adds a negativecase asserting a well-formed deployment line is now rejected, so the two
formats cannot be confused again.
tests/production_handoff.rs: addsproduction_build_accepts_the_real_bundle_check_revision, an#[ignore]dexact gate that drives the real
evidencebinary end to end. A stub cannotsatisfy it.
Verification
The new exact gate was also run with
build.rsreverted to the old prefix andeverything else unchanged: it fails with
evidencectl: Evidence check returned no bundle revision, the exact user-facing error. The gate catches theregression it was written for.
Release context
This does not block the v0.24.0 candidate pipeline, which compiles and
packages
evidencectlbut never runsevidencectl build. It is being landedahead of the tag so v0.24.0 is not the fourth consecutive release shipping a
broken primary command; downstream tooling that drives
evidencectl buildisblocked on it today.
Cherry-picked in isolation from
codex/fix-evidence-build-revision-parser(
92293f861). None of the other 7 commits on that branch are included.