Repository navigation
fix(runtime): settle DSH tui-idle on its hook-store done - #26481
Conversation
DSH's managed hook posts to the hook server and never emits OSC 9999, so the dsh-only first-party done lane never fired and tui-idle waits ran to timeout. Give DSH turn-end hook authority through an agent-state-rules file, mark its SessionStart as a session boundary, and drop the dead dsh special case.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (9)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe DSH configuration is added to the bundled agent-state rules with Priority: ➖ Normal Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to DSH post-turn idle readiness appears mergeable after normal checks; the remaining cold-start behavior is a separate issue. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 8 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ELI5
DeepSeek Harness (DSH) tells Orca "I'm done" when it finishes a reply, but Orca was listening for that message in the wrong place. So Orca never believed a DSH pane was ready, and anything waiting on it (worker-start,
terminal wait --for tui-idle) timed out. Orca now listens where DSH actually reports.What Changed
tui-idle. Supervised DSH workers failed atagent_readinesswithtimeout, even after DSH's hook had posted Stop/done.donein the hook server's store settles the wait (about 2 s after the turn ends in a live run).Mechanism:
profile.hooks). DSH had no rule file, so it was treated as identity-only.agent-state-rules/dsh.jsonwithprofile.hooks: "turn-end": a hookdonesettles the wait, while a stale or working row leaves it to the other checks.authoritative: approval pauses, and possibly interrupts, post no hook, so aworkingrow could otherwise hold the pane forever.SessionStartrow is now marked as a session boundary. DSH fires it on create, resume, clear and compact, and it must not count as a finished turn.hasFreshDoneFirstPartyStatus. It now only handles the agent-agnostic session-boundary case.Why
Linked Issue
Fixes #25257
Visual Proof
N/A: no UI change. This changes when a readiness wait settles; live evidence is under Testing.
Testing
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Unit tests:
hookAuthority('dsh')assertion, and a check that the rest signal agrees with the lanes.Live, macOS, isolated background dev runtime, dsh 0.2.0-rc.2 / dsh-tui 0.12.0:
donereceived, a 10 sterminal wait --for tui-idletimed out.worker-start --agent dshdelivered its task.pnpm tc:nodeandcheck:code-quality:changedare clean.Not exercised: Linux, Windows, SSH. The change is platform-neutral and the hook store already exists on remote hosts.
Review
Agent skill upstream boundary
Notes
sessionBoundaryis an existing optional field on hook rows, so older clients are unaffected.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)