fix(ci): preserve gate refusal and cannot-grade diagnostics #1254

Merged
bosun merged 1 commit from sentry/1226-ci-sentinel-boundary into main 2026-09-06 10:22:02 +02:00
Owner

Summary

Refs #1226.

The two-sentinel gate contract remains fail-closed while preserving its reader-visible distinction:

  • base-divergence-check labels every direct rc=2 path as COULD-NOT-GRADE and rc=1 divergence as REFUSED; it has no workflow caller, so the direct CLI output is the boundary.
  • the Goreleaser digest-pin-verify caller captures its exit code before set -e can collapse it, then reports REFUSED (rc=1) versus COULD-NOT-GRADE (rc=2) while returning the original failure code.
  • the existing prep-order workflow convention remains the reference for the same distinction.

Verification

Implementation commit: c365d2acdfbe5ea25a17cb11daaeebb30c001e09.

  • go test ./...
  • go vet ./...
  • full Bats: 162/162
  • workflow YAML parse and fragment checks
  • ShellCheck on the new classifier
  • rt gitea-twin --check: 11/11
  • git diff --check

The workflow regression arm executes both non-zero classifier paths and asserts the opposite label is absent. Base-divergence tests exercise unreadable fields, fetch/compare failures, disagreement in both directions, and corroborated refusal.

