Repository navigation
test(runtime): add a readiness census that pins every tui-idle verdict - #24336
Conversation
Replays every recorded agent PTY transcript frame by frame through a real runtime pane (agent-known and agent-unknown, clocked and clockless) and a synthetic evidence matrix for all 43 TuiAgents, and compares each verdict and tui-idle wait outcome to committed run-length-encoded baselines. Refs STA-9098
A census that read TUI_IDLE_QUIESCENCE_MS would move with it; fixed 2999/3000 ms reads and a fixed 2000 ms poll step make a changed window show as changed verdicts. Refs STA-9098
|
| vi.setSystemTime(at) | ||
| let painted: Promise<void> = Promise.resolve() | ||
| runtime.onPtyData(TRANSCRIPT_PANE_PTY_ID, chunk, at, chunk.length, false, (completion) => { | ||
| painted = completion |
There was a problem hiding this comment.
Recorded timing is lost The catalog retains chunk lengths but drops their timestamps, and this replay spaces every chunk 50 ms apart. The timed Codex sleep recording has a gap of more than three seconds between chunks, so the next
now verdict is measured as if only 50 ms had passed. This limits the baseline's ability to catch readiness changes across real quiet periods. Use the recorded offsets when available.
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. 🧰 Additional context used📚 Code guidelines (1)No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (227)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughAdds a readiness-census harness that records clocked and clockless readiness and wait results. It adds synthetic cases for configured agents, transcript replay across agent and unknown panes, baseline comparison utilities, and stored expected observations. The replay tests run in six shards, and the fixtures record results across title, status, screen, foreground, and transcript states. Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to This change adds test coverage and recorded baselines for terminal-readiness decisions and does not alter production behavior. No blocking risk was found; it is ready to merge after normal CI. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 46.15% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 39 functions across 27 files. (214 skipped: 214 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: a0ffd304-4863-4290-a450-ac14ac17e089
📒 Files selected for processing (151)
src/main/runtime/__fixtures__/readiness-census/synthetic--aider.jsonsrc/main/runtime/__fixtures__/readiness-census/synthetic--amp.jsonsrc/main/runtime/__fixtures__/readiness-census/synthetic--ante.jsonsrc/main/runtime/__fixtures__/readiness-census/synthetic--antigravity.jsonsrc/main/runtime/__fixtures__/readiness-census/synthetic--aug.jsonsrc/main/runtime/__fixtures__/readiness-census/synthetic--autohand.jsonsrc/main/runtime/__fixtures__/readiness-census/synthetic--claude-agent-teams.jsonsrc/main/runtime/__fixtures__/readiness-census/synthetic--claude.jsonsrc/main/runtime/__fixtures__/readiness-census/synthetic--cline.jsonsrc/main/runtime/__fixtures__/readiness-census/synthetic--codebuddy.jsonsrc/main/runtime/__fixtures__/readiness-census/synthetic--codebuff.jsonsrc/main/runtime/__fixtures__/readiness-census/synthetic--codex.jsonsrc/main/runtime/__fixtures__/readiness-census/synthetic--command-code.jsonsrc/main/runtime/__fixtures__/readiness-census/synthetic--continue.jsonsrc/main/runtime/__fixtures__/readiness-census/synthetic--copilot.jsonsrc/main/runtime/__fixtures__/readiness-census/synthetic--crush.jsonsrc/main/runtime/__fixtures__/readiness-census/synthetic--cursor.jsonsrc/main/runtime/__fixtures__/readiness-census/synthetic--devin.jsonsrc/main/runtime/__fixtures__/readiness-census/synthetic--droid.jsonsrc/main/runtime/__fixtures__/readiness-census/synthetic--dsh.jsonsrc/main/runtime/__fixtures__/readiness-census/synthetic--freebuff.jsonsrc/main/runtime/__fixtures__/readiness-census/synthetic--gemini.jsonsrc/main/runtime/__fixtures__/readiness-census/synthetic--goose.jsonsrc/main/runtime/__fixtures__/readiness-census/synthetic--grok.jsonsrc/main/runtime/__fixtures__/readiness-census/synthetic--hermes.jsonsrc/main/runtime/__fixtures__/readiness-census/synthetic--kilo.jsonsrc/main/runtime/__fixtures__/readiness-census/synthetic--kimi.jsonsrc/main/runtime/__fixtures__/readiness-census/synthetic--kiro.jsonsrc/main/runtime/__fixtures__/readiness-census/synthetic--mimo-code.jsonsrc/main/runtime/__fixtures__/readiness-census/synthetic--mistral-vibe.jsonsrc/main/runtime/__fixtures__/readiness-census/synthetic--muse.jsonsrc/main/runtime/__fixtures__/readiness-census/synthetic--omp.jsonsrc/main/runtime/__fixtures__/readiness-census/synthetic--openclaude.jsonsrc/main/runtime/__fixtures__/readiness-census/synthetic--openclaw.jsonsrc/main/runtime/__fixtures__/readiness-census/synthetic--opencode.jsonsrc/main/runtime/__fixtures__/readiness-census/synthetic--opencode2.jsonsrc/main/runtime/__fixtures__/readiness-census/synthetic--pi.jsonsrc/main/runtime/__fixtures__/readiness-census/synthetic--prime-agent.jsonsrc/main/runtime/__fixtures__/readiness-census/synthetic--qoder.jsonsrc/main/runtime/__fixtures__/readiness-census/synthetic--qwen-code.jsonsrc/main/runtime/__fixtures__/readiness-census/synthetic--rovo.jsonsrc/main/runtime/__fixtures__/readiness-census/synthetic--trae.jsonsrc/main/runtime/__fixtures__/readiness-census/synthetic--zcode.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--antigravity-1-2-14-busy-streaming.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--antigravity-1-2-14-busy-thinking.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--antigravity-1-2-14-command-palette.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--antigravity-1-2-14-draft.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--antigravity-1-2-14-model-picker.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--antigravity-1-2-14-picker-dismissed.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--antigravity-1-2-14-ready-80x24.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--antigravity-1-2-14-ready-accept-edits.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--antigravity-1-2-14-ready-plan.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--antigravity-1-2-14-ready.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--antigravity-1-2-14-trust-dialog.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--antigravity-1-2-14-turn-ended.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--antigravity-busy-mid-turn.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--antigravity-busy-turn-ended.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--antigravity-dialog-command-palette.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--antigravity-dialog-dismissed.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--antigravity-dialog-model-picker.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--antigravity-dialog-trust-workspace.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--antigravity-ready-account-info-hidden.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--antigravity-ready-api-key-gemini-model.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--claude-dialog-trust-workspace-answered.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--claude-dialog-trust-workspace-narrow.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--claude-dialog-trust-workspace.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--cline-3-0-65-win32-startup.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--cline-3-0-66-busy-streaming.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--cline-3-0-66-draft.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--cline-3-0-66-permission.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--cline-3-0-66-promo.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--cline-3-0-66-ready-80x24.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--cline-3-0-66-ready-plan.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--cline-3-0-66-ready.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--cline-3-0-66-slash-menu.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--cline-3-0-66-turn-ended.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--codex-0-150-1-turn.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--codex-0-155-1-timed-turn.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--codex-0-157-1-timed-sleep-turn.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--codex-0-157-1-update-dialog.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--codex-0-158-0-approval.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--codex-0-158-0-timed-turn.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--codex-0-158-0-trustprompt.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--codex-0157-config-override-embedded-warning.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--codex-0157-effort-override-embedded-warning.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--codex-0157-fresh-home-daemon-install.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--codex-0157-hooks-review-dialog.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--codex-0157-model-retired-dialog.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--codex-0157-no-daemon-effort-override.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--codex-0157-plain-ready.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--codex-0157-update-available-dialog.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--codex-0158-fresh-home-greeting.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--codex-0158-hooks-review-dialog.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--codex-0158-model-announcement-dialog.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--codex-0158-model-retired-dialog.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--codex-0158-update-available-dialog.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--cursor-agent-approval-prompt.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--cursor-agent-idle-after-approval.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--cursor-agent-long-tool-call.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--daemon--less.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--daemon--nano.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--daemon--opencode-run.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--daemon--opencode.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--daemon--vim.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--dsh-tui-ready-no-key.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--freebuff-lifecycle.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--freebuff-login.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--freebuff-ready.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--freebuff-trust.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--grok--inline-startup.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--grok--startup.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--hermes-tui-ready.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--muse-empty-folder-ready.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--omp-native-title-win32.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--prime-agent-0-9-5-ready.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--prime-agent-0-9-5-turn.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--prime-agent-0-9-8-busy-streaming.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--prime-agent-0-9-8-draft.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--prime-agent-0-9-8-ready-80x24.jsonsrc/main/runtime/__fixtures__/readiness-census/[email protected]src/main/runtime/__fixtures__/readiness-census/[email protected]src/main/runtime/__fixtures__/readiness-census/transcript--prime-agent-0-9-8-ready.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--prime-agent-0-9-8-slash-menu.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--prime-agent-0-9-8-tool-turn.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--prime-agent-0-9-8-trace-question.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--prime-agent-0-9-8-turn-ended.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--qoder-no-account.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--qoder-ready.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--qoder-trust-dialog.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--zcode-composer-ready.jsonsrc/main/runtime/__fixtures__/readiness-census/transcript--zcode-missing-tui.jsonsrc/main/runtime/agent-transcript-replay-test-harness.tssrc/main/runtime/readiness-census-antigravity.test.tssrc/main/runtime/readiness-census-baseline.tssrc/main/runtime/readiness-census-claude-cursor-qoder.test.tssrc/main/runtime/readiness-census-cline.test.tssrc/main/runtime/readiness-census-codex.test.tssrc/main/runtime/readiness-census-long-startups.test.tssrc/main/runtime/readiness-census-others.test.tssrc/main/runtime/readiness-census-pane-probe.tssrc/main/runtime/readiness-census-prime-agent-question-agent.test.tssrc/main/runtime/readiness-census-prime-agent-question-unknown.test.tssrc/main/runtime/readiness-census-prime-agent.test.tssrc/main/runtime/readiness-census-synthetic-a-to-k.test.tssrc/main/runtime/readiness-census-synthetic-l-to-z.test.tssrc/main/runtime/readiness-census-synthetic-matrix.tssrc/main/runtime/readiness-census-synthetic-suite.tssrc/main/runtime/readiness-census-transcript-catalog.tssrc/main/runtime/readiness-census-transcript-replay.tssrc/main/runtime/readiness-census-transcript-suite.tssrc/main/runtime/readiness-census.test.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.
| } | ||
| let at = BASE_TIME_MS | ||
| vi.setSystemTime(at) | ||
| const { runtime, handle } = await createTranscriptPane(options) |
There was a problem hiding this comment.
🚀 Performance & Scalability | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
#!/bin/bash
# Check whether the worktree-change invalidator registry is global and has an unregister path.
rg -nP -C4 '\bregisterWorktreeChangeInvalidator\s*\(' --type=ts
rg -nP -C3 '\bregisterDetectedWorktreeScanInvalidation\s*\(' --type=ts
# Look for a dispose or shutdown API on the runtime classes.
rg -nP -C2 '^\s*(public\s+)?(dispose|shutdown|destroy|close)\s*\(' src/main/runtime --type=tsRepository: stablyai/orca
Length of output: 11944
Dispose each synthetic pane after the clockless read.
runSyntheticCase creates a new OrcaRuntimeService and transcript pane for every case. The runtime registers an instance callback in the module-global worktreeChangeInvalidators set and does not retain the unregister function. The pane and runtime therefore remain reachable after the case completes. Add cleanup in a finally block if the returned handle provides a teardown method. Otherwise, add an unregister or disposal path before running this matrix at scale.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Test-only safety net for the STA-9098 readiness-rule rewrite. I read the full diff, replayed the relevant runtime code paths, and ran the census locally.
readiness-census-pane-probe.ts—evaluatePaneVerdictreproduces the leaf verdict exactly asruntime-terminal-wait.tsdoes (buildTerminalWaitText+leafTuiIdleEvidence), whileprobePaneWaitdrives the realwaitForTerminal, so both the synchronous verdict and the wait outcome are pinned.asClocklessPanemutates the live leaf/pty clocks in place and restores them infinally, which is the only way the wait re-reads them.readiness-census-baseline.ts— RLE encode/decode anddescribeCensusDiffare exact (no loose assertions); a missing or malformed baseline fails, andUPDATE_READINESS_CENSUS=1is the only write path.- Synthetic matrix — 43 agents crossed over title × first-party status, then screen trust × foreground under the open-lane titles, each read clocked and clockless. The
\x1b]9999;{state,agentType}OSC is accepted by the runtime (baselines show status-driven verdicts), so the status lanes are genuinely exercised. - Transcript catalog/replay — literal
FIXTURE_NAMES, per-recording grid from.meta.json, and recorded chunk boundaries from.timing.jsonfor the timed codex fixtures; each recording replayed agent-known and agent-unknown. readiness-census.test.ts— coverage invariants (every recording replayed exactly once, no orphan baselines) plus encoding unit tests.agent-transcript-replay-test-harness.ts—splitIntoChunksexported assplitTranscriptIntoChunks; the only change to existing code.
Verification: pnpm test src/main/runtime/readiness-census passes locally on Linux (136 tests, ~79 s), a second run of both synthetic suites passes (43 tests), and the working tree stays clean. The Linux run reproduced the committed macOS baselines, confirming the darwin pin and the fake-timer scoping hold. Combined with the mutation evidence in the PR description, the baselines are a real regression guard rather than a tautology.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
…sible waits - Read each verdict through the runtime's own settle seam (evaluateTuiIdleForLeaf) instead of re-wiring evaluateTuiIdle/leafTuiIdleEvidence/buildTerminalWaitText, so the census is coupled to one runtime method, not to the module STA-9098 rewrites. - Let the runtime finish each chunk (one macrotask turn) before reading. The old read raced work chained on the paint, so 14 frames pinned a microtask-ordering artefact. - Record when a wait settles (@start vs @poll), not just its outcome. - Exit each pane's PTY after reading it so its emulator is freed. - Replace the hand-grouped families, literal fixture list and per-pane split flag with a directory-scanned catalog, one baseline per replayed pane, and size-balanced shards. - Run the synthetic matrix in one file; it takes about 2 s.
…e in the census matrix Blocked detection is position-ordered (design doc 11.5): the later of a blocker and a ready anchor wins. The matrix now paints a workspace-trust dialog after, and before, each agent's ready screen under every title, so a rule engine that loses that ordering fails per agent.
The anti-slop lint rejects Reflect.get on parsed input.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Incremental review of the delta since the prior pullfrog review (d1003b1d10): the census harness refactor, the sharding, and the dialog-order matrix additions. The pinned baselines and the mutation evidence are unchanged.
- Verdict read through the runtime seam —
readiness-census-pane-probe.tsno longer hand-assemblesbuildTerminalWaitText+leafTuiIdleEvidence;readVerdictcallsevaluateTuiIdleForLeaf, the same protected methodRuntimeTerminalWait.evaluateLeafuses (orca-runtime-resolve-exit-waiters.ts:124), so the census tracks the waiter's ranking rather than mirroring it. - Shared pane-driving helpers —
feedPane(fake time,onPtyDatacompletion, one macrotask turn),closePane, andobservePane(now/edge/quiet + wait + clockless) replace the per-suite copies, andprobeWaitnow distinguishes@startfrom@poll. - Environment pinned once —
useCensusEnvironmentowns thedarwinplatform pin and theDate/setIntervalfake-timer scope for both transcript and synthetic suites. - Matrix gains dialog ordering —
dialog-last/ready-lastscreen variants cross the trust dialog against every title, withCENSUS_AGENTSrelocated here. - Catalog scans instead of listing —
FIXTURE_NAMESis replaced by a directory scan with prefix/short-name recorders; coverage now keys on per-pane subjects (@agent/@unknown) sharded across six workers by frame count. - Consolidated suites — nine family files plus
readiness-census-transcript-replay.tscollapse into sixtranscripts-N.test.tsshards and one synthetic file.
Verification: pnpm test src/main/runtime/readiness-census passes on Linux (8 files, 218 tests, ~62 s), reproducing the committed baselines, which confirms the refactored verdict read and the new sharding are behavior-preserving.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

ELI5
Orca decides whether an agent's terminal is ready for input, busy, or waiting on the user. That decision is spread over many rules with special cases per agent. We plan to replace all of it with one rule engine (Linear STA-9098), and the replacement must not change any decision. This PR adds the safety net: a test that writes down every decision Orca makes today, for every recorded agent screen and a grid of made-up situations for every agent, and fails if any of them changes.
What Changed
Test-only. Nothing users see changes.
terminal wait --for tui-idlewould see:@start) or on its first poll (@poll);Each recording is replayed twice: once with the agent known, once as an agent-unknown pane. Each chunk is read only after the runtime has finished handling it, as a caller would. The verdict is read through the same runtime method every tui-idle waiter settles on, not by re-assembling the rule functions, so the rule rewrite can replace those freely.
src/main/runtime/__fixtures__/readiness-census/, one per replayed pane (transcript--<recording>@agent.json/@unknown.json) or agent. Frames are run-length encoded, for example:UPDATE_READINESS_CENSUS=1 pnpm test src/main/runtime/readiness-census. Recordings are found by scanning the fixture folders; a recording whose name matches no known agent fails until it is given one inreadiness-census-transcript-catalog.ts, and one with no baseline fails until it is recorded.splitTranscriptIntoChunksinagent-transcript-replay-test-harness.tsis now exported and has a clearer name. That lets the census send the harness's own chunks into a runtime pane instead of reimplementing the split.Why
The refactor's whole promise is "no behaviour change". Today's behaviour depends on the order in which rules are checked. For example, an explicit idle title outranks the agent's own "working" status, and a Codex header only counts once the screen has gone quiet. A recorded per-frame baseline is the only practical way to show that a rewrite kept every one of those orderings.
Alternatives considered:
The census instead drives the real
OrcaRuntimeService, with a faked clock and a faked poll interval.Checks that the census catches real changes. Each mutation was applied, then reverted:
evaluateTuiIdle: 27 tests failed.cursor-agent-approval-prompt, frame 10, blocked becomes ready).wait=ready@startbecomesready@poll).Linked Issue
Refs STA-9098
Visual Proof
N/A: test-only change, with no UI or behaviour change.
Testing
On macOS:
pnpm test src/main/runtime/readiness-censuspassed 3 times in a row (218 tests, about 21 s wall time).pnpm tc:node, oxlint, the anti-slop lint andpnpm run check:code-quality:changedpass.process.platformis pinned to darwin, so the verdicts do not depend on the CI host.Not covered:
pty:handles. Every census pane is a leaf handle.AI Disclosure
Review
Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
Cross-platform: test-only, and the platform is pinned. SSH, mobile and wire compatibility: no change.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)