Repository navigation
feat(server): wake the watcher when an unsettled top-level thread fails - #205
nullStack65 wants to merge 4 commits into
Conversation
On release/native-0.1.10 the pre-commit hook fails on eight unused exports and the pre-push check fails on a scenario typecheck error and a stale agent context budget, so no code change can land without bypassing the hooks. Seven unused exports are used only inside their own module and lose their export. The client setThreadDelegationNudge wrapper has no caller and goes; the server command and its MCP tool stay. The upstream ACP refresh scenario imports rpcClient from scenarios/t3.ts, so the fork's identical helper moves there as upstream has it. The MCP tool list budget takes the measured size after the event subscription and delegation nudge tools landed. Model: claude-opus-5-5 Task: CLO-1066 Agent: claude-code Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Git exports GIT_DIR to hooks. Under pre-push, the replay workspace fixture inherited it, so its git init, config, add and commit ran against the pushing worktree: it committed "initial" onto the branch being pushed and wrote the test identity into the shared repository config. Unset the inherited repository selectors, as the server's VcsProcess already does for its own git calls. Model: claude-opus-5-5 Task: CLO-1066 Agent: claude-code Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A failed top-level thread with no launching thread, including one a person created, told nobody, so a 15-minute fleet watchdog had to find it. A new thread-failed event starts a watcher turn through the existing model alert delivery path. It fires once per failed run, only for an unsettled, unarchived, top-level thread that is not a delegated or side-chat thread and has no live run. Delivery uses next_turn so an idle watcher wakes, keys on the run so a replay is not a second wake, waits five minutes per thread after a delivered wake, and never wakes the watcher about itself. Lane events keep going to the launching thread. Launch and delegation also refuse a provider that is not ready, has discovered no models or is signed out, before any thread or run is created, using one readiness check shared with placement and capabilities. Model: claude-opus-5-5 Task: CLO-1066 Agent: claude-code Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
RESULTReviewer notes only, no verdict (t3code #205, CLO-1066 watcher wake on thread failure)CTO took this PR out of the review queue because of known CI regressions. These are notes from a review that was already running and was asked to stop. This is not a gate record and not a merge verdict. It is a bot result (Claude Opus 5.5, read-only, isolated clone), not human approval. Head
The watcher can't wake itself. It is guarded twice: once when the wake is queued ( Tests at the head: the four touched test files passed 209/209. Not verified: a watcher setting that points at a deleted thread; the usage-limit flood as a live run; whether older peers accept |
The failure wake fired for every failed top-level lane, so the watcher also heard about lanes another thread launched, and the "never Lead" lane-routing test saw five wakes instead of one. A failure wake now needs a thread with no recorded launcher, such as one a person created. Lanes with a launcher keep the lane-ended route to that launcher. A failure the model alert already reports as a usage limit gets no failure wake; it goes only into that limit's one grouped alert or the auto-resume path. A failure wake also waits while the watcher itself is stopped at its own usage limit, through the existing hold, now the exported watcherLimitHold. Drop the bundled provider-readiness change (servedModel, placement evidence, project launch and the orchestrator capabilities report). It was unrelated to the wake and rejected launches on an unregistered provider, which failed the remote delegation tests. Tests cover one usage limit failing several threads (one grouped alert, no per-thread wake), the watcher's own failure (no wake), launcher exclusions and the watcher usage-limit hold. Model: claude-opus-5-5 Task: CLO-1066 Agent: claude-code Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
{
"reviewed_head": "7c1cfb7201c413256dcaa4e98c437ac613394a47",
"reviewer": "Gemini 4 Neon, T3 Code",
"findings": [
{
"id": "R205-1",
"severity": "nit",
"summary": "Idle local watcher with a queued digest is reported as queued by readWatcher, so busyWatcherHold delays a thread-failed next_turn wake up to 10 minutes even though a digest will not start a turn on its own.",
"outcome": "open"
},
{
"id": "R205-2",
"severity": "nit",
"summary": "watcherLimitHold fails open for a remote watcher because t3_thread_read does not expose usageLimited or resetAt (documented and covered by unit test).",
"outcome": "open"
},
{
"id": "R205-3",
"severity": "nit",
"summary": "judgeThread does not apply RECENT_RUN_END_MS to thread-failed (unlike lane-ended); id keys on latestRunId so replays after delivery still dedupe.",
"outcome": "open"
}
]
}Independent bot review —
|
A failed top-level thread with no launching thread, such as one a person created, tells nobody. Today only the 15-minute fleet watchdog finds it. This PR wakes the configured watcher thread (
modelAlertWatcher) when that happens. The watchdog stays as it is.Stacked on #204 (the release-branch hook baseline fix). The first two commits here are #204's. Merge #204 first. This PR's own changes are the top two commits.
Change
ThreadEventAlertsadds athread-failedevent, judged when a run ends. It fires only for a thread that:inbox.origin/inbox.requestedByagent). A lane with a launcher keeps the existinglane-endedroute to that launcher, so a founder-facing watcher still never hears about a lane it did not launch;delegatedFrom) or a side chat;The finding keys on the failed run's id, so replaying the same run is not a second wake. It stops holding once the thread's latest run changes.
ModelAlertReactordeliversthread-failedto the watcher through the existing model-alert outbox, asnext_turn, so an idle watcher starts a turn.watcherLimitHold.docs/operations/watcher-thread.mdand themodelAlertWatchersetting description cover the new event.An earlier revision also bundled a provider-readiness check for launch, delegation and placement. It is removed: it was unrelated, and it failed the remote delegation tests.
Checks
check:changedwith hooks on, with no--no-verify.apps/serversuite.next_turndelivery both local and remote.Deploy: fleet
Model: claude-opus-5-5
Task: CLO-1066
🤖 Generated with Claude Code