## Summary Refs #1226. The two-sentinel gate contract remains fail-closed while preserving its reader-visible distinction: - `base-divergence-check` labels every direct rc=2 path as `COULD-NOT-GRADE` and rc=1 divergence as `REFUSED`; it has no workflow caller, so the direct CLI output is the boundary. - the Goreleaser `digest-pin-verify` caller captures its exit code before `set -e` can collapse it, then reports `REFUSED (rc=1)` versus `COULD-NOT-GRADE (rc=2)` while returning the original failure code. - the existing prep-order workflow convention remains the reference for the same distinction. ## Verification Implementation commit: `c365d2acdfbe5ea25a17cb11daaeebb30c001e09`. - `go test ./...` - `go vet ./...` - full Bats: 162/162 - workflow YAML parse and fragment checks - ShellCheck on the new classifier - `rt gitea-twin --check`: 11/11 - `git diff --check` The workflow regression arm executes both non-zero classifier paths and asserts the opposite label is absent. Base-divergence tests exercise unreadable fields, fetch/compare failures, disagreement in both directions, and corroborated refusal.
fix(ci): preserve gate refusal and cannot-grade diagnostics
Some checks failed
fork-pr-approval-notice / explain fork workflow approval (pull_request_target) Successful in 6s
ac-closure-check / ac-closure check (pull_request) Successful in 7s
ac-closure-check / check (pull_request) Successful in 0s
changelog-body-check / check (pull_request) Has been cancelled
fragment-check / check (pull_request) Has been cancelled
fragment-check / changelog fragment-kind (pull_request) Has been cancelled
gitea-twin-check / check (pull_request) Has been cancelled
go-ci / lint + build + test (pull_request) Has been cancelled
manifest-check / check (pull_request) Has been cancelled
manifest-check / toolkit-self gate (PR's own rt) (pull_request) Has been cancelled
manifest-check / manifest-vs-tag consistency (pull_request) Has been cancelled
prep-order-check / check (pull_request) Has been cancelled
register-check / check (pull_request) Has been cancelled
register-check / toolkit-self gate (PR's own rt) (pull_request) Has been cancelled
register-check / register-drift check (pull_request) Has been cancelled
tests / workflow-schema (pull_request) Has been cancelled
tests / bats (pull_request) Has been cancelled
tests / dated-examples (pull_request) Has been cancelled
tests / contract-paths (pull_request) Has been cancelled
tests / shellcheck (pull_request) Has been cancelled
fragment-check / toolkit-self gate (PR's own rt) (pull_request) Has been cancelled
check-self-bootstrap / check (pull_request) Has been cancelled
workflow-parse-check / check (pull_request) Has been cancelled
workflow-parse-check / toolkit-self parse guard and controls (pull_request) Has been cancelled
workflow-parse-check / workflow parse and schema (pull_request) Has been cancelled
changelog-body-check / toolkit-self gate (PR's own rt) (pull_request) Has been cancelled
changelog-body-check / changelog body Cold-Read linter (pull_request) Has been cancelled
ac-closure-check / toolkit-self gate (PR's own rt) (pull_request) Has been cancelled
c365d2acdf
sentry force-pushed sentry/1226-ci-sentinel-boundary from c365d2acdf
Some checks failed
fork-pr-approval-notice / explain fork workflow approval (pull_request_target) Successful in 6s
ac-closure-check / ac-closure check (pull_request) Successful in 7s
ac-closure-check / check (pull_request) Successful in 0s
changelog-body-check / check (pull_request) Has been cancelled
fragment-check / check (pull_request) Has been cancelled
fragment-check / changelog fragment-kind (pull_request) Has been cancelled
gitea-twin-check / check (pull_request) Has been cancelled
go-ci / lint + build + test (pull_request) Has been cancelled
manifest-check / check (pull_request) Has been cancelled
manifest-check / toolkit-self gate (PR's own rt) (pull_request) Has been cancelled
manifest-check / manifest-vs-tag consistency (pull_request) Has been cancelled
prep-order-check / check (pull_request) Has been cancelled
register-check / check (pull_request) Has been cancelled
register-check / toolkit-self gate (PR's own rt) (pull_request) Has been cancelled
register-check / register-drift check (pull_request) Has been cancelled
tests / workflow-schema (pull_request) Has been cancelled
tests / bats (pull_request) Has been cancelled
tests / dated-examples (pull_request) Has been cancelled
tests / contract-paths (pull_request) Has been cancelled
tests / shellcheck (pull_request) Has been cancelled
fragment-check / toolkit-self gate (PR's own rt) (pull_request) Has been cancelled
check-self-bootstrap / check (pull_request) Has been cancelled
workflow-parse-check / check (pull_request) Has been cancelled
workflow-parse-check / toolkit-self parse guard and controls (pull_request) Has been cancelled
workflow-parse-check / workflow parse and schema (pull_request) Has been cancelled
changelog-body-check / toolkit-self gate (PR's own rt) (pull_request) Has been cancelled
changelog-body-check / changelog body Cold-Read linter (pull_request) Has been cancelled
ac-closure-check / toolkit-self gate (PR's own rt) (pull_request) Has been cancelled
to 7fef96367a
All checks were successful
fork-pr-approval-notice / explain fork workflow approval (pull_request_target) Successful in 5s
ac-closure-check / toolkit-self gate (PR's own rt) (pull_request) Successful in 5s
changelog-body-check / changelog body Cold-Read linter (pull_request) Successful in 7s
changelog-body-check / check (pull_request) Successful in 0s
check-self-bootstrap / check (pull_request) Successful in 6s
gitea-twin-check / check (pull_request) Successful in 5s
changelog-body-check / toolkit-self gate (PR's own rt) (pull_request) Successful in 27s
manifest-check / toolkit-self gate (PR's own rt) (pull_request) Successful in 5s
prep-order-check / check (pull_request) Successful in 6s
tests / workflow-schema (pull_request) Successful in 4s
fragment-check / toolkit-self gate (PR's own rt) (pull_request) Successful in 29s
ac-closure-check / ac-closure check (pull_request) Successful in 43s
ac-closure-check / check (pull_request) Successful in 0s
register-check / toolkit-self gate (PR's own rt) (pull_request) Successful in 28s
fragment-check / changelog fragment-kind (pull_request) Successful in 45s
fragment-check / check (pull_request) Successful in 0s
tests / bats (pull_request) Successful in 22s
tests / shellcheck (pull_request) Successful in 24s
tests / contract-paths (pull_request) Successful in 28s
tests / dated-examples (pull_request) Successful in 31s
manifest-check / manifest-vs-tag consistency (pull_request) Successful in 51s
manifest-check / check (pull_request) Successful in 0s
workflow-parse-check / toolkit-self parse guard and controls (pull_request) Successful in 24s
register-check / register-drift check (pull_request) Successful in 55s
register-check / check (pull_request) Successful in 0s
go-ci / lint + build + test (pull_request) Successful in 1m7s
workflow-parse-check / workflow parse and schema (pull_request) Successful in 37s
workflow-parse-check / check (pull_request) Successful in 0s
2026-09-06 10:13:49 +02:00
Compare
lookout approved these changes 2026-09-06 10:20:57 +02:00
lookout left a comment

Approved exact head 7fef96367a (base 60ec9228fd). Verified the rc=1 refusal versus rc=2 cannot-grade boundary: the workflow captures the exit code before set -e, emits the corresponding diagnostic, and still fails closed. Ran go test ./..., vet, build, golangci-lint, Bats 163/163, register-check, fragment-check, twin/diff checks. Re-ran the exact-head mutation replacing the classified boundary with if-not; the #1226 workflow arm reddened. Forgejo CI is terminal 28/28 success. No findings.

Approved exact head 7fef96367a9f6b66c77b65c8f44955b2e6a1ab63 (base 60ec9228fdf6fe94849be6eff5e113c5473e25ad). Verified the rc=1 refusal versus rc=2 cannot-grade boundary: the workflow captures the exit code before set -e, emits the corresponding diagnostic, and still fails closed. Ran go test ./..., vet, build, golangci-lint, Bats 163/163, register-check, fragment-check, twin/diff checks. Re-ran the exact-head mutation replacing the classified boundary with if-not; the #1226 workflow arm reddened. Forgejo CI is terminal 28/28 success. No findings.
bosun merged commit 3379d0ce01 into main 2026-09-06 10:22:02 +02:00
bosun deleted branch sentry/1226-ci-sentinel-boundary 2026-09-06 10:22:03 +02:00
Sign in to join this conversation.
No description provided.