Skip to content

release: qualify the Bzlmod source archive and bind tag, candidate and signatures #1388

Closed as not planned

Description

@TrapsterDK

Problem
The release code checks metadata for fixture bytes, not for a real consumable source archive. The remote tag check does not compare the tag's commit with the candidate SHA. The release and BCR steps only print what a human should do. No real signed candidate has been downloaded and verified.

Where

  • deploy/release/src/lib.rs:218-296 (candidate metadata; the test uses arbitrary candidate bytes)
  • deploy/release/src/lib.rs:299-327 (tag parsing; takes no expected commit)
  • deploy/release/src/bin_release_driver.rs:68-96 (git ls-remote --tags origin refs/tags/<tag>, direct ref only)
  • deploy/release/src/lib.rs:372-410 (bcr_run prints a manual command)
  • deploy/release/src/lib.rs:587-630 (release_run executes no release step)
  • deploy/release/src/bin_bcr_source_gen.rs, deploy/release/src/publish.rs
  • .github/workflows/release.yml

Fix

  • Build a real source archive for a prerelease candidate SHA and version with the existing packaging. Keep the real MODULE dependencies, loads, patches and strip prefix. Generate source.json and integrity from those exact bytes.
  • Consume that archive from a local candidate registry in an independent Bzlmod workspace with a renamed repository mapping. Run real build, test and quality commands. No local_path_override, no stub MODULE.
  • Resolve the tag on the remote and peel annotated tags. Compare the peeled commit with the candidate SHA. A wrong commit, wrong remote, ambiguous or malformed output, a failed Git command or an unreadable status fails closed.
  • One candidate identity covers module version, URL, strip prefix, integrity, repository, ref, commit, native assets, and signature and provenance subjects.
  • Keep read-only candidate validation apart from the publish jobs. Report each step as validated, executed, failed or partial, or not run. A printed instruction never counts as an executed step.
  • Never overwrite a released version. Reject a mismatched existing asset or subject. A repeat run checks the existing identity.
  • Signing uses GitHub Actions OIDC and Sigstore keyless identity, limited to devhusdk/rules_dx, .github/workflows/release.yml and the release tag. Verify the exact issuer, workflow ref and subject digest. Fix any leftover ralvik/rules_dx identity.
  • Publish targets: GitHub Releases for signed assets, the Bazel Central Registry for the module, the Pages site for docs, and the existing GHCR path for images.
  • Native asset facts come from release: build and qualify the five native archives with their own metadata #1386.

Done when

  • The candidate source archive builds and runs in the local-registry consumer.
  • Wrong version, wrong strip prefix, wrong integrity, dropped archive members, a stale SHA, an annotated tag pointing elsewhere, no Git, and an untrusted signed subject each fail at the right step. Tests use a local Git remote with lightweight and annotated tags.
  • Local and check paths cause no remote effect.
  • A real signed prerelease candidate is downloaded and verified against the allowed identity.
  • A failed or interrupted publish leaves immutable assets untouched and the repeat run reports the true state.

