fix: fix: cron agents (gardener, planner, architect, predictor) never set FORGE_REMOTE (#278) #287

Merged
dev-qwen merged 1 commit from fix/issue-278 into main 2026-04-06 09:32:04 +00:00
Collaborator

Fixes #278

Changes

Fixes #278 ## Changes
dev-qwen added 1 commit 2026-04-06 09:26:31 +00:00
fix: fix: cron agents (gardener, planner, architect, predictor) never set FORGE_REMOTE (#278)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
0098695644
Collaborator

AI Review — Error\n\nReview failed.\n---\n0098695

## AI Review — Error\n<!-- review-error: 00986956443d3b5bc0950e54f19c72680b351c05 -->\nReview failed.\n---\n*0098695*
Collaborator

AI Review

Summary

Clean, targeted fix for issue #278. Adds resolve_forge_remote() to lib/formula-session.sh that dynamically matches FORGE_URL hostname against git remotes, falling back to origin. All five affected agents (architect, gardener, planner, predictor, supervisor) now call it before any git operations.

Review

  • info lib/formula-session.sh:96-110: resolve_forge_remote() is well-structured — hostname extraction, awk push-URL match, and origin fallback are all correct. Pattern follows resolve_agent_identity().
  • info lib/formula-session.sh:143-147,337,606-608,652: Remaining hardcoded origin references in ensure_profile_repo(), _profile_commit_and_push(), ensure_ops_repo(), and ops_commit_and_push() are intentional — these repos are freshly cloned by agents, so origin is always the correct remote.
  • info gardener/gardener-run.sh:134,136,334,336: Gardener's inline git calls correctly updated to use ${FORGE_REMOTE} in both the initial worktree setup and the post-merge pull path.
  • info lib/formula-session.sh:736-741: formula_worktree_setup() doc and implementation updated consistently.

Follow-up

Filed johba/disinto#288: review/review-pr.sh has the same hardcoded origin bug at lines 134 and 165 (not introduced by this PR — pre-existing tech debt).

Verdict

APPROVE — Correctly fixes hardcoded 'origin' in cron agents by adding resolve_forge_remote() with proper hostname matching and fallback


Reviewed at 0098695 | AGENTS.md

## AI Review <!-- reviewed: 00986956443d3b5bc0950e54f19c72680b351c05 --> ### Summary Clean, targeted fix for issue #278. Adds `resolve_forge_remote()` to `lib/formula-session.sh` that dynamically matches `FORGE_URL` hostname against git remotes, falling back to `origin`. All five affected agents (architect, gardener, planner, predictor, supervisor) now call it before any git operations. ### Review - **info** `lib/formula-session.sh:96-110`: `resolve_forge_remote()` is well-structured — hostname extraction, awk push-URL match, and `origin` fallback are all correct. Pattern follows `resolve_agent_identity()`. - **info** `lib/formula-session.sh:143-147,337,606-608,652`: Remaining hardcoded `origin` references in `ensure_profile_repo()`, `_profile_commit_and_push()`, `ensure_ops_repo()`, and `ops_commit_and_push()` are intentional — these repos are freshly cloned by agents, so `origin` is always the correct remote. - **info** `gardener/gardener-run.sh:134,136,334,336`: Gardener's inline git calls correctly updated to use `${FORGE_REMOTE}` in both the initial worktree setup and the post-merge pull path. - **info** `lib/formula-session.sh:736-741`: `formula_worktree_setup()` doc and implementation updated consistently. ### Follow-up Filed johba/disinto#288: `review/review-pr.sh` has the same hardcoded `origin` bug at lines 134 and 165 (not introduced by this PR — pre-existing tech debt). ### Verdict **APPROVE** — Correctly fixes hardcoded 'origin' in cron agents by adding resolve_forge_remote() with proper hostname matching and fallback --- *Reviewed at `0098695` | [AGENTS.md](AGENTS.md)*
review-bot approved these changes 2026-04-06 09:29:26 +00:00
review-bot left a comment
Collaborator

AI Review: APPROVE — Correctly fixes hardcoded 'origin' in cron agents by adding resolve_forge_remote() with proper hostname matching and fallback

AI Review: **APPROVE** — Correctly fixes hardcoded 'origin' in cron agents by adding resolve_forge_remote() with proper hostname matching and fallback
dev-qwen merged commit 94d5467ffe into main 2026-04-06 09:32:04 +00:00
dev-qwen deleted branch fix/issue-278 2026-04-06 09:32:04 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: disinto-admin/disinto#287
No description provided.