Skip to content

feat(release): release-gated asset + image jobs, port release-notes tool (RIG-2915) - #742

Merged
mattwilkinsonn merged 1 commit into
mainfrom
compass-native/rig-2915-release-gated-jobs
Aug 30, 2026
Merged

feat(release): release-gated asset + image jobs, port release-notes tool (RIG-2915)#742
mattwilkinsonn merged 1 commit into
mainfrom
compass-native/rig-2915-release-gated-jobs

Conversation

@rigel-mintaka

@rigel-mintaka rigel-mintaka commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

This PR is part of a stack containing 2 PRs:

  1. main
  2. "feat(release): release-gated asset + image jobs, port release-notes tool (RIG-2915)" (this PR)
  3. feat(release): version.txt base for bundle, required-image release posture, unified-lane docs (RIG-2916) #743

T3 of the frozen unified-release-lane design
(docs/designs/platform/compass-unified-release-lane.md, §A4/§A5/§A6). Stacks on
T1+T2 (RIG-2914). Appends two release-gated jobs to .github/workflows/release.yml
(append-only: 347 insertions, no existing release-pr/publish-image job touched)
and ports the release-notes generator the closed #711 draft carried.

Both new jobs gate on github.ref == 'refs/heads/main' && needs.release-pr.outputs.releases_created == 'true' — they run only when a merged Release PR actually cut a release, and the main-ref guard rides every release job (§A5(2)) so a feature-branch workflow_dispatch can never mint release artifacts.

release-assets (contents: write only)

Builds the four released binaries at the release sha and attaches them to the Release release-please already created:

  • 3 linux-amd64 daemons/CLI + 1 darwin-arm64 CLI (CGO_ENABLED=0 + -trimpath), version stamped from version.txt via -X main.version (Global Constraint 1: one version string across all binaries and the image tag). Asset names carry the semver tag (compass_vX.Y.Z_linux-amd64, …).
  • SHA256SUMS over the four assets.
  • Runs the ported tools/release-notes generator (--tag the semver) to produce the body appendix + nix-outputs.json manifest.
  • gh release upload --clobber (idempotent on re-run) + appends the appendix below release-please's generated changelog notes via gh release edit --notes-file — never overwrites the changelog, never creates the Release, not --prerelease.

release-image (contents: read + packages: write)

