Skip to content

test: add accumulated-workspace terminal typing reproduction - #20934

Merged
Jinwoo-H merged 2 commits into
mainfrom
test/accumulated-terminal-typing
Sep 16, 2026
Merged

Jinwoo-H merged 2 commits into
mainfrom
test/accumulated-terminal-typing

Conversation

@Jinwoo-H

@Jinwoo-H Jinwoo-H commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 18 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1982 $\color{#cf222e}{\Huge{\mathbf{−}}}$​154 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1828
Prod 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​22 $\color{#cf222e}{\Huge{\mathbf{−}}}$​2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​20

ELI5

Reproduce typing stalls with hundreds of saved workspaces and real background terminals, and verify that the measurement itself catches delays. This is benchmark-only machinery; the production fix is separate in #20931.

What Changed

  • Seed a calibrated accumulated renderer fixture: 870 workspaces, 27 repos, 1,410 terminal tabs, 2,000 unified tabs, 857 sleeping records, and 177 statuses, with canonical tab/pane identities and cleanup.
  • Visit real workspaces and distribute sustained PTY producers across retained views. Optional OSC status/title traffic passes through main and production batching; working/waiting transitions exercise notification handling.
  • Schedule keys independently of echo, validate exact characters/sequences/clock ordering, and record driver backlog, PTY arrival, and xterm-buffer observation.
  • Add an injected-stall positive control, UTF-8 byte-rate validation, optional CDP CPU profiles, producer/receipt/census reports, screenshots, and built-artifact fingerprints. The launcher enforces background operation.

Usage and limitations: terminal-typing-benchmark.md.

Why

This workload isolated the repeated notification-label scan fixed in #20931. Three matched runs measured planned-key-to-buffer p90 of 57–90 ms before versus 20–23 ms after; reverting the built output restored the slowdown. After correcting character-based stream pacing to bytes, another pair measured 85 → 24 ms p90 and 341 → 98 ms maximum. All 1,800 keys across nine unprofiled runs arrived and echoed.

This is not an exact captured user profile: selected renderer slices are ~2.16 MB, not the original ~10 MB durable state; editor tabs lack open-file records; native focus, foreground agent-TUI rendering, recovery-record persistence, and live remote topology remain outside this scenario. Buffer polling is not pixel-paint timing. Profiling/direct-IPC controls must not be conflated with acceptance runs. Those limits are documented rather than hidden behind fixture counts.

Linked Issue

Supports https://linear.app/stably/issue/STA-7551/urgent-live-terminal-typing-lag-isolate-input-from-workspace-wide

Visual Proof

Actual hidden Electron renderer after all 200 key echoes. This screenshot verifies the rendered workload, not latency; JSON reports carry the timings.

Benchmark renderer

Testing

  • 14 measurement/fixture/generated-stream unit tests.
  • Hidden Electron injected-120-ms stall control; delayed driver scheduling is charged.
  • Repeated full workload runs, restoration control, final byte-paced before/after pair, and cleanup.
  • Changed-code-quality gate, including casting and type-aware scans.
  • Full typecheck:e2e remains blocked by 217 pre-existing errors on this base; none reference changed files. This is documented, not reported as a passing check.
  • Windows/Linux execution and live SSH/paired scenarios were not run locally.

Review

Draft to review the larger test machinery independently. No src/ production changes and no dependency on #20931: this branch reproduces the old behavior on its base. Benchmark files can be applied to the production-fix branch for before/after validation.

Agent skill upstream boundary

  • Not applicable; no upstream skill code copied.

Checklist

  • Production and benchmark changes are separate.
  • Measurement assumptions and known fidelity gaps are explicit.
  • Background apps remain hidden; screenshots use CDP.
  • CI pending.

@Jinwoo-H
Jinwoo-H marked this pull request as ready for review September 16, 2026 16:32
@coderabbitai

coderabbitai Bot commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 2d20f6d6-a8a8-4be0-a4bc-716e90df6d6b

📥 Commits

Reviewing files that changed from the base of the PR and between 7d6596d and 2cfc0b3.

📒 Files selected for processing (9)
  • tests/e2e/accumulated-workspace-state-builder.ts
  • tests/e2e/accumulated-workspace-state-builder.unit.test.ts
  • tests/e2e/paced-terminal-typing-measurement.ts
  • tests/e2e/paced-terminal-typing.unit.test.ts
  • tests/e2e/spinner-workspace-perf.spec.ts
  • tests/e2e/sustained-agent-typing-load-scripts.unit.test.ts
  • tests/e2e/terminal-multi-workspace-typing-latency.spec.ts
  • tests/e2e/terminal-typing-measurement-control.spec.ts
  • tests/tools/benchmarks/terminal-typing-benchmark.md
💤 Files with no reviewable changes (4)
  • tests/e2e/terminal-typing-measurement-control.spec.ts
  • tests/e2e/spinner-workspace-perf.spec.ts
  • tests/e2e/paced-terminal-typing.unit.test.ts
  • tests/e2e/paced-terminal-typing-measurement.ts
🚧 Files skipped from review as they are similar to previous changes (3)
  • tests/e2e/accumulated-workspace-state-builder.unit.test.ts
  • tests/tools/benchmarks/terminal-typing-benchmark.md
  • tests/e2e/accumulated-workspace-state-builder.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

The pull request expands the multi-workspace typing benchmark. It adds synthetic accumulated-workspace fixtures, status and title traffic, renderer profiling, scale census reporting, and workspace load helpers. It extracts paced typing parsing and measurement validation into a tested module. Load scripts now support byte-paced Unicode streaming, OSC metadata, lifecycle updates, statistics files, and character-attributed arrivals. The launcher exposes additional environment controls, and new documentation describes benchmark operation, metrics, controls, and limits.

Priority: ⬇️ Low

Merge Risk: 🟡 Moderate · up to 2cfc0

Benchmark runs can measure an unintended workload, leave temporary workspaces behind after failures, or lose completed results when an auxiliary statistics file is absent.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 12.82% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 39 functions across 17 files. (1 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely identifies the primary change: adding accumulated-workspace terminal typing reproduction tests.
Description check ✅ Passed The description is detailed and covers the main template sections, including the purpose, changes, rationale, linked issue, visual proof, testing, limitations, review notes, and checklist. The AI Disc…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 12.82% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 39 functions across 17 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: a01bdab5-1d26-4f74-83a4-f750614d100b

📥 Commits

Reviewing files that changed from the base of the PR and between b8d4cde and d0009ac.

📒 Files selected for processing (18)
  • config/scripts/run-multi-workspace-typing-bench.mjs
  • tests/e2e/accumulated-workspace-fixture.ts
  • tests/e2e/accumulated-workspace-profile.ts
  • tests/e2e/accumulated-workspace-state-builder.ts
  • tests/e2e/accumulated-workspace-state-builder.unit.test.ts
  • tests/e2e/accumulated-workspace-status-fixture.ts
  • tests/e2e/accumulated-workspace-title-fixture.ts
  • tests/e2e/paced-terminal-typing-measurement.ts
  • tests/e2e/paced-terminal-typing.ts
  • tests/e2e/paced-terminal-typing.unit.test.ts
  • tests/e2e/sustained-agent-typing-load-scripts.ts
  • tests/e2e/sustained-agent-typing-load-scripts.unit.test.ts
  • tests/e2e/terminal-multi-workspace-typing-latency.spec.ts
  • tests/e2e/terminal-typing-measurement-control.spec.ts
  • tests/e2e/typing-load-workspaces.ts
  • tests/e2e/typing-renderer-cpu-profile.ts
  • tests/e2e/typing-scale-census.ts
  • tests/tools/benchmarks/terminal-typing-benchmark.md

Included review availability: Your plan provides up to 10 included reviews per hour; 3 remain after this review.

@Jinwoo-H
Jinwoo-H force-pushed the test/accumulated-terminal-typing branch from d0009ac to 7d6596d Compare September 16, 2026 16:47

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

The benchmark machinery is sound, but three of its verification paths can pass without verifying anything: the documented stall-control command silently skips, the status-traffic assertion also passes on all-zero evidence, and the per-scenario hang-detector assertions cannot fail. All fixes are small.

Reviewed changes

  • Accumulated-workspace fixture — seeds 870 worktrees / 27 repos / 1,410 terminal tabs / 2,000 unified tabs / 857 sleeping records / 177 live statuses through production store writes, with slice-restoring teardown.
  • Paced typing measurement — absolute planned-key schedule, per-key character attribution from a JSONL arrival sidecar, and strict sequence / clock-order validation in buildPacedTypingMeasurement.
  • Load generator — stream pacing moved from characters/tick to UTF-8 bytes/tick with codepoint-safe chunk boundaries, plus optional OSC title / OSC 9999 status frames and per-producer stats files.
  • Status and title traffic fixtures — same-tick IPC bursts routed through the production IPC bridge and title writes through mounted pane managers, with an ingress round-trip probe.
  • Controls and reporting — injected-120 ms positive control, CDP CPU profiles, scale census, build-artifact fingerprints, and tests/tools/benchmarks/terminal-typing-benchmark.md.
  • Launcher — new flags forwarded and ORCA_BACKGROUND_LAUNCH=1 forced.

Hoisting test.skip to file/describe scope (since the prior commit) is a good fix — skipped bench specs no longer build the Electron fixtures. I also verified the new unit suites pass (14 tests), typecheck:e2e reports no errors in the changed files, check:code-quality:changed reports 0 findings, and the production contracts the fixtures rely on (agentStatus:set → updatedAt, acceptedStatusSeq, setAgentStatus / setRuntimePaneTitle / createWorktree / removeWorktree signatures, OSC 9999 ingestion, testMatch: '**/*.spec.ts') all line up.

ℹ️ The build-provided instrumentation probe is never installed

startAccumulatedBenchmarkInstrumentation / stopAccumulatedBenchmarkInstrumentation read window.__orcaBenchmarkInstrumentation, but a repo-wide search finds that global referenced only by tests/e2e/accumulated-workspace-fixture.ts — nothing in src/, the preload, or the e2e build installs it. BENCH_INSTRUMENTATION_REQUESTED defaults to true, so every ordinary run requests a probe that can never be present and records {available: false, reason: 'not-installed'} in the report.

Technical details
# The instrumentation probe is dead on this branch

## Affected sites
- `tests/e2e/accumulated-workspace-fixture.ts:172-201` — `startAccumulatedBenchmarkInstrumentation` / `stopAccumulatedBenchmarkInstrumentation` gate on `target.__orcaBenchmarkInstrumentation`.
- `tests/e2e/terminal-multi-workspace-typing-latency.spec.ts:103,427-428,488-491` — requests it by default and folds the (always-unavailable) result into the JSON report.

## Required outcome
- Clarify whether the probe is expected to arrive from the production-fix branch (#20931). If yes, say so in the doc next to "build-provided instrumentation"; if no, stop requesting it by default so the report field carries signal rather than a permanent `not-installed`.

## Open questions for the human
- Is the `--instrumentation` default-on intended for this branch, or should it default off until a build actually installs the probe?

ℹ️ Nitpicks

  • tests/tools/benchmarks/terminal-typing-benchmark.md:14 — the example "creates 23 real visited workspaces", but createTypingLoadWorkspaces reuses the seeded load worktree for index === 0 and only calls createWorktree for index > 0, so it creates 22 new ones and visits 23.
  • tests/e2e/terminal-multi-workspace-typing-latency.spec.ts — await removeTypingLoadWorkspaces(...) runs unguarded in the finally ahead of rmSync(scratch, ...), so a cleanup failure replaces the original test error and leaks the temp directory.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: ce4a6582-9b05-4bb2-a0c7-48f0b561e6c6

📥 Commits

Reviewing files that changed from the base of the PR and between d0009ac and 7d6596d.

📒 Files selected for processing (18)
  • config/scripts/run-multi-workspace-typing-bench.mjs
  • tests/e2e/accumulated-workspace-fixture.ts
  • tests/e2e/accumulated-workspace-profile.ts
  • tests/e2e/accumulated-workspace-state-builder.ts
  • tests/e2e/accumulated-workspace-state-builder.unit.test.ts
  • tests/e2e/accumulated-workspace-status-fixture.ts
  • tests/e2e/accumulated-workspace-title-fixture.ts
  • tests/e2e/paced-terminal-typing-measurement.ts
  • tests/e2e/paced-terminal-typing.ts
  • tests/e2e/paced-terminal-typing.unit.test.ts
  • tests/e2e/sustained-agent-typing-load-scripts.ts
  • tests/e2e/sustained-agent-typing-load-scripts.unit.test.ts
  • tests/e2e/terminal-multi-workspace-typing-latency.spec.ts
  • tests/e2e/terminal-typing-measurement-control.spec.ts
  • tests/e2e/typing-load-workspaces.ts
  • tests/e2e/typing-renderer-cpu-profile.ts
  • tests/e2e/typing-scale-census.ts
  • tests/tools/benchmarks/terminal-typing-benchmark.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • tests/tools/benchmarks/terminal-typing-benchmark.md

Included review availability: Your plan provides up to 10 included reviews per hour; 1 remains after this review.

if (metadataEnabled && now >= nextTitleAt) {
await writeChunk('\\x1b]0;' + spinner[titleFrames % spinner.length] + ' OpenCode' + (titleChangeMs > 0 ? ' task ' + Math.floor((now - startedAt) / titleChangeMs) : '') + '\\x07')
titleFrames += 1
nextTitleAt = now + 80

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Use titleChangeMs for the title update cadence.

Line 92 always schedules the next OSC title frame after 80 milliseconds. Therefore, --title-change-ms does not control the title update rate. The changing spinner still produces title updates every 80 milliseconds for all positive values.

Schedule nextTitleAt from titleChangeMs. If zero disables title traffic, also require titleChangeMs > 0 in the condition.

Proposed fix
-  if (metadataEnabled && now >= nextTitleAt) {
+  if (metadataEnabled && titleChangeMs > 0 && now >= nextTitleAt) {
     await writeChunk('\x1b]0;' + spinner[titleFrames % spinner.length] + ' OpenCode' + (titleChangeMs > 0 ? ' task ' + Math.floor((now - startedAt) / titleChangeMs) : '') + '\x07')
     titleFrames += 1
-    nextTitleAt = now + 80
+    nextTitleAt = now + titleChangeMs
   }

Comment on lines +178 to +183
buildArtifacts: {
mainSha256: createHash('sha256').update(readFileSync('out/main/index.js')).digest('hex'),
rendererAssetNamesSha256: createHash('sha256')
.update(readdirSync('out/renderer/assets').sort().join('\n'))
.digest('hex')
},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

🔎 Supported by static analysis

🏁 Script executed:

sed -n '130,230p' tests/e2e/terminal-multi-workspace-typing-latency.spec.ts
sed -n '450,530p' tests/e2e/terminal-multi-workspace-typing-latency.spec.ts
rg -n 'out/main/index.js|out/renderer/assets|orca-mwt-load-stats|writeBenchReport' tests/e2e config package.json

Repository: stablyai/orca

Length of output: 13210


🏁 Script executed:

#!/bin/bash
set -e
printf '%s\n' '--- imports/constants/setup ---'
sed -n '1,145p' tests/e2e/terminal-multi-workspace-typing-latency.spec.ts
printf '%s\n' '--- report tail and all callers ---'
sed -n '225,375p' tests/e2e/terminal-multi-workspace-typing-latency.spec.ts
sed -n '525,665p' tests/e2e/terminal-multi-workspace-typing-latency.spec.ts
printf '%s\n' '--- hidden-load setup and cleanup symbols ---'
rg -n -C 5 'loadPanes|runId|scratch|startTyping|stopTyping|spawn|statsPath|writeFileSync|removeLoadReadyFiles|cleanup|globalSetup|SKIP_BUILD|process\.cwd|chdir' tests/e2e/terminal-multi-workspace-typing-latency.spec.ts tests/e2e/sustained-agent-typing-load-scripts.ts tests/e2e/global-setup.ts playwright.config.* package.json
printf '%s\n' '--- producer script ---'
sed -n '1,180p' tests/e2e/sustained-agent-typing-load-scripts.ts

Repository: stablyai/orca

Length of output: 50369


🤖 get_repo_knowledge executed:

get_repo_knowledge stablyai/orca /tmp/coderabbit-repo-knowledge/stablyai-orca-89dc44e4/conventions /tmp/coderabbit-repo-knowledge/stablyai-orca-89dc44e4/learnings

Length of output: 14636


🏁 Script executed:

#!/bin/bash
set -e
printf '%s\n' '--- hidden-load caller ---'
sed -n '375,530p' tests/e2e/terminal-multi-workspace-typing-latency.spec.ts
printf '%s\n' '--- global setup ---'
sed -n '1,110p' tests/e2e/global-setup.ts
printf '%s\n' '--- benchmark launcher and package scripts ---'
sed -n '1,240p' config/scripts/run-multi-workspace-typing-bench.mjs
sed -n '1,90p' package.json
printf '%s\n' '--- e2e config references ---'
rg -n -C 4 'globalSetup|cwd|out/main|renderer/assets|SKIP_BUILD|run-multi-workspace-typing|multi-workspace-typing' tests/e2e config package.json --glob '!tests/e2e/terminal-multi-workspace-typing-latency.spec.ts'

Repository: stablyai/orca

Length of output: 50370


🏁 Script executed:

#!/bin/bash
set -e
printf '%s\n' '--- saved log source sections ---'
sed -n '1,620p' /tmp/coderabbit-shell-logs/shell-output-wbMPmV

Repository: stablyai/orca

Length of output: 40725


🏁 Script executed:

#!/bin/bash
set -e
sed -n '68,124p' tests/e2e/sustained-agent-typing-load-scripts.ts

Repository: stablyai/orca

Length of output: 2728


Make writeBenchReport resilient to missing build artifacts.

writeBenchReport reads the build artifacts after measurement completes and before writeFileSync writes the report. The relative reads can throw when an artifact is absent. SKIP_BUILD checks only out/main/index.js, so it does not guarantee both paths. Resolve the paths from the repository root and record null for a missing artifact.

-      mainSha256: createHash('sha256').update(readFileSync('out/main/index.js')).digest('hex'),
+      mainSha256: readBuildArtifactSha256('out/main/index.js'),
       rendererAssetNamesSha256: createHash('sha256')
-        .update(readdirSync('out/renderer/assets').sort().join('\n'))
-        .digest('hex')
+        .update(readdirSync(path.resolve(__dirname, '..', '..', 'out/renderer/assets')).sort().join('\n'))
+        .digest('hex')

Use the same missing-artifact handling for the renderer directory and return null instead of allowing report construction to abort.

Comment on lines +545 to +547
if (statusTrafficStarted) {
await stopAccumulatedStatusTraffic(electronApp, orcaPage)
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Guard the status-traffic stop in finally so later cleanup still runs.

stopAccumulatedStatusTraffic can throw. It throws when the renderer probe is missing, and waitForStatusReceipts rejects on timeout. This call sits in the finally block before stopAccumulatedTitleTraffic, cleanupAccumulatedWorkspaceFixture, removeLoadReadyFiles, removeTypingLoadWorkspaces, and the scratch-directory removal. A throw here skips all of them and leaves created git worktrees and the temporary directory on disk. The instrumentation stop directly above already uses .catch(() => undefined).

🔒 Proposed fix
       if (statusTrafficStarted) {
-        await stopAccumulatedStatusTraffic(electronApp, orcaPage)
+        await stopAccumulatedStatusTraffic(electronApp, orcaPage).catch(() => undefined)
       }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if (statusTrafficStarted) {
await stopAccumulatedStatusTraffic(electronApp, orcaPage)
}
if (statusTrafficStarted) {
await stopAccumulatedStatusTraffic(electronApp, orcaPage).catch(() => undefined)
}

Review found four assertions that could not fail and one fixture gap:

- `missingPtyArrivalCount`/`missingEchoCount` were hardcoded `0` and
  `validateExpectedSeqs` throws before them, so every assertion on them
  was vacuous and every report read `0`. The throw is the real guard and
  is already covered; drop the vestigial fields.
- An absent status controller returned an all-zero result, which satisfied
  its own accepted-equals-generated equality. Assert presence first.
- The byte-pacing control had only an upper bound, so a generator emitting
  no stream bytes passed. Add the lower bound.
- `lineageEvery: 1` built zero lineage: no ordinal satisfies
  `% 1 === 1`. Offset the interval and cover the densest setting.
- The documented control command never set ORCA_TYPING_BENCH, so it
  skipped instead of running.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

This delta (2cfc0b3, "make the bench harness self-checks falsifiable") hardens the verification paths the prior review flagged; all four Pullfrog threads from that review are resolved.

  • Fixed the fixture lineage interval — lineageEvery: 1 now builds every non-main worktree ((repoOrdinal - 1) % lineageEvery instead of repoOrdinal % lineageEvery === 1), and a new unit test pins the densest setting (9 worktrees / 3 repos / interval 1 → 6 lineages).
  • Removed the always-zero missing counts — missingPtyArrivalCount / missingEchoCount are gone from PacedTypingMeasurement, along with every expect(...).toBe(0) site that could never fail; the validateExpectedSeqs throw remains the guard, and inputHalfMs/totalMs counts carry the multi-workspace hang detector.
  • Made the byte-pacing test falsifiable — added a lower bound (> 4 KiB * 2 * 0.8) so a generator emitting no stream bytes now fails.
  • Gave the status-traffic assertions signal — generatedUpdates > 0 / trackedStatuses > 0 are asserted before the acceptedUpdates === generatedUpdates / latestReceipts === trackedStatuses equalities, so a controller that never started no longer reads as success.
  • Fixed the documented control command — ORCA_TYPING_BENCH=1 is now set, so following the doc actually runs the stall positive control instead of skipping it.

Verified locally: the three unit suites pass (15 tests), check:code-quality:changed reports 0 findings, and typecheck:e2e reports no errors in any changed file.

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@Jinwoo-H
Jinwoo-H merged commit bdb1800 into main Sep 16, 2026
34 checks passed
ivanvykopal pushed a commit to ivanvykopal/orca that referenced this pull request Sep 20, 2026
…i#20934)

* test: reproduce accumulated-workspace typing latency through real PTYs

* test: make the bench harness self-checks falsifiable

Review found four assertions that could not fail and one fixture gap:

- `missingPtyArrivalCount`/`missingEchoCount` were hardcoded `0` and
  `validateExpectedSeqs` throws before them, so every assertion on them
  was vacuous and every report read `0`. The throw is the real guard and
  is already covered; drop the vestigial fields.
- An absent status controller returned an all-zero result, which satisfied
  its own accepted-equals-generated equality. Assert presence first.
- The byte-pacing control had only an upper bound, so a generator emitting
  no stream bytes passed. Add the lower bound.
- `lineageEvery: 1` built zero lineage: no ordinal satisfies
  `% 1 === 1`. Offset the interval and cover the densest setting.
- The documented control command never set ORCA_TYPING_BENCH, so it
  skipped instead of running.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant