Skip to content

Commit 0d71a59

Browse files
fix(控制面): stop JSON doctor/status/next from bare-failing at 5s (#61)
* fix(控制面): scale JSON observation deadline by git-scope fan-out JSON doctor/status/next no longer share a flat 5s ReadBudget cliff. The deadline starts at 5s and grows 0.4s per additional git scope, capped at 45s. If the ceiling is still hit, completed FAILs stay visible with a timeout finding and partial=true; next stays needs_repair and never reports ready. Co-authored-by: Dandre Yang <Dandre126@users.noreply.github.com> * test(控制面): prove a 7s fan-out fits the scaled JSON budget The flat 5s ReadBudget still expires at 5.34s. After fan-out scaling for 58 git scopes, a 7s observation remains inside the deadline with more than 10s of margin. Co-authored-by: Dandre Yang <Dandre126@users.noreply.github.com> * fix(控制面): start JSON doctor/status/next at the 45s ceiling Mac verification dies at a stable ~5.35s DEADLINE_EXCEEDED. Scaling after config load still created those budgets on the 5s Bridge cliff. Create the fan-out commands at 45s from the first tick, and if a deadline still escapes, emit doctor/status/next JSON with code=DEADLINE_EXCEEDED and partial=true instead of kind=error. Co-authored-by: Dandre Yang <Dandre126@users.noreply.github.com> * fix(控制面): convert leftover JSON DEADLINE to structured timeout Mac verification still prints {kind:error, command:status} when a DEADLINE_EXCEEDED escapes past doctor/status_rows. Convert that at the JSON error printer (match command or func) and start the fan-out budget from func when dest=command is missing. Keep _PROTOCOL_DEADLINE_SECONDS as the Bridge 5s default, not the JSON cap. Co-authored-by: Dandre Yang <Dandre126@users.noreply.github.com> * test(控制面): lock the five-run Mac JSON status baseline Independent verification: five consecutive JSON status walls at 5.35–5.41s are 0/5 DEADLINE on the 5s protocol budget. Prove those same samples all succeed on the 45s JSON budget, and that a timeout still returns structured partial plus completed FAILs — never a bare DEADLINE_EXCEEDED envelope. Co-authored-by: Dandre Yang <Dandre126@users.noreply.github.com> * fix(控制面): keep leftover timeout honest and fail JSON status Leftover DEADLINE now reuses stashed doctor FAILs and status rows, and next keeps a non-empty doctor repair command. next_commands maps an escaping ReadLimitError to that repair instead of []. JSON status deadline partial exits 2; status --all DEADLINE is partial, not a missing workspace. Docs no longer claim Isolated Console attaches the 0.4s/scope fan-out. Co-authored-by: Dandre Yang <Dandre126@users.noreply.github.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Dandre Yang <Dandre126@users.noreply.github.com>
1 parent 85affd0 commit 0d71a59

7 files changed

Lines changed: 1286 additions & 132 deletions

File tree

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,23 @@
22

33
## Unreleased
44

5+
- JSON `doctor` / `status` / `next` no longer share a flat 5s observation
6+
deadline with Bridge. Those commands start at the documented 45s ceiling
7+
(not 5s) so a ~50+ worktree workspace that the text path finishes in ~7s
8+
cannot bare-`DEADLINE_EXCEEDED` at ~5.3s. Locked Mac baseline: five
9+
consecutive JSON `status` walls at 5.35–5.41s are 0/5 on the 5s
10+
protocol budget and must be 5/5 success (or structured partial that
11+
still returns completed FAILs), never a bare `DEADLINE_EXCEEDED`. A
12+
default 5s `ReadBudget` passed into `doctor()` / `status_rows()` still
13+
grows by 0.4s per extra git scope, capped at 45s. Isolated Console
14+
overview still calls unbounded `doctor()`; inspect workers still use
15+
3s/6s process kills and do not attach this budget. If the ceiling is
16+
hit, the JSON `kind` stays `doctor` / `workspace_status` / `next_step`
17+
with `partial: true`, `code: DEADLINE_EXCEEDED`, and completed FAIL
18+
findings or rows; leftover timeout reuses that stash and keeps a
19+
non-empty `doctor` repair command. JSON `status` deadline partial
20+
exits 2, same as `doctor`. It is not a bare `kind=error` with
21+
`command`. `next` stays `needs_repair` (never ready on FAIL).
522
- Attach first-party Skill avatars to OpenCode and Hermes when those host
623
homes already exist (`~/.config/opencode/skills/<skill>`,
724
`~/.hermes/skills/<skill>`). Detection stays fail-closed: absent default

0 commit comments

Comments
 (0)