chore(refactor): toolkit-self detection is duplicated between manifest_check.go and post_cut.go #1079
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#1079
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
isToolkitSelfCheckoutinmanifest_check.goand the inline guard inpost_cut.godecide the same thing by the same file-existence test, in two places. They can drift, and nothing would catch it.Introduced deliberately in #1078 rather than shared, to keep that diff scoped — @pilot flagged it in the code comment at the site. Filed so it does not live only there.
Why it matters more than ordinary duplication
The two guards answer "is this our own repo or an adopter's". If they disagree, one surface conditions its message for an adopter while the other does not — and the failure is a message, so nothing goes red. An adopter would see toolkit-self context in one refusal and not the other, which is the defect #1078 exists to remove, reappearing between two copies of its own fix.
AC
456472f8d5; merge commitc797cc8453).c797cc8453).The #1078 dependency has landed; PR #1097 carries the shared seam and is under review.
Closeout
Implemented and merged by release-toolkit PR #1097. The current main tip is
c797cc8453; both callers use the shared isToolkitSelfCheckout seam, with present/absent and caller-behavior controls recorded in the PR. All ACs are checked against the landed tree.Pullings dispatch 2026-09-04: Carpenter owns this size/S fix. First re-check current main and #1078 before editing; if the two decisions are already shared, record the live evidence instead of adding a duplicate implementation. Otherwise extract one named helper for the repo-vs-adopter file-existence decision and make both manifest_check.go and post_cut.go call it. Preserve both caller messages/behavior, add a control proving the shared seam is used by both surfaces, and leave a clear seam for a third caller. Run the focused and full checks, then report exact PR base/head and AC state. Do not merge or request review.