chore(rt#761): delete wrappers.sh + migrate-releases-to-codeberg.sh #765
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!765
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "i/761-free-deletions"
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?
Delete two provably-dead shell scripts (rt#761 scope item 1).
scripts/dev-tools/migrate-releases-to-codeberg.sh
184 lines, 0 external callers. One-time historical mirror script, fully spent.
Positive control:
git ls-tree -r --name-only HEAD | grep wrappersreturnedscripts/lib/wrappers.shbefore deletion, confirming the needle works.migrate-releases-to-codeberg.shreturned zero callers across all tracked files.scripts/lib/wrappers.sh
45 lines, provides
discover_consumer_wrappers(). Superseded byinternal/wrappers/discover.go(#750 /rt consumer-wrappers).One caller:
scripts/repin.sh:129. Repointed fromdiscover_consumer_wrappers .forgejo/workflowsto"$RT_BIN" consumer-wrappers .forgejo/workflows.RT_BINis already defined at line 64 asRT_BIN="${RT_BIN:-rt}". Removed thesourcelines (old 58-59).tests/wrappers.bats
6 tests for
discover_consumer_wrappers. Deleted alongsidewrappers.sh. Equivalent coverage ininternal/wrappers/discover_test.go:TestDiscoverMissingAndEmpty→ bats tests 1+2 (empty dir, missing dir)TestDiscover→ bats tests 3+4+5 (finds canonical wrappers, skipsreusable-*, skips non-toolkit)dir := ".forgejo/workflows")Closes frankenbit/release-toolkit#761
REQUEST_CHANGES @
87753254dfaf— one-line fix, and the port work underneath it is sound.Blocking: a Go test fails at this head and passes on its base
Discriminated, so this is not an inherited failure:
go test -count=1 ./...at head → 1 FAIL / 19 ok; at the PR's own base1fe9341→ 0 FAIL. This PR causes it.The fix is deleting one line —
internal/gates/selfboot_check.go, drop"scripts/lib/wrappers.sh"fromDefaultComposeScripts.This is the identical shape as #758's third resolution step, one PR later: #756 deleted
build_bake.shand #758 had to drop it from this same list. Same guard, same list, same omission. Worth noting that the guard is behaving exactly as designed — its error message even states the rule it is enforcing — and that itsAllExistarm is the one I mutation-tested during #758, so its red is trustworthy.CI had not caught this yet — the 11 contexts read
pendingwhen I looked, so this is a local finding rather than a repeat of a red you'd already seen.Everything else verified and good
The port itself is faithful, and I checked it differentially rather than by reading:
Built
rtfrom this head and ran the deletedwrappers.sh::discover_consumer_wrappersfromorigin/mainside by side. Byte-identical on the real input. That is a port, not a rewrite.RT_BINis bound atrepin.sh:62(RT_BIN="${RT_BIN:-rt}") and already used at:111forbuild-bake, so:127reuses an existing requirement rather than introducing one. This is not the#752/#754shape where a workflow called a barertthat nothing provided.consumer-wrappersis real, not a skeleton — present in thesubcommandsslice at:139and wired inimplementedCmdstonewConsumerWrappersCmd. It takes[WORKFLOWS_DIR]withcobra.MaximumNArgs(1).migrate-releases-to-codeberg.shhas zero callers — the only remaining mentions on main are CHANGELOG history and an ADR LOC table, both of which correctly describe it in the past tense as a one-off.shellcheck --severity=warning scripts/repin.shclean ·go buildrc=0 ·bats131 ok / 0 not-ok (138 − 7, exactly the deletedwrappers.batsarms).One thing to confirm rather than a change request
The bats suite had 7
@testarms;discover_test.gohas 3func Test*. Your claim is that the Go coverage subsumes them, and the three test names suggest it does —TestDiscover,TestDiscoverMissingAndEmpty,TestDiscoverTreatsMetacharactersInDirectoryLiterally— with table cases likely carrying the rest. I did not enumerate the subtests to confirm all seven axes survive, specificallyskips reusable-* files,skips non-toolkit workflows, andfilters on the exact 'uses: frankenbit/release-toolkit/' prefix. Those three are the behavioural core of the discovery contract. If they are table entries insideTestDiscover, say so and I'll take it; if any axis has no Go equivalent, it wants one before the bats arm goes.(The metacharacter test is a genuine addition over the bats suite — worth noting the port gained an axis rather than only preserving them.)
Also needs a rebase
Behind base.
block_on_outdated_branch=truewill refuse the merge regardless of the above.87753254df6f469a3889APPROVED @
6f469a3— the blocker is fixed and the coverage question is answered. Supersedes myREQUEST_CHANGES5354.The fix, verified:
"scripts/lib/wrappers.sh"is gone fromDefaultComposeScripts, the file is absent from the tree, andTestDefaultComposeScriptsAllExistPASSES at this head where it failed at the last one.go test -count=1 ./...→ 20 ok / 0 FAIL.bats131 ok / 0 not-ok.shellcheck scripts/repin.shclean.Your coverage answer checked, not taken
I asked whether the three behavioural axes survive the
wrappers.batsdeletion. They do, and I confirmed it against the fixture rather than the description — it is built inline witht.TempDir()+os.WriteFile, not undertestdata/, which is why my first look for a fixture directory found nothing:reusable-*reusable-release.ymllint.yml→actions/checkout@v4wrong-prefix.yml→somebody/release-toolkit/...The
wrong-prefix.ymlarm is the one that matters: a naivegrep release-toolkitpasses it, and only an owner-anchored match rejects it. That is the axis I would have insisted on, and it is present.TestDiscoverTreatsMetacharactersInDirectoryLiterally— awork[flows]directory — is a genuine addition over the bats suite. The port gained an axis rather than merely preserving them.Port faithfulness carries from 5354
Re-stating because the head moved: I built
rtat your previous head and ran the deleteddiscover_consumer_wrappersfromorigin/mainside by side — byte-identical sorted output on the real.forgejo/workflows, matchingrc=0/empty on a missing directory, no-arg default preserved. The one-line fix does not touch that code path, so the demonstration stands.RT_BINis bound atrepin.sh:62and already used at:111, so:127introduces no new bootstrap dependency — this is not the#752/#754shape.Needs one more rebase — and your last one was correct
You rebased onto
0c4adbfand said so accurately. Main has since moved toef6a3bf(#764 merged). So the current behind-base state is fresh drift, not a failed rebase —merge-base(6f469a3, main)is exactly0c4adbf, one commit back.block_on_outdated_branch=truewill still refuse until you re-land onef6a3bf.SCOPE
I verified the three axes I named are present and that the package's tests pass. I did not compare the Go implementation against the bats suite arm-for-arm on all seven — the two I did not trace are
empty dirandfinds all 4 canonical wrappers, both of whichTestDiscoverMissingAndEmptyand the differential run cover in substance rather than by name.6f469a388964126bcd95rt repin— part A, the command and its resilience #773