Skip to content

test: share saved terminal title runtime setup - #29314

Merged
OrcaWin merged 14 commits into
mainfrom
OrcaWin/test-audit-runtime-title-startup
Oct 16, 2026
Merged

OrcaWin merged 14 commits into
mainfrom
OrcaWin/test-audit-runtime-title-startup

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

ELI5

Three terminal-title regressions start the whole runtime separately. Keep them with the existing terminal-creation tests so that setup runs once.

What Changed

Move the three saved-title cases into the already imported terminal-creation spec and delete their standalone test entry. Keep named creation persistence, the background-terminal title exception, and saved-title fallback after live title loss. Require the background tab to exist before checking its missing custom name, closing an assertion that previously passed if the tab disappeared entirely.

Why

All three are useful runtime contracts. Sharing the established runtime setup removes repeated imports without dropping coverage or adding a harness. The existing spec owns terminal creation and already uses the same lifecycle and session fixture. Production code is unchanged.

Linked Issue

Maintainer-requested CI test audit. Stacked after #29309; retarget main and rerun required checks once its base lands.

Visual Proof

N/A — test organization and assertion repair; product behavior unchanged.

Testing

  • I manually tested these changes locally
  • Automated tests updated

Linux, Bun 1.4.3 / Node 24.21.0, two workers: all six alternating before/after runs pass 1,365 tests / one skipped. All three title cases remain. Independent preservation review passed.

Metric Baseline median Candidate median
command wall time 24.479s 22.088s
summed module time 33.481s 20.442s

Each comparison runs the existing runtime aggregator plus the original standalone title suite (baseline), or the aggregator containing the moved cases (candidate). Command: CI Bun --bun node_modules/vitest/vitest.mjs run --config config/vitest.config.ts --maxWorkers=2 with default and timing reporters, ORCA_BACKGROUND_LAUNCH=1, and CI Node executable supplied to the pool. This measures removed duplicate imports; hosted results are recorded separately below.

Hosted before/after: parent #29309 run 38829650565 versus this PR run 38830208115. Selected module worker time totaled 40.612 → 37.057s (8.8% lower): the retained runtime module rose 36.804 → 37.057s, while the separate 3.808s title module was eliminated. All five artifacts per variant passed with zero unhandled errors; measured files passed. Both used Node 24.21.0/Bun 1.4.3, five ARM shards and four workers per shard. Actual merge-checkout trees match the respective PR heads, with runner/routing sources unchanged. This historical, unpaired sum is separate from local elapsed time and does not establish a whole-workflow speedup. Main-based full required CI remains pending.

Three deliberate production mutations fail the intended persisted-title, background-title, and list-fallback assertions; a missing-background-row control fails the new existence assertion. Source restored byte for byte afterward. Node typecheck, changed-code-quality, formatting, and whitespace checks pass.

Review

No test declarations removed. The moved fixture executes the actual admission reducer and session persistence; it does not supply expected titles through mocks. The existing aggregator imports the target spec. Test entry/spec drops five lines; no production change.

Agent skill upstream boundary

  • Not applicable; no upstream skill source copied.

Checklist

  • Small owner-focused change
  • Before/after, mechanism, and rationale explained
  • N/A visual proof explained
  • Self-reviewed and independently reviewed
  • Cross-platform and SSH behavior considered
  • Local checks complete
  • Main-based required CI and hosted comparison passed

Fresh refresh head c90ad00 incorporates the current constructor parent c866091. Its exact two-file +66/-71 title delta matches the original candidate, and independent preservation review confirms all three contracts, the new existence guard and upstream aggregator imports. Three alternating Linux Node 24.21.0 / Bun 1.4.3 one-worker pairs all pass the same 1,385 cases plus one skip. Median command wall 28.751 → 21.529 seconds (25.1% lower); summed module 27.016 → 19.764 seconds. This is controlled local observation, not a hosted or whole-workflow speed claim. Current node typecheck, changed-code-quality against the actual parent, lint, format and whitespace checks all pass. Fresh stacked full run 38872648005 is pending; main-based qualification remains required after the parent lands. Prior measurements above remain historical.

Main reconciliation after constructor squash: final head6bbc1fa59bfe1c762eecefcc25d0751c8e31a9cf merges main50de2bc966. PR diff is now only the original two title paths +66/-71. Fresh complete runtime owner passes1,385 cases/one skip; node typecheck, actual-main changed-quality and whitespace pass. The moved case bodies remain identical, so the three controlled pair measurements above remain source-qualified local evidence for this unchanged title delta; no timing claim is made from the concurrent final validation. A new exact-head full gate and separate headless validation are required; previous stacked run is historical.

