Skip to content

poteto-mode: Babysit and Shipping wait on T3's PR watch (2.6.1) - #89

Merged
chhoumann merged 4 commits into
mainfrom
feat/88-t3-pr-watch
Nov 21, 2026
Merged

chhoumann merged 4 commits into
mainfrom
feat/88-t3-pr-watch

Conversation

@chhoumann

@chhoumann chhoumann commented Nov 21, 2026 •

Copy link
Copy Markdown
Owner

Why

Babysit and Shipping waited on a PR by looping pstack's watcher inside the turn, in shell calls of up to 540 seconds. T3's watch_pull_request already wakes a thread when a PR's checks, reviews, comments, or conflicts change. A count of the maintainer's sessions found the watcher loop in 3 sessions and watch_pull_request in about 150. One way to wait is simpler. The idea came from @yqecea in #76.

Closes #88

What changed

  • Babysit drive. When the session can call watch_pull_request, it registers the PR and ends the turn. Each wake runs the watcher once with the check-mode flags (--status-only --timeout 120 --max-query-errors 2) and acts on what it shows. When only review settling is left, it runs one round of the loop, because no event wakes the thread when the PR settles.
  • Delegated children never watch and report the wait to the agent that started them, as worker.md says.
  • Shipping step 4. The wait for the next PR's checks after the push goes through watch_pull_request the same way.
  • Merge-queue exception. A run that a merge queue or auto-merge lands keeps step 5's queued watcher loop, since watch_pull_request does not wake on a merge or on merge-queue state.
  • Fallback. Without watch_pull_request, as in a harness or session outside T3, both playbooks keep their loops.
  • Carried in tools/substitutions.json: a new replacement for Babysit's existing watcher rule, and two rules scoped to shipping.md. The forked shipping.md carries the same text, so its fork diff stays at 4 lines.
  • 2.6.1 is a patch: it changes how two playbooks behave and adds no skill, capability, or harness.

Tradeoffs

  • The settle tail keeps one bounded watcher call in the turn. Without it, a PR whose last event was a bot comment would turn ready with no wake.
  • Auto-merge joins the merge queue in the loop exception, for the same reason: no wake on a merge.

Blast Radius

Babysit and Shipping text only. No script, hook, or installer change. Autopilot-full still tells an owner child to babysit in drive and report a wait for a person. Under the new Babysit text that child reports any PR wait, as worker.md already says.

Verification

  • bun tools/generate.mjs --check: 14 generated files current.
  • Sync dry runs at 0b46ec3 all exit 0: pstack 500 unchanged, 16 declared forks, 630 changed lines (same as main); cursor-team-kit 6 unchanged; thermos 5 unchanged.
  • GIT_CONFIG_GLOBAL=/dev/null bun test tests/ --timeout 30000: 589 pass, 63 skip, 0 fail.
  • T3_PSTACK_E2E=1 installer e2e: 21 pass, 0 fail.
  • validate-skills plugins/pstack/skills: ok.
  • The three new or changed keeps its T3 insert entries in tests/sync.test.mjs fail against main's substitutions.json.
  • watch-pr --status-only --timeout 120 --max-query-errors 2 on a real PR prints one status table and exits 0.

Note

Low Risk
Playbook documentation and substitution rules only; workflow semantics change but no auth, installer, or runtime code paths.

Overview
Release 2.6.1 retunes Babysit and Shipping so T3 sessions wait on PRs through watch_pull_request instead of blocking turns on long watch-pr shell loops.

Babysit drive registers the PR with watch_pull_request, ends the turn, and on each wake runs one --status-only watcher pass. Review-settling still uses a single bounded watcher loop when no wake event exists; delegated children neither watch nor loop. Sessions without watch_pull_request keep the prior in-turn loop behavior.

Shipping after step 4 waits for the next PR’s checks the same way; step 5 keeps the queued stack watcher loop when merge queue, auto-merge, or missing watch_pull_request applies, because the watch does not signal merges or queue state.

The behavior is carried in tools/substitutions.json plus matching playbook text and sync tests; version and changelog/docs bumps only—no installer, hooks, or script changes.

Reviewed by Cursor Bugbot for commit 63e6a13. Bugbot is set up for automated code reviews on this repo. Configure here.

When the session can call T3's watch_pull_request, Babysit's drive
registers the PR with it and ends the turn instead of looping the
watcher in 540-second shell calls. Each wake takes one --status-only
snapshot with the check-mode flags, so the watcher's readiness rules
still decide the next step. No event wakes the thread when review
activity settles, so that wait alone takes one round of the loop.
A delegated child never watches and reports the wait, as worker.md
says. Shipping's wait for the next PR's checks after step 4's push
goes the same way. A run that a merge queue or auto-merge lands keeps
step 5's queued watcher loop, since the watch does not wake on a merge
or merge-queue state. Without watch_pull_request both keep their loops.

Babysit's existing watcher rule takes the new replacement. Shipping
gets two rules scoped to shipping.md, and its declared fork carries
the same text, so its own lines still differ from derived upstream by
the 4 it declares.

Refs #88. The idea came from @yqecea in #76.

Testing: the three new or changed "keeps its T3 insert" entries in
tests/sync.test.mjs pass, and fail against main's substitutions.json.
Babysit and Shipping wait on T3's PR watch. A patch release, since it
changes how two playbooks behave and adds no skill, capability, or
harness. README names v2.6.1.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 053e1ae. Configure here.

… delegated children out of the loop

Bugbot on #89: T3's watch does not wake for checks or conflicts already in
place, so drive now takes its first snapshot right after registering. A
delegate_task child cannot call watch_pull_request, so it matched the
fallback loop too; it now neither watches nor loops and reports the wait.
@chhoumann
chhoumann merged commit 33fbd21 into main Nov 21, 2026
12 checks passed
@chhoumann
chhoumann deleted the feat/88-t3-pr-watch branch November 21, 2026 11:51
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.

Babysit and Shipping: wait on T3's PR watch instead of watcher loops

1 participant