test(workflows): mutation-check bake population alignment #1002

Merged
pullings merged 2 commits from i/1000-bake-ref-population into main 2026-08-27 12:58:09 +02:00
Owner

What

Refs #1000. Add a mutation-backed regression test for the exact ordered population shared by internal/bake/canonicalFiles and cmd/rt/prep.go/bakeRefFiles.

The live seven-entry lists are compared in order by the existing #997 check. This adds three independent mutation arms, each from a fresh unmutated baseline:

  • remove one entry from canonicalFiles -> failures=1 (one named population mismatch)
  • remove one entry from bakeRefFiles -> failures=1 (one named population mismatch)
  • swap two canonicalFiles entries without changing the set -> failures=1 (one ordered-population mismatch)

The unmutated baseline reports failures=0. The order-only arm ensures a set-equality regression is rejected.

Verification

  • bats tests/workflows.bats --filter '#1000'
  • bats tests/workflows.bats --filter '#997|#1000'
  • bats --print-output-on-failure tests (118/118)
  • go build ./...
  • go vet ./...
  • go test -count=1 ./...
  • go run ./cmd/rt register-check (0 drift hits)
  • git diff --check

Measured #1000 mutation output: baseline failures=0 expected=0; canonicalFiles minus one failures=1 expected=1; bakeRefFiles minus one failures=1 expected=1; canonicalFiles order-only swap failures=1 expected=1. Each arm starts from the unmutated baseline, and the implementation does not alter either production list.

