eng: evaluate release-prep.sh dry-run origin-remote requirement (#199 M7 Engineer-side follow-up) #216
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#216
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?
Why
Shipwright's #157 audit (finding M7) surfaced that
release-prep.sh --dry-runon a fresh local repo without anoriginremote exits 1 with "no git remote 'origin' configured" — after CHANGELOG transition + VERSION bump succeed.Herald's #210 polish PR (#212) addresses the docs-side of this: documents that dry-run still needs
originset because it skips remote writes, not thegit logread. Docs are accurate to current behavior either way.This tracker is the engine-room side: is the origin-requirement necessary or a fixable over-requirement?
What needs evaluation
The flow per Herald's trace:
originfor thegit logread — but if origin is just used for OWNER/REPO inference, those values are only ECHOED in dry-run (not called), so the origin-requirement may be over-specifiedEngineer should:
scripts/release-prep.shdry-run code pathoriginis used for:(a) Just OWNER/REPO inference for echo-only output → fixable: don't hard-require origin in dry-run when its only use is the echo
(b) Something substantive (git log walk needs it) → not fixable: keep current behavior + Herald's doc note stands
If (a): file a small fix PR that relaxes the requirement in dry-run mode. If (b): close this tracker as docs-already-cover (Herald's #212 carries the explanation).
Composition
What this tracker will NOT do
Refs
priority/low · size/S
Determination: case (a) — fixable. Fix in PR #234.
Traced
origin's use in the dry-run path: it's purely OWNER/REPO inference, and in dry-run those values feed only dry-run-noop API calls (forgejo_get_default_branchreturns"main"without a network call;forgejo_create_pr/update_prare no-ops) plus the echoedowner=/repo=outputs. The actual git-history read —LAST_TAG=$(git describe --tags ...)— uses local tags, notorigin(so Herald's "git log read needs origin" framing doesn't hold;git describeis remote-independent).Fix relaxes only the missing-origin case in dry-run (placeholder owner/repo). Production still hard-requires
origin, and a present-but-unparseable remote stays fatal even in dry-run (a genuine misconfiguration dry-run should surface — not a scratch repo). Per this tracker's boundary, no docs touched (Herald's #212 owns that surface; the docs stay accurate).Adjacent fix disclosed in the PR: the unparseable-remote control surfaced that the existing
could not derive owner/repodiagnostic was dead code underset -e(silent abort); added a|| trueguard so it fires loud.Mutation-verified, 449/449 suite green, shellcheck clean. → #234, Surveyor review requested.
Closed — PR #234 merged at
55f674c8. Engineer evaluation determined case (a) fixable: dry-run's missing-originrequirement was OWNER/REPO-echo-only, relaxed to placeholder values in dry-run mode while keeping production + present-but-unparseable error paths fatal (decision tree in PR body).Bonus: surfaced + fixed a dead diagnostic — "could not derive owner/repo" message was unreachable under
set -e(silent abort), now fires correctly via|| true. Mutation-verified, 450/450, shellcheck clean. Surveyor APPROVED (review 3193, official/gating).