Time brings a PR branch up to date with its base when it falls behind; a conflict goes to the worker as a revision #123

Closed
opened 2026-10-18 04:50:03 +00:00 by teahubxyz · 4 comments
Owner

Three engine PRs crossed today (#110 behind #116; #121 and #120 behind #110): each one that landed second showed mergeable: false, and the fix was a human re-cutting the branch or hand-merging the files, because neither Time nor the worker can rebase (the worker's hands are write_file, run and open_pr; the Teahub MCP has no update-branch primitive).

  • In land(), when the PR is approved but mergeable is false (or the merge call answers 409), Time updates the branch itself: git_commit-style clone of the head branch, git merge origin/<base> (the PR's base, not always main), push. One commit, authored by Time, message card #N: merge <base>. CI runs again on the new head; landing follows on the next beat as usual.
  • When that merge has conflicts, Time does not guess: it aborts, leaves the branch as it was, and posts the conflicting files and hunks (the <<<<<<< blocks, trimmed) on the card as a review-shaped comment, then treats it like an objection: needs-human label, and /time retry sends the worker back to the branch with those hunks attached as the reviewer's text. The worker's run tool can git merge origin/<base> itself and write_file the resolved files.
  • Tests against World: an approved PR that is unmergeable gets one merge commit and no merge call that tick; a clean merge lands next tick; a conflicting merge posts the hunks and labels needs-human; /time retry then dispatches the worker with the hunks in the review text; nothing happens for a PR that is already mergeable.
  • CHANGELOG line under Added.

DONE: PR open; python3 .github/time/test_time.py passes with the new checks; CI green.

Three engine PRs crossed today (#110 behind #116; #121 and #120 behind #110): each one that landed second showed `mergeable: false`, and the fix was a human re-cutting the branch or hand-merging the files, because neither Time nor the worker can rebase (the worker's hands are write_file, run and open_pr; the Teahub MCP has no update-branch primitive). - In `land()`, when the PR is approved but `mergeable` is false (or the merge call answers 409), Time updates the branch itself: `git_commit`-style clone of the head branch, `git merge origin/<base>` (the PR's base, not always `main`), push. One commit, authored by Time, message `card #N: merge <base>`. CI runs again on the new head; landing follows on the next beat as usual. - When that merge has conflicts, Time does not guess: it aborts, leaves the branch as it was, and posts the conflicting files and hunks (the `<<<<<<<` blocks, trimmed) on the card as a review-shaped comment, then treats it like an objection: `needs-human` label, and `/time retry` sends the worker back to the branch with those hunks attached as the reviewer's text. The worker's `run` tool can `git merge origin/<base>` itself and `write_file` the resolved files. - Tests against `World`: an approved PR that is unmergeable gets one merge commit and no merge call that tick; a clean merge lands next tick; a conflicting merge posts the hunks and labels `needs-human`; `/time retry` then dispatches the worker with the hunks in the review text; nothing happens for a PR that is already mergeable. - CHANGELOG line under Added. DONE: PR open; `python3 .github/time/test_time.py` passes with the new checks; CI green.
teahubxyz added the queued label 2026-10-18 04:50:03 +00:00
time added ready and removed queued labels 2026-10-19 14:10:02 +00:00

⏱️ Time: Claude Sonnet (Anthropic) is working on this now, on branch time/card-123.

⏱️ Time: Claude Sonnet (Anthropic) is working on this now, on branch `time/card-123`. <!-- time {"beat":"dispatched","launched":true,"worker":"anthropic"} -->

⏱️ Time: sonnet opened PR #190 (33 steps, claude-sonnet-5-5). Review and landing follow on the next beat.

⏱️ Time: `sonnet` opened PR #190 (33 steps, claude-sonnet-5-5). Review and landing follow on the next beat. <!-- time {"beat":"dispatched","worker":"anthropic","pr":190,"steps":33,"seat":"sonnet","model":"claude-sonnet-5-5"} -->

⏱️ Time: PR #190 is up for this card. haiku reviewed it on the PR.

⏱️ Time: PR #190 is up for this card. `haiku` reviewed it on the PR. <!-- time {"beat":"pr","pr":190,"launched":false,"seat":"haiku","as":"seat","review":"venice","seats":["haiku"]} -->
time closed this issue 2026-10-19 15:11:37 +00:00

⏱️ Time: approved and green, merged PR #190. Card done.

⏱️ Time: approved and green, merged PR #190. Card done. <!-- time {"beat":"merged","pr":190} -->
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: teahubxyz/time#123