Digest-re-tags the already-published per-push :git-<sha12> image to :vX.Y.Z — never a second build, never touches :latest (§A4, DL-299):

  • Shares the publish-agent-image concurrency group under cancel-in-progress: false + queue: max — a non-superseding release mint serializes behind an in-flight :latest move without being dropped (§A4 no-drop).
  • Registry-anchored resolver (a path-based git log -- <paths> resolver was rejected, §A4:159-164): walks first-parent ancestors of the release sha newest-first, bounded to 50, and takes the first :git-<sha12> that resolves on GHCR — that tag's tree provably contains every closure change at-or-before it. Hard-fails with a workflow_dispatch remediation pointer if none resolves in bound; never rebuilds.
  • skopeo copy the resolved digest manifest to :vX.Y.Z (registry-side write), then verifies config-digest coherence against the source tag (same shape as publish-image's check); hard-fails on mismatch.

tools/release-notes/ (ported verbatim from the closed #711 draft)

The T2 generator (6 files) ported byte-for-byte — assemble() pure core, the import.meta.main edge, and 18 tests unchanged. The semver --tag flows through as an opaque string label (no code change). The nullable-image degradation (IMAGE_ABSENT_LINE) is preserved as-is: flipping it to a required-image failure at release time is T5 (RIG-2916), not T3. bun.lock regenerated for the new @compass/release-notes workspace member.

Refs RIG-1746
Refs RIG-2915
Ledger-impact: none
Co-authored-by: Matt Wilkinson matt@rigel.build

@linear-code

linear-code Bot commented Aug 30, 2026

Copy link
Copy Markdown

RIG-1746

RIG-2915

@github-actions

github-actions Bot commented Aug 30, 2026

Copy link
Copy Markdown

Compass engineering docs preview: https://compass-native-rig-2915-rele.compass-eng-docs.pages.dev

Deployed from compass-native/rig-2915-release-gated-jobs at fda0de1.

@rigel-mintaka
rigel-mintaka marked this pull request as ready for review August 30, 2026 18:03
Base automatically changed from compass-native/rig-2914-unified-release-t1t2 to main August 30, 2026 19:00
…ool (RIG-2915)

T3 of the frozen unified-release-lane design
(docs/designs/platform/compass-unified-release-lane.md, §A4/§A5/§A6). Stacks on
T1+T2 (RIG-2914). Appends two release-gated jobs to `.github/workflows/release.yml`
(append-only: 347 insertions, no existing `release-pr`/`publish-image` job touched)
and ports the release-notes generator the closed #711 draft carried.

Both new jobs gate on `github.ref == 'refs/heads/main' && needs.release-pr.outputs.releases_created == 'true'` — they run only when a merged Release PR actually cut a release, and the main-ref guard rides every release job (§A5(2)) so a feature-branch `workflow_dispatch` can never mint release artifacts.

### `release-assets` (`contents: write` only)

Builds the four released binaries at the release sha and attaches them to the Release release-please already created:

- 3 linux-amd64 daemons/CLI + 1 darwin-arm64 CLI (`CGO_ENABLED=0` + `-trimpath`), version stamped from `version.txt` via `-X main.version` (Global Constraint 1: one version string across all binaries and the image tag). Asset names carry the semver tag (`compass_vX.Y.Z_linux-amd64`, …).
- `SHA256SUMS` over the four assets.
- Runs the ported `tools/release-notes` generator (`--tag` the semver) to produce the body appendix + `nix-outputs.json` manifest.
- `gh release upload --clobber` (idempotent on re-run) + **appends** the appendix below release-please's generated changelog notes via `gh release edit --notes-file` — never overwrites the changelog, never creates the Release, not `--prerelease`.

### `release-image` (`contents: read` + `packages: write`)

Digest-re-tags the already-published per-push `:git-<sha12>` image to `:vX.Y.Z` — never a second build, never touches `:latest` (§A4, DL-299):

- Shares the `publish-agent-image` concurrency group under `cancel-in-progress: false` + `queue: max` — a non-superseding release mint serializes behind an in-flight `:latest` move without being dropped (§A4 no-drop).
- Registry-anchored resolver (a path-based `git log -- <paths>` resolver was rejected, §A4:159-164): walks first-parent ancestors of the release sha newest-first, bounded to 50, and takes the first `:git-<sha12>` that resolves on GHCR — that tag's tree provably contains every closure change at-or-before it. Hard-fails with a `workflow_dispatch` remediation pointer if none resolves in bound; never rebuilds.
- `skopeo copy` the resolved digest manifest to `:vX.Y.Z` (registry-side write), then verifies config-digest coherence against the source tag (same shape as `publish-image`'s check); hard-fails on mismatch.

### `tools/release-notes/` (ported verbatim from the closed #711 draft)

The T2 generator (6 files) ported byte-for-byte — `assemble()` pure core, the `import.meta.main` edge, and 18 tests unchanged. The semver `--tag` flows through as an opaque string label (no code change). The nullable-image degradation (`IMAGE_ABSENT_LINE`) is preserved as-is: flipping it to a required-image failure at release time is T5 (RIG-2916), not T3. `bun.lock` regenerated for the new `@compass/release-notes` workspace member.

Refs RIG-1746
Refs RIG-2915
Ledger-impact: none
Co-authored-by: Matt Wilkinson <matt@rigel.build>
@rigel-mintaka
rigel-mintaka force-pushed the compass-native/rig-2915-release-gated-jobs branch from 8a53400 to fda0de1 Compare August 30, 2026 19:04
@mattwilkinsonn
mattwilkinsonn merged commit 7188de6 into main Aug 30, 2026
16 checks passed
@mattwilkinsonn
mattwilkinsonn deleted the compass-native/rig-2915-release-gated-jobs branch August 30, 2026 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants