Skip to content

Daemon: retry goal-branch push after fetch+rebase on non-fast-forward, and capture git stderr in the failure#1797

Open
interactor-pm-service[bot] wants to merge 1 commit into
mainfrom
goal/daemon-retry-goal-branch-push-after-fetch-rebase-on-non-fast
Open

Daemon: retry goal-branch push after fetch+rebase on non-fast-forward, and capture git stderr in the failure#1797
interactor-pm-service[bot] wants to merge 1 commit into
mainfrom
goal/daemon-retry-goal-branch-push-after-fetch-rebase-on-non-fast

Conversation

@interactor-pm-service

Copy link
Copy Markdown
Contributor

Integration PR for this goal — its tasks commit onto this branch (one PR per goal). Opened automatically by the engine on first push; left as a draft until the goal completes.

…rward + capture git stderr (T#1375)

Two fixes for the T#1375 incident, where a finished run was thrown into a
run_failure pause because the daemon's final goal-branch push hit a
non-fast-forward (a sibling run advanced the shared goal branch concurrently),
and the pause carried no git error text.

FIX 1 — retry after fetch+rebase (both daemon variants): on a non-fast-forward
push rejection, `git fetch origin <branch>` then `git rebase FETCH_HEAD` (rebase,
to keep the integration branch linear) and retry the push, bounded to 3 attempts.
A rebase conflict aborts (`git rebase --abort`) and fails cleanly — never leaving
a half-applied rebase for the next task's hard-reset. A non-retryable push error
(auth, protected branch) fails fast with the real error. Push-before-report stays
load-bearing: the run only reports success by actually publishing the commits.

FIX 2 — capture git stderr: push now pipes stderr and the thrown Error carries it
verbatim. The failed report keeps `error` human-legible (CLAUDE.md rule #4) while
the verbatim git text rides in observations → the run_failure pause's
detail.observations. Replaces the bare "integration-branch push failed" literal.

GOAL TIMELINE (server): new `push_failed` GoalLifecycleEvent action; the report
route records it (best-effort, gated on a goal task + the daemon's push-failure
marker) so the incident reaches the goal's append-only spine — a bare run_failure
writes none.

No PM Agent config update needed: this changes no user-facing tools/entities/workflows.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@psdjungpulzze psdjungpulzze marked this pull request as ready for review July 4, 2026 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant