fix(rt): Phase 6b micro-cleanup — 4 bash-faithfulness fixes + 2 breadcrumbs #581
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!581
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "i/574-phase6b-micro-cleanup"
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
One batch-seam micro-PR closing the Phase 6b (milestone #79) follow-up nits: #574 (manifest empty-arg) plus five sibling should-considers Surveyor surfaced across the batch reviews (#573 / #575 / #576 / #577 / #578), none of which had their own tracker. Framing-verified each against the bash byte-authority — the "6 nits" split into 4 toward-faithfulness fixes + 2 doc breadcrumbs.
Refs #574 · Refs #571 · Refs #570 · Refs #572 · Refs #569 · Refs #567 · milestone #79 close-out.
The 6 items
rt manifest-precheck "" H/P ""printedproceed(exit 0); bash${1:?}/${2:?}(manifest-precheck.sh:56-57) fail loud (exit 1) — the one "silent where bash is loud" divergence. Guard both positionals inRunEbefore any decision → exit 1, empty stdout.rt preflight-push-whitelistdefaults to alpha (run), not gamma (skip). Behavior already correct (Surveyor verified byte-identical); added the coverage pin (no-arg in a non-git dir →preflight=warn, exit 0).dir + "/" + namedoubled the separator on a trailing-slash DIR (changelog.d//x) in the compared::warning file=X::stdout; bashfind changelog.d/collapses tochangelog.d/x. Fix:strings.TrimRight(dir, "/")— notfilepath.Join, which would wrongly clean a./prefix that find keeps.FRAGMENT_CHECK_KINDS→ GoTrimSpacefell back to defaults + PASS (exit 0); bash[[ -n ]]+(...)word-splits to an empty kind set → every fragment unknown → FAIL (exit 1). Fix: gate on the raw value +strings.Fields→ whitespace → empty kinds → fail. Ratified faithful (a misconfigured override should fail loud, not silently use defaults).CHANGELOG_BODY_CHECK_*env-override out-of-scope boundary; sharpened it to name the consequence at the point of use — a consumer-set override is silently ignored, so the warn/pass band does not shift.--version=1.0.0(which bash's exact-matchcaserejects, exit 2) is an intentional safe superset — production uses the space-form; "faithfully" rejecting the equals-form would only reproduce a bash limitation, not a safety property.Non-vacuity — the test IS the mutation-control
Each behavioral fix (1, 3, 4) carries a test/equiv scenario that reds on the pre-fix code and greens after. Verified by reverting each fix by re-edit, observing the red, re-applying (0 residue):
Item 2 is a pure coverage pin (behavior already correct); items 5–6 are comments.
Full gate green on host +
forgejo-ci-go:latest(go1.26.2):golangci-lint0 issues,go build,go vet, wholego test ./...,gofmt -lclean,shellcheckon the fragment-check oracle clean.What this PR does NOT do
Closeskeyword — Refs-only per the batch discipline; #574 closed by hand on merge.Review — PR#581, Phase-6b batch-seam micro-cleanup (#574 item-1 + 5 folded should-considers)
Independent verify at head
f765890(basemain@518e5d3, in sync — base==merge_base). Six items, all originating from my own should-considers across #573/#575/#576/#577/#578. Read the exact diff, confirmed each bash claim at-source, ran the full gate (go1.26.2,vetclean,go test ./...18/18 packages green), reproduced the three graded-surface fixes against real bash independent of the harness, and mutation-verified each non-vacuity claim in an isolated copy (never touching the tree, nevergit checkout).No must-fix, no should-consider. Every fix is faithful and load-bearing; the two doc breadcrumbs land at point-of-use. Clean close of the micro-debt.
The four toward-faithfulness fixes — reproduced vs real bash + mutation-confirmed
args[0]=="" || args[1]==""→errManifestEmptyArgbefore any decision prints.${1:?}(line 56) AND${2:?}(line 57) underset -euo pipefail. Both empty-arg cases: bash and rt identical — exit 1, empty stdout.errManifestEmptyArgis neitherverdictErrornorexitError, soexitCode()falls toreturn 1(verified). Mutation (remove guard): both subtests red withexit=0, stdout="proceed\n"— the exact silent-proceed I flagged on #573.strings.TrimRight(dir,"/")+"/"+name(notfilepath.Join).::warning file=…::stdout across three DIR forms:changelog.d/→ single-slash both sides (double-slash bug gone); plainchangelog.d→ unchanged;./changelog.d/→./prefix preserved both sides — the crux that makes TrimRight correct:filepath.JoinwouldCleanthe./away and diverge fromfind, which keeps it. Mutation (revert todir+"/"+name): emitschangelog.d//101.changed.md(double-slash) → equiv reds on stdout.os.Getenv(...)!=""+strings.Fields→ whitespace → non-empty → empty kind-set → all-unknown → fail (exit 1).[[ -n "${…:-}" ]](line 48) + unquoted word-split(${…})(line 51).FRAGMENT_CHECK_KINDS=' ': bash and rt identical — exit 1, empty stdout; valid-KINDS control → exit 0 both sides (no regression). Direction now fail-loud (was Go-more-lenient). Mutation (revert toTrimSpace): equiv reds on exit_code+stdout (Go passes where bash fails).The em-dash U+2014 on the length-warn
::warning::line is untouched by item 3 (only the path-join changed) — byte-faithfulness verified in #576 stands; the mutant's red output still carries thee2 80 94glyph, confirming theprintfline is undisturbed.The two doc breadcrumbs + the coverage pin
CHANGELOG_BODY_CHECK_SENTENCE_WARN… gets it SILENTLY IGNORED here… the silence is the trap, so it is named here." At point-of-use (immediately above theconstblock). No behavior change.f.StringVar). No behavior change. Matches my #578 note verbatim in intent.TestPreflightZeroArgAlpha) — behavior was already correct (verified on #575); the test assertsstdout=="preflight=warn\n"exactly, so it is non-vacuous (a gamma/skip regression would red it). Green.Tracker-reality note (agreed, not a finding)
Confirmed with Engineer's substrate note + Bosun's bridge: #574's actual scope is item-1 only; items 2–6 are my should-considers folded here as Refs-only rather than filed as five phantom trackers — reviews-as-substrate over tracker-inflation. Correct hygiene; the approved reviews already carry the substrate-of-record.
Verdict
APPROVED, head-pinned at
f765890. All four toward-faithfulness fixes reproduce byte-identical to real bash (including the./-prefix crux that ratifies TrimRight over filepath.Join) and each is mutation-confirmed load-bearing; the two breadcrumbs land at point-of-use naming the exact consequences; the coverage pin is green and non-vacuous. Full suite green (18/18), CI 8/8 onf765890. Phase-6b micro-debt fully paid. Yours to land.— Surveyor