test(bake): assert canonicalFiles and prep.go bakeRefFiles are the same population #1000

Closed
opened 2026-08-27 10:56:24 +02:00 by bosun · 2 comments
Owner

Ask

Assert that internal/bake's canonicalFiles and cmd/rt/prep.go's bakeRefFiles describe the same population, by exact ordered set, failing on divergence.

Does not reopen or change merged #997 / #998.

Why

The #995 anomaly was caused by exactly this divergence: internal/bake/marker.go carried 7 entries and cmd/rt/prep.go carried 6.forgejo/workflows/reusable-ac-closure-check.yml was missing from the second list. #998 added the missing line.

Nothing prevents the two lists diverging again. They are edited independently, and the failure mode is silent: the bake marker covers a file that prep does not stage, and the mismatch only surfaces as a confusing downstream anomaly.

Scope

  • A test comparing the two lists as exact ordered sets, not as membership
  • Fails on any divergence in either direction, naming the differing entries
  • Ordered, deliberately: if the order is load-bearing anywhere, an unordered comparison passes a real defect; if it is not, the test costs a sort at edit time

Acceptance criteria

  • Test compares canonicalFiles and bakeRefFiles by exact ordered set — implemented in merged rt#1002
  • Divergence in either direction fails and names the entries — both one-entry deletion mutants report failures=1
  • Mutation-verified: remove one entry from each list in turn, confirm each mutant reddens, and record the expected failure count per mutant — both deletion mutants and the order-only same-set swap report failures=1
  • Passes on current main without changing either list — verified in merged rt#1002

Implementation closeout

rt#1002 merged at fea3856b781621ad39ad2b80ac1cb20aa6b254ae, reachable from current main b4a6c8972bc0c49526326964bd82a0f7244fcd30; official Sentry review 6028 was bound to the exact implementation head 8580b1105528cdda45144512cdc1e750ab0e24c7, and Forgejo CI was 25/25 successful. The merged test pins equality in both membership and order, with an unmutated baseline at failures=0.

Refs frankenbit/release-toolkit#1002.

## Ask Assert that `internal/bake`'s `canonicalFiles` and `cmd/rt/prep.go`'s `bakeRefFiles` describe the **same population**, by exact ordered set, failing on divergence. **Does not reopen or change merged `#997` / `#998`.** ## Why The `#995` anomaly was caused by exactly this divergence: `internal/bake/marker.go` carried **7** entries and `cmd/rt/prep.go` carried **6** — `.forgejo/workflows/reusable-ac-closure-check.yml` was missing from the second list. `#998` added the missing line. **Nothing prevents the two lists diverging again.** They are edited independently, and the failure mode is silent: the bake marker covers a file that prep does not stage, and the mismatch only surfaces as a confusing downstream anomaly. ## Scope - A test comparing the two lists as **exact ordered sets**, not as membership - Fails on any divergence in either direction, naming the differing entries - Ordered, deliberately: if the order is load-bearing anywhere, an unordered comparison passes a real defect; if it is not, the test costs a sort at edit time ## Acceptance criteria - [x] Test compares `canonicalFiles` and `bakeRefFiles` by exact ordered set — implemented in merged rt#1002 - [x] Divergence in either direction fails and names the entries — both one-entry deletion mutants report failures=1 - [x] **Mutation-verified**: remove one entry from each list in turn, confirm each mutant reddens, and record the expected failure count per mutant — both deletion mutants and the order-only same-set swap report failures=1 - [x] Passes on current `main` without changing either list — verified in merged rt#1002 ## Implementation closeout rt#1002 merged at `fea3856b781621ad39ad2b80ac1cb20aa6b254ae`, reachable from current `main` `b4a6c8972bc0c49526326964bd82a0f7244fcd30`; official Sentry review 6028 was bound to the exact implementation head `8580b1105528cdda45144512cdc1e750ab0e24c7`, and Forgejo CI was 25/25 successful. The merged test pins equality in both membership and order, with an unmutated baseline at failures=0. Refs `frankenbit/release-toolkit#1002`.
Owner

Closeout

The equality guard and all three independent mutation directions are merged and verified. The tracker is closed with four ACs ticked and no bare boxes.

Refs frankenbit/release-toolkit#1002.

## Closeout The equality guard and all three independent mutation directions are merged and verified. The tracker is closed with four ACs ticked and no bare boxes. Refs `frankenbit/release-toolkit#1002`.
Owner

Independent current-tree recheck

The parity guard is present in tests/workflows.bats, not in a Go _test.go file. Against exact origin/main b4a6c8972bc0c49526326964bd82a0f7244fcd30, bats tests/workflows.bats --filter #1000 passed 1/1. The test extracts both seven-entry lists and runs the baseline plus canonicalFiles-minus-one, bakeRefFiles-minus-one, and same-set order-swap mutations; each mutant expects failures=1. The earlier search for bakeRefFiles in _test.go therefore missed the actual test surface. #1000 remains correctly closed; #847 is separate follow-up work.

## Independent current-tree recheck The parity guard is present in `tests/workflows.bats`, not in a Go `_test.go` file. Against exact `origin/main` `b4a6c8972bc0c49526326964bd82a0f7244fcd30`, `bats tests/workflows.bats --filter #1000` passed 1/1. The test extracts both seven-entry lists and runs the baseline plus canonicalFiles-minus-one, bakeRefFiles-minus-one, and same-set order-swap mutations; each mutant expects failures=1. The earlier search for `bakeRefFiles` in `_test.go` therefore missed the actual test surface. #1000 remains correctly closed; #847 is separate follow-up work.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
frankenbit/release-toolkit#1000
No description provided.