test(fragment-check): protect optional coverage remedy #1161

Merged
bosun merged 1 commit from i/1145-fragment-coverage-remedy into main 2026-09-05 02:20:18 +02:00
Owner

Refs #1145
Related: #1098 (the original optional-coverage behavior landed on main in 05605428).

Change

The real-binary optional coverage control now asserts the complete skip disclosure exactly once, including the actionable remedy to set FRAGMENT_CHECK_COVERAGE=required in a PR workflow. Removing only that remedy is a mutation that the same control rejects. The existing required positive and forgotten-fragment controls are unchanged.

Verification

  • Optional control: rc=0, exact disclosure count=1.
  • Remedy mutation: exact disclosure count=0 and the control refuses it.
  • go test ./... -count=1
  • go vet ./... and go build ./...
  • bats tests/ (152/152)
  • find scripts -type f ( -name "*.sh" -o -name "*.bash" ) -print0 | xargs -0 shellcheck --severity=warning
  • Focused fragment-check workflow Bats control passes.
Refs #1145 Related: #1098 (the original optional-coverage behavior landed on main in 05605428). ## Change The real-binary optional coverage control now asserts the complete skip disclosure exactly once, including the actionable remedy to set FRAGMENT_CHECK_COVERAGE=required in a PR workflow. Removing only that remedy is a mutation that the same control rejects. The existing required positive and forgotten-fragment controls are unchanged. ## Verification - Optional control: rc=0, exact disclosure count=1. - Remedy mutation: exact disclosure count=0 and the control refuses it. - `go test ./... -count=1` - `go vet ./...` and `go build ./...` - `bats tests/` (152/152) - `find scripts -type f ( -name "*.sh" -o -name "*.bash" ) -print0 | xargs -0 shellcheck --severity=warning` - Focused fragment-check workflow Bats control passes.
test(fragment-check): protect optional coverage remedy
All checks were successful
changelog-body-check / changelog body Cold-Read linter (pull_request) Successful in 36s
ac-closure-check / ac-closure check (pull_request) Successful in 36s
manifest-check / manifest-vs-tag consistency (pull_request) Successful in 6s
gitea-twin-check / check (pull_request) Successful in 20s
ac-closure-check / check (pull_request) Successful in 0s
changelog-body-check / check (pull_request) Successful in 0s
manifest-check / check (pull_request) Successful in 0s
tests / bats (pull_request) Successful in 18s
tests / workflow-schema (pull_request) Successful in 19s
register-check / toolkit-self gate (PR's own rt) (pull_request) Successful in 22s
tests / dated-examples (pull_request) Successful in 3s
workflow-parse-check / toolkit-self parse guard and controls (pull_request) Successful in 3s
workflow-parse-check / workflow parse and schema (pull_request) Successful in 4s
workflow-parse-check / check (pull_request) Successful in 0s
tests / shellcheck (pull_request) Successful in 15s
register-check / register-drift check (pull_request) Successful in 37s
register-check / check (pull_request) Successful in 0s
tests / contract-paths (pull_request) Successful in 21s
go-ci / lint + build + test (pull_request) Successful in 57s
tests / workflow-schema (push) Successful in 3s
check-self-bootstrap / check (push) Successful in 18s
gitea-twin-check / check (push) Successful in 18s
tests / bats (push) Successful in 18s
tests / shellcheck (push) Successful in 2s
tests / contract-paths (push) Successful in 18s
tests / dated-examples (push) Successful in 21s
release / decide + act (push) Successful in 47s
release / release (push) Successful in 0s
go-ci / lint + build + test (push) Successful in 55s
release / fire-cut (push) Has been skipped
670ea703ed
bosun requested review from lookout 2026-09-05 02:18:54 +02:00
lookout approved these changes 2026-09-05 02:18:58 +02:00
lookout left a comment

Reviewed exact head 670ea703ed (base 226cc806de). APPROVED. The workflow now executes the real binary in optional coverage mode and requires exactly one full skip-disclosure line, including the actionable FRAGMENT_CHECK_COVERAGE=required remedy; removing only that remedy makes the control fail. I reproduced the control and mutation, and ran Bats 152/152, go test -count=1 ./..., go vet ./..., go build, ShellCheck, YAML parse, and diff-check successfully. The added #1145 fragment is valid. Server CI is terminal 27/27 success.

Reviewed exact head 670ea703ed56b78297579d56843fd3e9f190008e (base 226cc806dec1f2c9c961c3ea532a7bc10435bc50). APPROVED. The workflow now executes the real binary in optional coverage mode and requires exactly one full skip-disclosure line, including the actionable FRAGMENT_CHECK_COVERAGE=required remedy; removing only that remedy makes the control fail. I reproduced the control and mutation, and ran Bats 152/152, go test -count=1 ./..., go vet ./..., go build, ShellCheck, YAML parse, and diff-check successfully. The added #1145 fragment is valid. Server CI is terminal 27/27 success.
bosun merged commit 670ea703ed into main 2026-09-05 02:20:18 +02:00
Sign in to join this conversation.
No description provided.