chore(bake): remove orphaned bake test fixtures (#760) #764
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!764
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "i/760-prune-orphan-bake-fixtures"
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
Prune the 11 files under
internal/bake/testdata/fixtures/bake/that were left behind wheninternal/bake/equivalence_test.goand its bash oracle were deleted ine143ef0(#607).This keeps the existing Go bake tests (
baker_test.go,marker_test.go,cmd/rt/build_bake_test.go) as the live coverage and removes only the unconsumed fixture corpus.Decision
Delete rather than restore a consumer. The deleted fixtures belonged to the retired differential oracle; the current package tests generate the marker cases they exercise inline, and restoring an equivalence consumer would recreate a harness whose bash side was deliberately retired.
Verification
rgmethod finds manyforgejo-api.shreferences, so zero references for the bake fixture paths is not a broken search.internal/bake/testdata: 11 files before deletion, 0 explicit path consumers outside testdata.internal/changelog/testdata(26 files) andinternal/config/testdata(29 files) also have 0 explicit path consumers outside testdata. I did not delete those here because rt#760 names the bake corpus; they should be a follow-up or separate scope call.go test ./internal/bake ./internal/changelog ./internal/configgo test ./...bats testsgolangci-lint cache clean && golangci-lint run --timeout=5m ./...git diff --checkCloses #760.
APPROVED @
aab0a4f89970919b6ac1cc35bb43f6bd6969c598— the deletion is correct and the method behind it now has a control it didn't have.The claim I checked hardest was not the deletion — it was the method
Your sibling note is what made me look:
internal/changelog/testdata(26 files) andinternal/config/testdata(29) also showing zero consumers is a statement about the instrument, not about those directories. Two actively-maintained packages reading as orphaned is the shape that usually means the needle is broken — and if it were, the bake verdict would inherit the defect.It isn't broken. But your positive control doesn't establish that: finding
forgejo-api.shrefs proves the grep works on a string, not that the method detects testdata consumption. Those are different claims. So I built the missing arm:The control fires — the method can detect a consumed fixture corpus. Then, with
-count=1to defeat the test cache and the directory's absence asserted before each run:internal/bakeinternal/changeloginternal/configThree passes on their own would have been the unanimous-result shape worth distrusting; with the harness arm red, they mean what they say.
The PR
internal/bake/testdata/fixtures/bake/, zero outside it. Onechangelog.d/760.internal.mdadded. Nothing else moved.3398425:go buildrc=0 ·go vetrc=0 ·go test -count=1 ./...rc=0, 20 ok / 0 FAIL ·bats tests/138 ok, 0 not-ok.f9ad73e(#546) as the differential oracle's data and its consumerinternal/bake/equivalence_test.gowas deleted ine143ef0(#607). Delete-rather-than-restore is right, and your reasoning for it is the reasoning I'd give.source .release-toolkit/scripts/lib/forgejo-api.shat:458— frozen copies of the pre-#757 workflow. I'd flagged them as "check before anyone deletes the lib." This PR dissolves that question rather than answering it, which is better. And it means restoring them later would be wrong anyway: they encode a workflow shape that no longer exists, so a future oracle would need them regenerated, not restored.Blocking on nothing, but it needs a rebase
Behind base by exactly one commit —
0c4adbf, #762, the release-path fix that merged while this was open.block_on_outdated_branch=true, so the merge will refuse until it's rebased.git merge-tree --write-tree origin/main <head>reports no textual conflict, so it's mechanical.Follow-up worth a tracker, and your restraint was right
You scoped to bake because #760 names bake. Correct. But the sibling result is now measured rather than suspected:
internal/changelog/testdata(26) andinternal/config/testdata(29) are 55 more orphaned files, verified by the same removal test with the same control. That's a scope call for whoever files it — I'm not asking you to widen this PR, and it should not hold the merge.SCOPE — what this approval does not cover
I verified these fixtures are unused by their own packages' Go tests. I did not check whether anything outside the Go test suite reads them — a workflow, a script, an external tool.
git grepfinds no path reference outsidetestdata/itself, and bats is green, but those are absence checks on surfaces I chose. If something consumes them by a path I didn't sweep, this approval didn't see it.aab0a4f899ba931b1063RE-APPROVED @
ba931b1063077fdc7cfb64f36b923b203c56d341— rebase onto0c4adbfverified content-neutral. Supersedes my 5353 ataab0a4f8, whichdismiss_stale_approvalscorrectly dismissed.Content-neutrality verified independently, not taken on report — range form, either side of the rebase:
Identical, and it matches the id you reported. Manifest unchanged: 11 deletions, all under
internal/bake/testdata/, pluschangelog.d/760.internal.md. Nothing else touched.origin/mainis an ancestor —block_on_outdated_branchcleared.My prior verification carries because the content is byte-for-byte the same work: the harness positive control fired (removing
internal/harness/testdatareddens harness), and with-count=1defeating the test cache,internal/bake(11),internal/changelog(26) andinternal/config(29) all pass with their fixtures removed. The deletion is right and the method under it has a control.Scope unchanged from 5353: I verified these fixtures are unused by their own packages' Go tests. I did not sweep non-Go consumers, and the 55 orphaned files in
changelog/configtestdata remain follow-up rather than anything this PR should carry.