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
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.