chore(release): move post-cut orchestration behind rt #879

Merged
pullings merged 2 commits from i/862-release-orchestration-boundary into main 2026-08-25 20:13:53 +02:00
Owner

Summary

Moves the stateful cut bookkeeping out of .forgejo/workflows/reusable-release.yml into the hidden, typed and tested rt post-cut boundary.

The workflow retains decision wiring, runner/action setup, rt release, mode selection, and secret injection. Go now owns the manifest transaction, toolkit-self bake reset, dynamic wrapper re-pin, alpha/gamma push handoff, stale rolling cleanup, and RC-tag pruning.

Inventory and disposition

Measured from exact base e287752a256efb71951747a1b5f9dd04323ff40c with an existence-aware PyYAML parse:

  • tracker census: 331 non-comment shell lines
  • measured census: 332 non-comment shell lines; the one-line discrepancy is recorded in ADR-0009 rather than omitted
  • resolve toolkit ref: 12, retained workflow glue
  • install dependencies: 19, retained runner/package glue
  • bootstrap rt: 23, retained FETCH/BUILD, action path, and credential glue
  • verify rt on PATH: 3, retained environment contract
  • configure git identity: 3, retained checkout setup
  • run rt decide: 11, retained output wiring
  • act on decision: 224, 160 moved to rt post-cut, 64 retained for case/release/preflight/refusal wiring
  • manifest post-condition: 37, retained as a separate fail-closed workflow step

After the change, reusable-release.yml has 372 non-empty run: lines and 172 non-comment run: lines. The full workflow population is 949 non-empty run: lines across 16 files.

Preserved contracts

  • unreadable remote idempotency precheck proceeds; it cannot silently skip
  • malformed existing manifest refuses before mutation
  • alpha writes manifest first, pushes with a scoped 0600 config, then verifies the destination branch records the triggering SHA
  • gamma preserves self-bookkeeping-first, --force-with-lease, configured identity, and fatal base/PR creation failures
  • toolkit-self gating and @main floating-pin skip remain explicit
  • token values stay out of argv and are scoped to one git operation
  • the separate manifest post-condition remains trivalent and runs after an idempotent skip

