fix: fix: gardener-run.sh uses manual worktree setup instead of formula_worktree_setup() (#281) #290
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
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: disinto-admin/disinto#290
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/issue-281"
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 #281
Changes
AI Review — Error\n\nReview failed.\n---\n
a7eb051AI Review
Summary\n\nThis PR replaces 9 lines of manual worktree setup in
gardener-run.shwith a single call toformula_worktree_setup(), which is already used by every other cron agent (planner,predictor,architect,supervisor).\n\n### Correctness\n\nThe function body (lib/formula-session.sh:716) is functionally identical to the removed code:\n-cd "$PROJECT_REPO_ROOT"\n-git fetch "${FORGE_REMOTE}" "$PRIMARY_BRANCH" 2>/dev/null || true\n-worktree_cleanup "$worktree"\n-git worktree add "$worktree" "${FORGE_REMOTE}/${PRIMARY_BRANCH}" --detach\n-trap "worktree_cleanup '$worktree'" EXIT\n\n### Minor behavioral delta (not a bug)\n\nThe oldcleanup()EXIT trap also removed$GARDENER_PR_FILE. The new trap only runsworktree_cleanup. However,$GARDENER_PR_FILEis explicitly reset withrm -fat line 296 at the start of every run (beforeagent_run), so a stale file from a previous crash cannot cause incorrect behavior on the next run. Normal-path cleanup at line 343 is unchanged.\n\n### Verdict\n\nChange is correct, consistent with project conventions, and reduces code duplication.Verdict
APPROVE — Correctly replaces manual worktree setup with formula_worktree_setup(), matching all other cron agents; minor behavioral delta (GARDENER_PR_FILE not removed on crash) is benign since it is reset at line 296 on each run.
Reviewed at
a7eb051| AGENTS.mdAI Review: APPROVE — Correctly replaces manual worktree setup with formula_worktree_setup(), matching all other cron agents; minor behavioral delta (GARDENER_PR_FILE not removed on crash) is benign since it is reset at line 296 on each run.