## What Refs #1000. Add a mutation-backed regression test for the exact ordered population shared by `internal/bake/canonicalFiles` and `cmd/rt/prep.go/bakeRefFiles`. The live seven-entry lists are compared in order by the existing #997 check. This adds three independent mutation arms, each from a fresh unmutated baseline: - remove one entry from `canonicalFiles` -> `failures=1` (one named population mismatch) - remove one entry from `bakeRefFiles` -> `failures=1` (one named population mismatch) - swap two `canonicalFiles` entries without changing the set -> `failures=1` (one ordered-population mismatch) The unmutated baseline reports `failures=0`. The order-only arm ensures a set-equality regression is rejected. ## Verification - `bats tests/workflows.bats --filter '#1000'` - `bats tests/workflows.bats --filter '#997|#1000'` - `bats --print-output-on-failure tests` (118/118) - `go build ./...` - `go vet ./...` - `go test -count=1 ./...` - `go run ./cmd/rt register-check` (0 drift hits) - `git diff --check` Measured #1000 mutation output: baseline `failures=0 expected=0`; `canonicalFiles` minus one `failures=1 expected=1`; `bakeRefFiles` minus one `failures=1 expected=1`; `canonicalFiles` order-only swap `failures=1 expected=1`. Each arm starts from the unmutated baseline, and the implementation does not alter either production list.
test(workflows): mutation-check bake populations (#1000)
All checks were successful
fork-pr-approval-notice / explain fork workflow approval (pull_request_target) Successful in 3s
ac-closure-check / toolkit-self gate (PR's own rt) (pull_request) Successful in 5s
ac-closure-check / ac-closure check (pull_request) Successful in 7s
ac-closure-check / check (pull_request) Successful in 0s
changelog-body-check / changelog body Cold-Read linter (pull_request) Successful in 7s
changelog-body-check / check (pull_request) Successful in 0s
fragment-check / toolkit-self gate (PR's own rt) (pull_request) Successful in 5s
fragment-check / changelog fragment-kind (pull_request) Successful in 8s
fragment-check / check (pull_request) Successful in 0s
go-ci / lint + build + test (pull_request) Successful in 26s
manifest-check / manifest-vs-tag consistency (pull_request) Successful in 8s
manifest-check / check (pull_request) Successful in 0s
register-check / toolkit-self gate (PR's own rt) (pull_request) Successful in 5s
tests / workflow-schema (pull_request) Successful in 4s
tests / bats (pull_request) Successful in 14s
tests / shellcheck (pull_request) Successful in 3s
workflow-parse-check / toolkit-self parse guard and controls (pull_request) Successful in 4s
changelog-body-check / toolkit-self gate (PR's own rt) (pull_request) Successful in 2m3s
check-self-bootstrap / check (pull_request) Successful in 2m12s
manifest-check / toolkit-self gate (PR's own rt) (pull_request) Successful in 1m56s
tests / dated-examples (pull_request) Successful in 2m3s
register-check / register-drift check (pull_request) Successful in 3m23s
register-check / check (pull_request) Successful in 0s
workflow-parse-check / workflow parse and schema (pull_request) Successful in 4m15s
workflow-parse-check / check (pull_request) Successful in 0s
22a9a59bae
Keep the canonical bake and prep staging lists as one ordered population. Exercise one-entry deletions from each source and require one mismatch in both directions.
sentry requested changes 2026-08-27 12:15:39 +02:00
Dismissed
sentry left a comment

REQUEST_CHANGES - exact head 22a9a59bae.

The new control only mutates one-entry deletions. It does not mutation-test the stated exact ordered population: changing the predicate from canonical == staged to set(canonical) == set(staged) still leaves test #1000 green (1/1), so an order-only divergence would be accepted. Add a fresh-baseline arm that swaps two entries in one source and requires one mismatch; retain both deletion arms.

I independently ran the current head: full Bats 118/118, Go tests, vet, build, diff check, and Forgejo status 25/25 green.

REQUEST_CHANGES - exact head 22a9a59bae218a9d6603af2ac76de9bd7666fc68. The new control only mutates one-entry deletions. It does not mutation-test the stated exact ordered population: changing the predicate from canonical == staged to set(canonical) == set(staged) still leaves test #1000 green (1/1), so an order-only divergence would be accepted. Add a fresh-baseline arm that swaps two entries in one source and requires one mismatch; retain both deletion arms. I independently ran the current head: full Bats 118/118, Go tests, vet, build, diff check, and Forgejo status 25/25 green.
test(workflows): catch bake population order drift
All checks were successful
fork-pr-approval-notice / explain fork workflow approval (pull_request_target) Successful in 3s
fragment-check / toolkit-self gate (PR's own rt) (pull_request) Successful in 5s
fragment-check / changelog fragment-kind (pull_request) Successful in 8s
fragment-check / check (pull_request) Successful in 0s
go-ci / lint + build + test (pull_request) Successful in 26s
manifest-check / toolkit-self gate (PR's own rt) (pull_request) Successful in 5s
manifest-check / manifest-vs-tag consistency (pull_request) Successful in 8s
manifest-check / check (pull_request) Successful in 0s
register-check / toolkit-self gate (PR's own rt) (pull_request) Successful in 6s
changelog-body-check / toolkit-self gate (PR's own rt) (pull_request) Successful in 1m6s
register-check / register-drift check (pull_request) Successful in 8s
register-check / check (pull_request) Successful in 0s
tests / bats (pull_request) Successful in 13s
tests / shellcheck (pull_request) Successful in 4s
workflow-parse-check / toolkit-self parse guard and controls (pull_request) Successful in 4s
workflow-parse-check / workflow parse and schema (pull_request) Successful in 5s
workflow-parse-check / check (pull_request) Successful in 0s
check-self-bootstrap / check (pull_request) Successful in 2m10s
tests / workflow-schema (pull_request) Successful in 1m37s
changelog-body-check / changelog body Cold-Read linter (pull_request) Successful in 2m55s
changelog-body-check / check (pull_request) Successful in 0s
tests / dated-examples (pull_request) Successful in 1m47s
ac-closure-check / toolkit-self gate (PR's own rt) (pull_request) Successful in 5s
ac-closure-check / ac-closure check (pull_request) Successful in 3m11s
ac-closure-check / check (pull_request) Successful in 0s
8580b11055
sentry left a comment

REQUEST_CHANGES - exact head 8580b11055.

The fresh code now has the required three controls: canonicalFiles minus one, bakeRefFiles minus one, and an order-only swap. At this head, #1000 passes with both deletion arms reporting failures=1 and the order arm reporting failures=1; an isolated set(canonical) == set(staged) mutant is caught by the order arm.

The live PR body is stale relative to this exact head. It still says "This adds two independent mutation arms" and documents only the two deletion arms. Update the What/Verification text to enumerate the third order-only control and its expected result, then re-request review.

Independent exact-head checks passed: #1000 1/1, #997|#1000 4/4, full Bats 118/118, Go test/vet/build, register-check 0 drift, and diff check. Forgejo status is 25/25 green.

REQUEST_CHANGES - exact head 8580b1105528cdda45144512cdc1e750ab0e24c7. The fresh code now has the required three controls: canonicalFiles minus one, bakeRefFiles minus one, and an order-only swap. At this head, #1000 passes with both deletion arms reporting failures=1 and the order arm reporting failures=1; an isolated set(canonical) == set(staged) mutant is caught by the order arm. The live PR body is stale relative to this exact head. It still says "This adds two independent mutation arms" and documents only the two deletion arms. Update the What/Verification text to enumerate the third order-only control and its expected result, then re-request review. Independent exact-head checks passed: #1000 1/1, #997|#1000 4/4, full Bats 118/118, Go test/vet/build, register-check 0 drift, and diff check. Forgejo status is 25/25 green.
sentry approved these changes 2026-08-27 12:53:33 +02:00
sentry left a comment

APPROVE - exact head 8580b11055.

The corrected body now accurately enumerates all three fresh-baseline controls: canonicalFiles minus one, bakeRefFiles minus one, and an order-only swap preserving the set; each reports failures=1 and the unmutated baseline reports failures=0. The order arm catches an isolated set-equality mutant, while both deletion arms remain live.

Exact-head checks remain green: #1000 1/1, #997|#1000 4/4, full Bats 118/118, Go test/vet/build, register-check 0 drift, diff check, and Forgejo CI 25/25.

APPROVE - exact head 8580b1105528cdda45144512cdc1e750ab0e24c7. The corrected body now accurately enumerates all three fresh-baseline controls: canonicalFiles minus one, bakeRefFiles minus one, and an order-only swap preserving the set; each reports failures=1 and the unmutated baseline reports failures=0. The order arm catches an isolated set-equality mutant, while both deletion arms remain live. Exact-head checks remain green: #1000 1/1, #997|#1000 4/4, full Bats 118/118, Go test/vet/build, register-check 0 drift, diff check, and Forgejo CI 25/25.
sentry approved these changes 2026-08-27 12:55:28 +02:00
sentry left a comment

APPROVE - exact head 8580b11055.

The corrected body now accurately enumerates all three fresh-baseline controls: canonicalFiles minus one, bakeRefFiles minus one, and an order-only swap preserving the set; each reports failures=1 and the unmutated baseline reports failures=0. The order arm catches an isolated set-equality mutant, while both deletion arms remain live.

Exact-head checks remain green: #1000 1/1, #997|#1000 4/4, full Bats 118/118, Go test/vet/build, register-check 0 drift, diff check, and Forgejo CI 25/25.

APPROVE - exact head 8580b1105528cdda45144512cdc1e750ab0e24c7. The corrected body now accurately enumerates all three fresh-baseline controls: canonicalFiles minus one, bakeRefFiles minus one, and an order-only swap preserving the set; each reports failures=1 and the unmutated baseline reports failures=0. The order arm catches an isolated set-equality mutant, while both deletion arms remain live. Exact-head checks remain green: #1000 1/1, #997|#1000 4/4, full Bats 118/118, Go test/vet/build, register-check 0 drift, diff check, and Forgejo CI 25/25.
pullings deleted branch i/1000-bake-ref-population 2026-08-27 12:58:10 +02:00
Sign in to join this conversation.
No description provided.