Verification

  • go test ./... — pass
  • go vet ./... — pass
  • bats tests/*.bats — 59/59 pass
  • shellcheck scripts/*.sh docker-entrypoint.sh — pass
  • YAML census — 16 files / 949 non-empty run lines / 372 in reusable-release / 172 non-comment in reusable-release
  • TestPostCutSelfBookkeepingScopesAndRepins — external consumer untouched, toolkit-self reset/re-pin, floating @main untouched
  • TestWritePostCutManifestRefusesMalformedExistingFile — no mutation on schema refusal
  • TestRelease_dryRunPublishesOutputs and existing release transaction tests — pass

No live release/tag was fired from this branch. #876 was not touched. Refs #862.

## Summary Moves the stateful cut bookkeeping out of `.forgejo/workflows/reusable-release.yml` into the hidden, typed and tested `rt post-cut` boundary. The workflow retains decision wiring, runner/action setup, `rt release`, mode selection, and secret injection. Go now owns the manifest transaction, toolkit-self bake reset, dynamic wrapper re-pin, alpha/gamma push handoff, stale rolling cleanup, and RC-tag pruning. ## Inventory and disposition Measured from exact base `e287752a256efb71951747a1b5f9dd04323ff40c` with an existence-aware PyYAML parse: - tracker census: 331 non-comment shell lines - measured census: 332 non-comment shell lines; the one-line discrepancy is recorded in ADR-0009 rather than omitted - resolve toolkit ref: 12, retained workflow glue - install dependencies: 19, retained runner/package glue - bootstrap `rt`: 23, retained FETCH/BUILD, action path, and credential glue - verify `rt` on PATH: 3, retained environment contract - configure git identity: 3, retained checkout setup - run `rt decide`: 11, retained output wiring - act on decision: 224, 160 moved to `rt post-cut`, 64 retained for case/release/preflight/refusal wiring - manifest post-condition: 37, retained as a separate fail-closed workflow step After the change, `reusable-release.yml` has 372 non-empty `run:` lines and 172 non-comment `run:` lines. The full workflow population is 949 non-empty `run:` lines across 16 files. ## Preserved contracts - unreadable remote idempotency precheck proceeds; it cannot silently skip - malformed existing manifest refuses before mutation - alpha writes manifest first, pushes with a scoped 0600 config, then verifies the destination branch records the triggering SHA - gamma preserves self-bookkeeping-first, `--force-with-lease`, configured identity, and fatal base/PR creation failures - toolkit-self gating and `@main` floating-pin skip remain explicit - token values stay out of argv and are scoped to one git operation - the separate manifest post-condition remains trivalent and runs after an idempotent skip ## Verification - `go test ./...` — pass - `go vet ./...` — pass - `bats tests/*.bats` — 59/59 pass - `shellcheck scripts/*.sh docker-entrypoint.sh` — pass - YAML census — 16 files / 949 non-empty run lines / 372 in reusable-release / 172 non-comment in reusable-release - `TestPostCutSelfBookkeepingScopesAndRepins` — external consumer untouched, toolkit-self reset/re-pin, floating `@main` untouched - `TestWritePostCutManifestRefusesMalformedExistingFile` — no mutation on schema refusal - `TestRelease_dryRunPublishesOutputs` and existing release transaction tests — pass No live release/tag was fired from this branch. `#876` was not touched. Refs #862.
chore(release): move post-cut orchestration behind rt
Some checks failed
check-self-bootstrap / check (pull_request) Successful in 4s
fragment-check / toolkit-self gate (PR's own rt) (pull_request) Successful in 4s
fragment-check / changelog fragment-kind (pull_request) Successful in 6s
fragment-check / check (pull_request) Successful in 0s
go-ci / lint + build + test (pull_request) Failing after 9s
manifest-check / manifest-vs-tag consistency (pull_request) Successful in 6s
manifest-check / check (pull_request) Successful in 0s
register-check / register-drift check (pull_request) Successful in 6s
register-check / check (pull_request) Successful in 0s
tests / workflow-schema (pull_request) Successful in 3s
tests / bats (pull_request) Successful in 7s
tests / shellcheck (pull_request) Successful in 2s
c24e631771
Inventory and disposition the reusable release shell boundary, preserve fail-closed manifest and credential contracts, and document the resulting workflow denominator. Refs #862.
lookout left a comment

Reviewed exact head c24e631771fc4f35d493c56caf016aceb2838942 (parent e287752a256efb71951747a1b5f9dd04323ff40c). REQUEST_CHANGES: the required go-ci / lint + build + test context is failing on this head, and I reproduced the failure locally with the exact workflow command.

Blocking lint findings:

  1. cmd/rt/post_cut.go:232 ignores the returned error from runPruneRCTags(...). The surrounding comment says cleanup is best-effort, but the ignored return still fails errcheck; make that intentional (_ = runPruneRCTags(...)) or otherwise handle it explicitly.
  2. internal/prep/git.go:352 fails staticcheck QF1012: f.WriteString(fmt.Sprintf(...)). Use fmt.Fprintf(f, ...) (with the returned error checked) or an equivalent form.

Independent results at this exact head:

  • golangci-lint run --timeout=5m: rc=1, exactly the two diagnostics above.
  • go test ./...: rc=0.
  • go vet ./...: rc=0.
  • go build ./...: rc=0.
  • bats tests/*.bats: 59/59 pass.
  • shellcheck scripts/*.sh docker-entrypoint.sh: rc=0.

The request is only for these lint blockers; the rest of the local suite is green. Please push a new head and I will re-read the exact head.

Reviewed exact head `c24e631771fc4f35d493c56caf016aceb2838942` (parent `e287752a256efb71951747a1b5f9dd04323ff40c`). REQUEST_CHANGES: the required `go-ci / lint + build + test` context is failing on this head, and I reproduced the failure locally with the exact workflow command. Blocking lint findings: 1. `cmd/rt/post_cut.go:232` ignores the returned error from `runPruneRCTags(...)`. The surrounding comment says cleanup is best-effort, but the ignored return still fails `errcheck`; make that intentional (`_ = runPruneRCTags(...)`) or otherwise handle it explicitly. 2. `internal/prep/git.go:352` fails staticcheck QF1012: `f.WriteString(fmt.Sprintf(...))`. Use `fmt.Fprintf(f, ...)` (with the returned error checked) or an equivalent form. Independent results at this exact head: - `golangci-lint run --timeout=5m`: rc=1, exactly the two diagnostics above. - `go test ./...`: rc=0. - `go vet ./...`: rc=0. - `go build ./...`: rc=0. - `bats tests/*.bats`: 59/59 pass. - `shellcheck scripts/*.sh docker-entrypoint.sh`: rc=0. The request is only for these lint blockers; the rest of the local suite is green. Please push a new head and I will re-read the exact head.
lookout left a comment

Reviewed exact head c24e631771fc4f35d493c56caf016aceb2838942 (parent e287752a256efb71951747a1b5f9dd04323ff40c). REQUEST_CHANGES: the required go-ci / lint + build + test context is failing on this head, and I reproduced the failure locally with the exact workflow command.

Blocking lint findings:

  1. cmd/rt/post_cut.go:232 ignores the returned error from runPruneRCTags(...). The surrounding comment says cleanup is best-effort, but the ignored return still fails errcheck; make that intentional (_ = runPruneRCTags(...)) or otherwise handle it explicitly.
  2. internal/prep/git.go:352 fails staticcheck QF1012: f.WriteString(fmt.Sprintf(...)). Use fmt.Fprintf(f, ...) (with the returned error checked) or an equivalent form.

Independent results at this exact head:

  • golangci-lint run --timeout=5m: rc=1, exactly the two diagnostics above.
  • go test ./...: rc=0.
  • go vet ./...: rc=0.
  • go build ./...: rc=0.
  • bats tests/*.bats: 59/59 pass.
  • shellcheck scripts/*.sh docker-entrypoint.sh: rc=0.

The request is only for these lint blockers; the rest of the local suite is green. Please push a new head and I will re-read the exact head.

Reviewed exact head `c24e631771fc4f35d493c56caf016aceb2838942` (parent `e287752a256efb71951747a1b5f9dd04323ff40c`). REQUEST_CHANGES: the required `go-ci / lint + build + test` context is failing on this head, and I reproduced the failure locally with the exact workflow command. Blocking lint findings: 1. `cmd/rt/post_cut.go:232` ignores the returned error from `runPruneRCTags(...)`. The surrounding comment says cleanup is best-effort, but the ignored return still fails `errcheck`; make that intentional (`_ = runPruneRCTags(...)`) or otherwise handle it explicitly. 2. `internal/prep/git.go:352` fails staticcheck QF1012: `f.WriteString(fmt.Sprintf(...))`. Use `fmt.Fprintf(f, ...)` (with the returned error checked) or an equivalent form. Independent results at this exact head: - `golangci-lint run --timeout=5m`: rc=1, exactly the two diagnostics above. - `go test ./...`: rc=0. - `go vet ./...`: rc=0. - `go build ./...`: rc=0. - `bats tests/*.bats`: 59/59 pass. - `shellcheck scripts/*.sh docker-entrypoint.sh`: rc=0. The request is only for these lint blockers; the rest of the local suite is green. Please push a new head and I will re-read the exact head.
fix(release): satisfy post-cut lint contracts
All checks were successful
check-self-bootstrap / check (pull_request) Successful in 4s
fragment-check / toolkit-self gate (PR's own rt) (pull_request) Successful in 4s
fragment-check / changelog fragment-kind (pull_request) Successful in 9s
fragment-check / check (pull_request) Successful in 0s
go-ci / lint + build + test (pull_request) Successful in 24s
manifest-check / manifest-vs-tag consistency (pull_request) Successful in 6s
manifest-check / check (pull_request) Successful in 0s
register-check / register-drift check (pull_request) Successful in 6s
register-check / check (pull_request) Successful in 0s
tests / workflow-schema (pull_request) Successful in 3s
tests / bats (pull_request) Successful in 7s
tests / shellcheck (pull_request) Successful in 2s
check-self-bootstrap / check (push) Successful in 4s
go-ci / lint + build + test (push) Successful in 23s
release / decide + act (push) Successful in 7s
release / release (push) Successful in 0s
tests / workflow-schema (push) Successful in 3s
tests / bats (push) Successful in 7s
tests / shellcheck (push) Successful in 2s
5eb13949b3
lookout approved these changes 2026-08-25 20:09:46 +02:00
lookout left a comment

Follow-up review of exact head 5eb13949b3672f81795d4ac8da05dd7e02ef797d (base e287752a256efb71951747a1b5f9dd04323ff40c, correction parent c24e631771fc4f35d493c56caf016aceb2838942). APPROVED — the two blocking lint findings from review 5594 are fixed and I found no remaining blockers.

Verified:

  • The correction diff is limited to the two requested fixes: intentional discard of best-effort runPruneRCTags's return and fmt.Fprintf with its write error checked.
  • golangci-lint run --timeout=5m: rc=0, 0 issues.
  • go test ./..., go vet ./..., and go build ./...: rc=0.
  • bats tests/*.bats: 59/59 pass.
  • shellcheck scripts/*.sh docker-entrypoint.sh: rc=0.
  • git diff --check: clean.
  • Forgejo's exact-head status is terminal success with all 12 contexts successful.

The prior REQUEST_CHANGES row is stale on this head; this approval is bound to 5eb13949b3672f81795d4ac8da05dd7e02ef797d.

Follow-up review of exact head `5eb13949b3672f81795d4ac8da05dd7e02ef797d` (base `e287752a256efb71951747a1b5f9dd04323ff40c`, correction parent `c24e631771fc4f35d493c56caf016aceb2838942`). APPROVED — the two blocking lint findings from review 5594 are fixed and I found no remaining blockers. Verified: - The correction diff is limited to the two requested fixes: intentional discard of best-effort `runPruneRCTags`'s return and `fmt.Fprintf` with its write error checked. - `golangci-lint run --timeout=5m`: rc=0, 0 issues. - `go test ./...`, `go vet ./...`, and `go build ./...`: rc=0. - `bats tests/*.bats`: 59/59 pass. - `shellcheck scripts/*.sh docker-entrypoint.sh`: rc=0. - `git diff --check`: clean. - Forgejo's exact-head status is terminal success with all 12 contexts successful. The prior REQUEST_CHANGES row is stale on this head; this approval is bound to `5eb13949b3672f81795d4ac8da05dd7e02ef797d`.
lookout approved these changes 2026-08-25 20:09:46 +02:00
lookout left a comment

Follow-up review of exact head 5eb13949b3672f81795d4ac8da05dd7e02ef797d (base e287752a256efb71951747a1b5f9dd04323ff40c, correction parent c24e631771fc4f35d493c56caf016aceb2838942). APPROVED — the two blocking lint findings from review 5594 are fixed and I found no remaining blockers.

Verified:

  • The correction diff is limited to the two requested fixes: intentional discard of best-effort runPruneRCTags's return and fmt.Fprintf with its write error checked.
  • golangci-lint run --timeout=5m: rc=0, 0 issues.
  • go test ./..., go vet ./..., and go build ./...: rc=0.
  • bats tests/*.bats: 59/59 pass.
  • shellcheck scripts/*.sh docker-entrypoint.sh: rc=0.
  • git diff --check: clean.
  • Forgejo's exact-head status is terminal success with all 12 contexts successful.

The prior REQUEST_CHANGES row is stale on this head; this approval is bound to 5eb13949b3672f81795d4ac8da05dd7e02ef797d.

Follow-up review of exact head `5eb13949b3672f81795d4ac8da05dd7e02ef797d` (base `e287752a256efb71951747a1b5f9dd04323ff40c`, correction parent `c24e631771fc4f35d493c56caf016aceb2838942`). APPROVED — the two blocking lint findings from review 5594 are fixed and I found no remaining blockers. Verified: - The correction diff is limited to the two requested fixes: intentional discard of best-effort `runPruneRCTags`'s return and `fmt.Fprintf` with its write error checked. - `golangci-lint run --timeout=5m`: rc=0, 0 issues. - `go test ./...`, `go vet ./...`, and `go build ./...`: rc=0. - `bats tests/*.bats`: 59/59 pass. - `shellcheck scripts/*.sh docker-entrypoint.sh`: rc=0. - `git diff --check`: clean. - Forgejo's exact-head status is terminal success with all 12 contexts successful. The prior REQUEST_CHANGES row is stale on this head; this approval is bound to `5eb13949b3672f81795d4ac8da05dd7e02ef797d`.
Sign in to join this conversation.
No description provided.