Activity

  1. added a commit that references this issue on Oct 12, 2026
  2. added this to the v1.0.0 milestone on Oct 20, 2026
  3. added
    tracking
    on Oct 21, 2026
  4. TrapsterDK commented on Oct 21, 2026

    @TrapsterDK
    CollaboratorAuthor

    Pre-flight (v1 audit): Tracking only. Split into #1861 and #1862.

  5. changed the title [-]Qualify real candidate Bzlmod source distribution and release publication verification without demo evidence[/-] [+]release: qualify the Bzlmod source archive and bind tag, candidate and signatures[/+] on Oct 24, 2026
  6. added
    P2
    and removed
    tracking
    on Oct 24, 2026
  7. TrapsterDK commented on Oct 25, 2026

    @TrapsterDK
    CollaboratorAuthor

    Plan (agent):

    I'm not planning any code for #1388. The v1 audit comment overrides the issue body and says: "Tracking only. Split into #1861 and #1862." Both child issues are open on GitHub. No issue-1388, issue-1861 or issue-1862 branches exist on origin. The earlier partial fix 0f43f40 (#1630) is already on main. It binds the BCR source metadata to one archive SHA and verifies the remote tag SHA. Workers should not start a branch for #1388. Plan and implement #1861 first (local candidate archive, peeled-tag identity, local-registry consumer). Then do #1862, which says "Needs #1861". Close #1388 once both are closed. The ralvik/rules_dx identity named in #1861 is already gone from deploy/ and .github/ on origin/main, so drop that item from the #1861 plan.

    Options weighed:

    1. Treat release: qualify the Bzlmod source archive and bind tag, candidate and signatures #1388 as tracking only and route the work to Verify a local candidate Bzlmod source archive and its tag identity #1861 and Qualify remote release publication of a verified candidate #1862 (chosen). This follows the pre-flight comment and avoids duplicate PRs.

    2. Implement the full release: qualify the Bzlmod source archive and bind tag, candidate and signatures #1388 body here (rejected). It would duplicate both children, collide with their branches, and mix read-only validation with publish work, which the split exists to keep apart.

    3. Ship only the Verify a local candidate Bzlmod source archive and its tag identity #1861 slice under release: qualify the Bzlmod source archive and bind tag, candidate and signatures #1388's number (rejected). It hides progress from the issue that owns the work and leaves Verify a local candidate Bzlmod source archive and its tag identity #1861 open with nothing on it.

    4. deploy/release/src/bin_release_driver.rs:105: No change under release: qualify the Bzlmod source archive and bind tag, candidate and signatures #1388. Under Verify a local candidate Bzlmod source archive and its tag identity #1861: ls_remote_output looks up the direct ref only and returns Option, which drops Git errors. Its caller at :130 prints 'verified' without comparing against the candidate SHA. Change it to resolve the peeled commit, return a Result, and compare with the candidate SHA.

    5. deploy/release/src/lib.rs:299: No change under release: qualify the Bzlmod source archive and bind tag, candidate and signatures #1388. Under Verify a local candidate Bzlmod source archive and its tag identity #1861: parse_ls_remote_tag should take the expected ref and SHA and return a typed error for missing, ambiguous, malformed or mismatched output instead of an Option. Replace the fixture 'candidate bytes' test near :1331 with a real archive.

    6. deploy/release/src/lib.rs:629: No change under release: qualify the Bzlmod source archive and bind tag, candidate and signatures #1388. Under Qualify remote release publication of a verified candidate #1862: release_run and bcr_run (:371) only print manual commands. Change them to report each step as validated, executed, failed or partial, or not authorized, and keep them separate from validation.

    7. .github/workflows/release.yml:1: No change under release: qualify the Bzlmod source archive and bind tag, candidate and signatures #1388. Under Qualify remote release publication of a verified candidate #1862: signing, upload, GitHub release and BCR jobs, with the existing pinned cosign and the devhusdk/rules_dx identity constraints.

    Tests: None under #1388, since nothing in its scope changes. The #1861 planner should pick the targets. Likely ones are the rust_test targets under //deploy/release (lib.rs unit tests filtered by --test_arg=ls_remote and --test_arg=candidate, plus verify_test.rs) and a new local bare-remote test for the peeled tag. Check the exact names against deploy/release/BUILD.bazel. Leave the local-registry consumer test, which needs nested Bazel, to #1861's later slice.

    Ship first: No worker runs under #1388. If the workflow must make progress, run a fresh Explore map and planner on #1861 (it is the dependency). Its first slice is: make the tag check in bin_release_driver.rs take the candidate SHA, run git ls-remote origin refs/tags/<tag> refs/tags/<tag>^{}, peel annotated tags, and fail closed on a missing, ambiguous or malformed answer, a failed Git command, or a SHA mismatch. Test it against a temporary local bare Git remote with one lightweight and one annotated tag. The archive build, the local-registry consumer and #1862 come after.

  8. TrapsterDK commented on Oct 28, 2026

    @TrapsterDK
    CollaboratorAuthor

    Closing: automated triage found this is a duplicate.

    Recommendation: do not implement #1388 directly. Work the children in order. #1861 first: make the tag check take the candidate SHA, run git ls-remote with refs/tags/ and refs/tags/^{} patterns, peel annotated tags, and fail closed on missing, ambiguous or malformed out

    Reopen if this is wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions