Repository navigation
feat(server): detect stale worker turns and notify their parent - #65
Conversation
|
REQUEST_CHANGES
Reviewed |
|
Independent review of PR #65 at I reviewed the exact head against Issue #62. The tests exercise healthy 18-second reasoning gaps, threshold plus 25% confirmation within one tick, open-tool suppression, sleep window resets, immediate provider death/error, per-provider/model/phase thresholds at 20 samples with the healthy-gap floor, the liveness route and schema contract, and exactly one parent message per stale child turn. Router-managed threads are skipped when the existing title marker identifies membership. Accepted caveat: renamed Router threads lose the cheap title marker, so membership may be indeterminate and a duplicate parent notification may be sent. Issue item 7 permits messaging when membership is not cheaply determinable, and the duplicate is harmless. No blocking finding remains. Review target: a173631 |
lukemaj
left a comment
There was a problem hiding this comment.
Independent review at exact head a173631f46d706eb028c25d88f8b40c15fe26c24: no blocking findings. Full criterion assessment and accepted Router title-marker caveat are in the review findings comment. scripts/fork-check.sh --upstream upstream passed locally. This is a review comment, not an approval; GitHub does not allow the PR author to approve their own pull request.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Exact-current-head follow-up review of PR #65 at The only change since the reviewed Router-managed threads are skipped when title markers make membership determinable. Accepted caveat: renamed Router threads may receive a duplicate parent message when membership is not cheaply determinable; Issue item 7 permits that case, and the duplicate is harmless. Reviewed candidate: 1de2ac8 |
lukemaj
left a comment
There was a problem hiding this comment.
Exact-head independent follow-up at 1de2ac84288fb6d25024932935abbc96095e9bbe: no blocking findings. The only change from the prior candidate is module privacy for notifyStaleParent; all prior acceptance findings remain valid. See follow-up findings comment, including the accepted renamed-Router title-marker caveat. This is a review comment, not an approval; GitHub does not permit this PR author account to approve its own PR.
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
A silent
spawn_threadchild currently has no server-side watcher. This adds one in-memory detector alongside the existing stream clock, exposes its stale decision on/api/prism/liveness, and sends one message to the parent per stale child turn.Thresholds use recorded healthy gaps per provider/model/phase, switching from conservative defaults at 20 samples. Open tools and host sleep do not count as model silence. Silence requires a further 25% confirmation window; provider failure flags immediately. Saved samples include archived threads. T3 never cancels or retries a worker, and #56's recorded statistics are unchanged.
Router jobs with recognizable
model-routertitle markers are skipped. Renamed Router threads have no cheap membership marker and may receive a duplicate parent message. The planner accepted this caveat because membership is not cheaply determinable for renamed threads and a duplicate notification is harmless.Closes #62
Proof on
1de2ac84288fb6d25024932935abbc96095e9bbe:cd apps/server && pnpm exec vp test run src/prism src/mcp: 21 files, 159 tests passed.cd packages/contracts && pnpm exec vp test run src/prism.test.ts: 8 tests passed.scripts/fork-check.sh --upstream upstream: passed.pnpm exec tsc --noEmit --pretty false -p apps/server/tsconfig.json: passed, with two existing suggestions.Independent exact-head review found no blocking findings. The reviewer posted the review assessment, and
review/independentissuccesson1de2ac84288fb6d25024932935abbc96095e9bbe.Per planner direction, the fork retains upstream package versions without a per-PR version bump or changelog. Website/SEO impact: none; this changes server agent behavior and no public pages or URLs. No merge, release, or installation is included.
Model: GPT-6-Astra. Harness: Codex in T3 Code.