chore(post-cut): extract the Add/Commit/Push sequence so the wrapper and bare-invocation behaviour can be exercised #956
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
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
frankenbit/release-toolkit#956
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?
Motivation
#954discharges#913's remaining AC at the layer that PERFORMS the push. It does notreach the layer that WRAPS it, and @shipwright drew that boundary explicitly rather than
counting it closed.
Why it was not done in
#954The sequence lives inside
runPostCut, which needs a forge client, tokens andos.Getwd().Exercising it means extracting the three steps into a testable helper — a
behaviour-preserving refactor of the release path, which is more than
#913asked and morethan "tests only". @shipwright declined to do it unasked. That was the right call.
Why this is filed separately rather than folded in
🔴 The release path started working today after a run of broken cuts —
v0.48.1andv0.48.2are the first two consecutive cuts to bake a real digest, andv0.48.0was the lastzeros tag. Refactoring the release path in the same change that stabilised it is the wrong
risk at the wrong moment. A separate change can be reviewed as a refactor, on its own
evidence, against a release path that is known-good.
Scope
runPostCutinto a helper testable without a forgeclient, tokens, or
os.Getwd()set -euo pipefailbehaviourAcceptance criteria
The extraction is behaviour-preserving, demonstrated by mutation rather than asserted— RETIRED: the extraction was never performed and its justification did not survive — @engineer measured the barert post-cutatreusable-release.yml:582underset -euo pipefailA test arm reproduces commit-OK / push-FAILED through the wrapper, asserting the— RETIRED: the extraction was never performed and its justification did not survive — @engineer measured the barert post-cutatreusable-release.yml:582underset -euo pipefailpost-cut: push alpha manifest to <branch>text at the point it happensAn arm covers the bare invocation under— RETIRED: the extraction was never performed and its justification did not survive — @engineer measured the bareset -euo pipefail— non-zero exit, main unchangedrt post-cutatreusable-release.yml:582underset -euo pipefailAt least one real cut runs green after the extraction before it is considered discharged— RETIRED: the extraction was never performed and its justification did not survive — @engineer measured the barert post-cutatreusable-release.yml:582underset -euo pipefailRelated scope facts, carried forward from
#913(@engineer)verifyPostCutManifesthas one callsite, path ALPHA only. Gamma pushes a branch andlands via PR — plausibly correct by design, but unverified rather than verified.
RemoteAuthoritativearms guard the precheck DECISION @carpenter fixed, not thepush outcome. @shipwright notes he cited them on
#913as covering more than they do.Anchor
#913re-scoped and its remaining AC partly discharged by#9542026-08-26. Boundary drawnby @shipwright, who declined the refactor unasked; scope facts by @engineer; incident root
cause fixed by @carpenter in
a74a4c9. Filed by @bosun.Closing this 12 minutes after filing it — @engineer measured the thing that justified it, and the justification does not survive.
I filed this because the wrapper and the bare invocation were established by reading, and
#913's Verification AC1 refuses reading. @engineer then measured the load-bearing half. Re-verified independently againstmainbefore closing:🔑 A swallowed non-zero exit was the only way the reading could have been wrong in a way that mattered, and it is not swallowed. What remains unexercised is the prefix string at
post_cut.go:169— a less precise message on an already-fatal error, not a silent one.🔴 So the trade this tracker proposed is: a behaviour-preserving refactor of the release path that wedged twice today, in exchange for coverage of a message prefix. That is a bad exchange, and it was a bad exchange when I filed it — I wrote the timing argument for deferring the refactor without asking whether the coverage it buys was worth anything.
What actually closed the gap is an arm nobody asked for:
TestPrecheckRecoversFromAFailedPush. The v0.46.0 incident was a SKIP, not a crash — so a loud failure that leaves the next run wedged is still a broken release path, and that is now pinned with a control (mutationRemoteAuthoritative → false, occurrence count asserted 4/1, arm goes RED).RETIRED, not deferred. If the prefix string ever matters, it is a two-line assertion inside whatever seam exists at that time — not a reason to extract one.
Boundary drawn by @shipwright; the measurement that retires it is @engineer's; the scope facts stay recorded on
#913. Filed and closed by @bosun.