Final qualification at6bbc1fa59bfe1c762eecefcc25d0751c8e31a9cf: full .github/workflows/pr.yml run38873657354 passed verify / PR checks passed116886660689. Separate Headless Node server38873657297 passed. All current checks are completed success/skipped. Five clean reports contain12,329 unique paths with zero unhandled errors. All1,385cases/one skip run in the retained aggregator, preserving the three moved title contracts; actual source and all24 checked blobs match the reviewed head. Hosted parent aggregator+standalone27,506ms→candidate24,650ms (10.38% lower selected module sum). Same Node24.19/Bun1.4.3 BlacksmithX64/five shards/four workers, but upstream source/workload and runner variance confound this unpaired observation; no causal or workflow elapsed-time claim. This supersedes pending status above.

@OrcaWin OrcaWin mentioned this pull request Oct 16, 2026
8 tasks done
@OrcaWin
OrcaWin changed the base branch from OrcaWin/test-audit-runtime-construction to main October 16, 2026 08:22
@coderabbitai

coderabbitai Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Review in 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: 3b4e1f8e-5541-4705-8fe7-0b7cc02f56bc
📥 Commits

Reviewing files that changed from the base of the PR and between 941ad1e and c90ad00.

📒 Files selected for processing: 15
  • src/main/runtime/construction/runtime-construction.ts
  • src/main/runtime/fetch-remote-cache.test.ts
  • src/main/runtime/orca-runtime-structured-status-sink-wiring.test.ts
  • src/main/runtime/orca-runtime-terminal-rename-retention.test.ts
  • src/main/runtime/orca-runtime-terminal-title-saved-layout.test.ts
  • src/main/runtime/orca-runtime-tests/terminal-creation-and-readiness-part-04.spec.ts
  • src/main/runtime/orca-runtime-tests/terminal-sleep-and-teardown-part-03.spec.ts
  • src/main/runtime/orca-runtime-tests/terminal-spawn-dispatch.spec.ts
  • src/main/runtime/orca-runtime-worktree-provisioning-availability.test.ts
  • src/main/runtime/runtime-remote-fetch-controller.ts
  • src/main/runtime/session-tabs-inventory-publication.test.ts
  • src/main/runtime/session-tabs/session-tab-prototype-dispatch.test.ts
  • src/main/runtime/terminal-interactive-wait-visibility.test.ts
  • src/main/runtime/terminal/driver/terminal-driver-resources.ts
  • src/main/runtime/workspaces/workspace-query-prototype.test.ts
💤 Files with no reviewable changes: 12
  • src/main/runtime/session-tabs/session-tab-prototype-dispatch.test.ts
  • src/main/runtime/orca-runtime-terminal-title-saved-layout.test.ts
  • src/main/runtime/construction/runtime-construction.ts
  • src/main/runtime/runtime-remote-fetch-controller.ts
  • src/main/runtime/terminal-interactive-wait-visibility.test.ts
  • src/main/runtime/terminal/driver/terminal-driver-resources.ts
  • src/main/runtime/orca-runtime-tests/terminal-sleep-and-teardown-part-03.spec.ts
  • src/main/runtime/orca-runtime-terminal-rename-retention.test.ts
  • src/main/runtime/session-tabs-inventory-publication.test.ts
  • src/main/runtime/orca-runtime-tests/terminal-spawn-dispatch.spec.ts
  • src/main/runtime/orca-runtime-structured-status-sink-wiring.test.ts
  • src/main/runtime/workspaces/workspace-query-prototype.test.ts

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

📝 Walkthrough

The change removes cache inspection accessors and constructor-time characterization tests across runtime, workspace, session-tab, and terminal areas. Fetch-cache tests now exercise RuntimeRemoteFetchController directly, including 512-path eviction and instance-isolated freshness. Terminal-title tests verify saved names for headless titled terminals, background terminals, and terminals whose PTY record has no title.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to c90ad

No actionable issue is established by this review. The change is mergeable after normal checks.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 3 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
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.
Title check Passed The title clearly identifies the main change: sharing runtime setup for saved terminal title tests.
Description check Passed The description is complete and specific. It explains the moved tests, rationale, preserved coverage, assertion repair, testing results, and validation status. The linked issue is referenced as #29309…
Full details: Description check

Explanation

The description is complete and specific. It explains the moved tests, rationale, preserved coverage, assertion repair, testing results, and validation status. The linked issue is referenced as #29309 but is not formatted as a direct issue link.

  • Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@OrcaWin
OrcaWin merged commit 026efc3 into main Oct 16, 2026
31 checks passed
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