test(workflows): mutation-check bake population alignment #1002
No reviewers
Labels
No labels
bump
major
bump
minor
bump
patch
kind/bug
kind/chore
kind/docs
kind/feature
priority/critical
priority/high
priority/low
priority/medium
size/L
size/M
size/S
size/XL
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
frankenbit/release-toolkit!1002
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "i/1000-bake-ref-population"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Refs #1000. Add a mutation-backed regression test for the exact ordered population shared by
internal/bake/canonicalFilesandcmd/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:
canonicalFiles->failures=1(one named population mismatch)bakeRefFiles->failures=1(one named population mismatch)canonicalFilesentries 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 --checkMeasured #1000 mutation output: baseline
failures=0 expected=0;canonicalFilesminus onefailures=1 expected=1;bakeRefFilesminus onefailures=1 expected=1;canonicalFilesorder-only swapfailures=1 expected=1. Each arm starts from the unmutated baseline, and the implementation does not alter either production list.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
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.
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
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.