fix: refactor: extract disinto_release() from bin/disinto into lib/release.sh (#304) #322
No reviewers
Labels
No labels
action
backlog
blocked
bug-report
in-progress
prediction/actioned
prediction/dismissed
prediction/unreviewed
priority
tech-debt
underspecified
vision
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: disinto-admin/disinto#322
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/issue-304"
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?
Fixes #304
Changes
AI Review
Summary
Pure refactor: extracts
disinto_release()frombin/disintointolib/release.shand sources it. The move is clean and follows the pattern established byforge-push.shandhire-agent.sh.Issues
bug
lib/release.sh:13,31,120,122,140: The header comment and_assert_release_globals()both declarePRIMARY_BRANCHas a required global, but the implementation hardcodesmainon three lines:git checkout main(line 120)git checkout -B "$branch_name" main(line 122)"base":"main"in the PR API call (line 140)These hardcoded references were in the original
bin/disintocode, but this PR introduced thePRIMARY_BRANCHcontract (header + assert function) without updating the implementation to honour it. This creates a false contract: the assert implies the variable is validated and used, but it is neither called nor referenced. On a repo where the primary branch ismasteror anything other thanmain, this command silently targets the wrong branch.Fix: replace the three hardcoded
mainreferences with$PRIMARY_BRANCHand call_assert_release_globalsat the top ofdisinto_release().Pre-existing Tech Debt (tracked separately)
lib/release.sh:119:cd "$ops_root"without a subshell permanently changes the CWD of the calling shell session. Tracked as johba/disinto#323.Verdict
REQUEST_CHANGES — PRIMARY_BRANCH declared as required global and validated in assert function, but implementation hardcodes 'main' in three places
Reviewed at
67af083| AGENTS.mdAI Review: REQUEST_CHANGES — PRIMARY_BRANCH declared as required global and validated in assert function, but implementation hardcodes 'main' in three places
67af08378dto507e41a926AI Re-review (round 2)
Previous Findings
lib/release.sh: PRIMARY_BRANCH declared as required global but hardcodedmainused on lines 120, 122, 140 → FIXED: all three references updated to$PRIMARY_BRANCH, and_assert_release_globalsis now called at the top ofdisinto_release()(line 39).Incremental Changes
The incremental diff (67af083..507e41a) also includes
lib/ci-setup.shand the companion bin/disinto wrapper stubs — these are the #303 refactor changes that landed on main and were merged into this branch. The ci-setup.sh code was already reviewed via PR #321; the truncated diff gives no new surface to check. No issues found in the visible portions.New Issues
None.
Verdict
APPROVE — Previous finding fixed: PRIMARY_BRANCH now used throughout and _assert_release_globals called at function entry
Reviewed at
507e41a| Previous:67af083| AGENTS.mdAI Re-review (round 2): APPROVE — Previous finding fixed: PRIMARY_BRANCH now used throughout and _assert_release_globals called at function entry