Repository navigation
Closed as not planned
Closed as not planned
Copy link
Description
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_runprints a manual command) - deploy/release/src/lib.rs:587-630 (
release_runexecutes 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.jsonand 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.ymland the release tag. Verify the exact issuer, workflow ref and subject digest. Fix any leftoverralvik/rules_dxidentity. - 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.
Metadata
Metadata
Assignees
Labels
P2Improve and finish existing features
Activity
#1388: Bind candidate BCR source metadata to one archive SHA and veri…
TrapsterDK commentedon Oct 21, 2026
Pre-flight (v1 audit): Tracking only. Split into #1861 and #1862.
[-]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[/+]TrapsterDK commentedon Oct 25, 2026
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:
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.
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.
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.
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.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.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..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.deps: build dx from source in consumers when its asset has no pin (#3746
deps: build dx from source in consumers when its asset has no pin (#3746
TrapsterDK commentedon Oct 28, 2026
Closing: automated triage found this is a duplicate.
Reopen if this is wrong.