You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a standing duty to the orchestrator supervision loop: whenever the orchestrator notices a fleet-owned PR is CONFLICTING (GitHub mergeStateStatus DIRTY / mergeable=CONFLICTING), it must automatically fix the conflict — not just report the PR as parked-but-conflicted.
Requested by Nick on 2026-07-06 after PR #38 (AgentWrapper#2357 backport) sat conflicted twice: once from an unrelated merge, once after he merged #37 into overlapping sensitive files. Each time it needed a manual "please rebase" nudge. He wants the orchestrator to self-heal these.
Behavior to encode
On each supervision loop, for every PR the fleet owns:
Dispatch (or perform) a rebase onto current origin/main and hand-resolve the conflicts, preserving all intended changesets (never drop one side to make it apply).
Re-verify — mandatory, because a resolved conflict is new code: full local gates (cd backend && go build ./... && go vet ./... && go test ./...) + frontend typecheck where relevant; push --force-with-lease; confirm CI returns green and mergeStateStatus is CLEAN/UNSTABLE.
Re-request the cross-family review on the re-resolved diff (the prior review verdict is stale once the merge is redone).
Re-park merge-ready for the human. Conflict auto-resolution NEVER implies auto-merge — especially on sensitive paths (daemon/**, session_manager/**, lifecycle/**), which always park for a human regardless.
Guardrails (must be in the policy text, not just the happy path)
Scope to fleet-owned PRs only; skip anything the orchestrator can't cleanly attribute to a session/worktree it manages.
A "preserve both sides" resolution is a judgment call — it must go back through gates + review, never be declared ready on the rebase alone.
If the conflict can't be resolved confidently (semantic conflict, not just textual), park it for the human with a written note rather than force a dubious resolution — a parked item with a reason is a success state (per the two hard lines).
Orchestrator supervision-loop policy (in agent-instructions/ sources) gains a "conflict auto-resolution" duty with the behavior + guardrails above
npm run agents regenerated so the duty appears in CLAUDE.md; npm run agents:check clean
The duty explicitly preserves the park-not-merge rule and the sensitive-path park list
Verified: point the orchestrator at a deliberately-conflicted fleet PR and confirm it rebases, re-gates, re-reviews, and re-parks without merging
Context / pointers
Orchestrator standing policy today: CLAUDE.md "Orchestrator standing policy" → "Always-running supervision" (generated from agent-instructions sources; edit the sources, not CLAUDE.md)
Live-session interim: the current orchestrator (agent-orchestrator-1) was given this as a runtime instruction on 2026-07-06; this ticket makes it survive restarts
Goal
Add a standing duty to the orchestrator supervision loop: whenever the orchestrator notices a fleet-owned PR is CONFLICTING (GitHub
mergeStateStatusDIRTY /mergeable=CONFLICTING), it must automatically fix the conflict — not just report the PR as parked-but-conflicted.Requested by Nick on 2026-07-06 after PR #38 (AgentWrapper#2357 backport) sat conflicted twice: once from an unrelated merge, once after he merged #37 into overlapping sensitive files. Each time it needed a manual "please rebase" nudge. He wants the orchestrator to self-heal these.
Behavior to encode
On each supervision loop, for every PR the fleet owns:
gh pr view <n> --json mergeable,mergeStateStatus→ CONFLICTING / DIRTY).origin/mainand hand-resolve the conflicts, preserving all intended changesets (never drop one side to make it apply).cd backend && go build ./... && go vet ./... && go test ./...) + frontend typecheck where relevant;push --force-with-lease; confirm CI returns green andmergeStateStatusis CLEAN/UNSTABLE.daemon/**,session_manager/**,lifecycle/**), which always park for a human regardless.Guardrails (must be in the policy text, not just the happy path)
Acceptance criteria
agent-instructions/sources) gains a "conflict auto-resolution" duty with the behavior + guardrails abovenpm run agentsregenerated so the duty appears in CLAUDE.md;npm run agents:checkcleanContext / pointers
agent-orchestrator-1) was given this as a runtime instruction on 2026-07-06; this ticket makes it survive restarts