Skip to content

[CI] Reduce repeated test setup and real CLI waits - #27297

Merged
nwparker merged 3 commits into
mainfrom
nwparker/ci-test-imports-and-real-cli-waits-20261010
Oct 10, 2026
Merged

nwparker merged 3 commits into
mainfrom
nwparker/ci-test-imports-and-real-cli-waits-20261010

Conversation

@nwparker

@nwparker nwparker commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

CI repeatedly loads the same test dependencies and waits after Codex has finished. This reduces both costs while preserving the contracts.

What Changed

Combine seven files into three, retaining all 25 cases, assertions, cleanup, and Node routing for database contracts. Remove the obsolete registry entry. Four moved pull-request cases receive one distinct ancestor title to satisfy the full CI lint rule; their bodies remain identical.

The real Codex terminal test advances on painted readiness, then the real Stop response and assistant output. Wrong approval still requires review and no hooks. Timeout ceilings and shutdown windows remain. Forwarded output has a finite 64 MiB cap.

Why

Fewer isolated imports and observed completion reduce work. Existing runners, terminal scanners, and Node options handle this without product or library changes.

Linked Issue

N/A — maintainer-requested CI work.

Visual Proof

N/A — test-only change; no product UI change.

Testing

  • Focused contracts, changed-quality, Node/Web type checks, and normal pre-commit hooks passed locally.
  • Existing automated contracts retained; final CI passed.

macOS arm64, ORCA_BACKGROUND_LAUNCH=1, Node 24.21.0, stock Vitest 5.0.3. Combined tests used committed setup and Bun 1.4.2 in both arms:

Scope Before After Improvement
Combined 25 cases, two-run elapsed means 4.579 s 3.825 s 16.46% less time
Same cases, waited-child user + system CPU 13.829 s 7.935 s 42.62% less CPU
Codex contracts, 13 commands 208.873 s 45.884 s 78.03% less time
Three hook suites, same CLI versions 190.658 s 28.386 s 85.11% less time

All 25 cases passed with isolation and protected Node routing unchanged. Arms were 4.766 / 3.810 / 3.841 / 4.392 seconds. An incorrect worker-type assertion held the controller after successful A1; continuation reused A1 after a 153.433-second pause. This was a split bracket. Eight commands cost 17.060 seconds; controllers cost 7.396 + 16.257 seconds. CPU counters are not runner occupancy.

The CLI comparison is one fixed-order pair: same 54 passes and prerequisite skips, CLI 0.150.1 / 0.158.0 / 0.162.1. Nine terminal children exited. Controllers including capture/redaction cost 242.760 → 67.819 seconds; the original owned-cache housekeeping hold remains recorded. Final-only CLI validation passed in 45.754 seconds inside its 46.249-second outer command. Initial quality failed five missing braces in 2.794 seconds; parent controller cost 51.118 seconds. Formatter cost 0.120; corrected quality and Node/Web checks passed in 6.634 without repeating suites. The original 26 inner qualification commands cost 72.361 seconds; nested time is counted once, formatter/quality controller overhead unrecorded.

Corrective validation retained the full-repository plugin failure (1.984 seconds): five mobile cycle warnings in four unchanged production files, with no graph edges to changed tests. No suppression or production fix. Full plugin checks on all five live changed files passed in 0.524 seconds; all 12 IPC cases passed in 2.119 with only the declared four-case title alias. Buffer-option full-file lint and Node typecheck passed in 1.926 seconds. Normal hooks cost 1.394 / 1.225 / 1.129 seconds. The local full-repository gate is not claimed green.

Review

Source/semantic reviews and final required checks passed. The duplicate-title CI failure was corrected. CodeRabbit's buffer-limit finding was fixed, acknowledged, and resolved after push. Captured output was below 1 MiB; no stress run was added, which the bot accepted for this minor option change. Its optional docstring quota is declined under the repository's concise-comment policy.

Normal PR head Runner-seconds Allocations
Initial failed 86b0 565 7
Corrected green e7b8 3963 15
Final green 943bec9 3733 15
Entire PR lifecycle 8261 37

All workflows used their normal first attempt; no diagnostic reruns. Final unit shards used 2932 seconds versus 3172 on e7b8. Earlier reference PR #27253 used 5349 seconds with extra forced jobs (22 allocations). Different job selection and observed variation prevent a causal whole-CI speedup claim. The matched local measurements provide improvement evidence; overall 2× runner capacity remains unproved.

Agent skill upstream boundary

  • Not applicable; no upstream skill-installer material.

Notes

No product, dependency patch, runtime pin, native routing, cache policy, isolation setting, or CI job changes. Local measurements cover macOS; ordinary PR checks covered the supported contracts.

Checklist

  • Scope, before/after, mechanism, and approach explained.
  • Visual proof marked N/A.
  • Final source reviewed; tests and checks passed. Product build not needed for test-only edits.

@coderabbitai

coderabbitai Bot commented Oct 10, 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: d0561153-e21a-4e0b-84f5-b1996dda8717




📥 Commits

Reviewing files that changed from the base of the PR and between e7b8c9d and 943bec9.





📒 Files selected for processing (1)
  • src/main/codex/codex-hook-file-entry-binary-contract.test.ts




🚧 Files skipped from review as they are similar to previous changes (1)
  • src/main/codex/codex-hook-file-entry-binary-contract.test.ts




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






📝 Walkthrough
📝 Walkthrough
📝 Walkthrough
📝 Walkthrough

Walkthrough

The changes update Codex TUI binary-contract tests and consolidate filesystem, worker-abandonment, and NativeChat turn-status tests. Filesystem tests cover linked-issue context and command limits through local and SSH adapters. Worker-abandonment tests cover caller attribution and stale results. NativeChat tests cover turn headers, retry warnings, stopping notices, and message placement.








Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 943be

No actionable issue remains in the supplied review scope; the change is mergeable after normal checks.

Pre-merge checks | Passed 4 | Failed 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 7.69% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 13 functions across 4 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ 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 two main changes: reducing repeated test setup and reducing real CLI wait time.
Description check Passed The description is detailed and covers the required change scope, rationale, testing, review status, visual proof, platform considerations, and known full-repository plugin warnings. The maintainer-sp…

  • 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.

@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: 1


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1570c6bb-cf1c-44de-8297-3447f22df1aa
📥 Commits

Reviewing files that changed from the base of the PR and between ca1aac6 and 86b0e82.

📒 Files selected for processing (10)
  • config/scripts/vitest-sqlite-database-runtime-files.mjs
  • src/main/codex/codex-hook-file-entry-binary-contract.test.ts
  • src/main/ipc/filesystem-git-commit-dispatch.test.ts
  • src/main/ipc/filesystem-pull-request-field-generation.test.ts
  • src/main/runtime/rpc/methods/orchestration/worker/manual-dispatch-release.test.ts
  • src/main/runtime/rpc/methods/orchestration/worker/worker-abandon-caller.test.ts
  • src/renderer/src/components/native-chat/NativeChatMessageList.interrupted-turn-fold.test.tsx
  • src/renderer/src/components/native-chat/NativeChatMessageList.provider-retry-runs.test.tsx
  • src/renderer/src/components/native-chat/NativeChatMessageList.stopping-turn-bar.test.tsx
  • src/renderer/src/components/native-chat/NativeChatMessageList.turn-status.test.tsx
💤 Files with no reviewable changes (6)
  • config/scripts/vitest-sqlite-database-runtime-files.mjs
  • src/renderer/src/components/native-chat/NativeChatMessageList.stopping-turn-bar.test.tsx
  • src/main/ipc/filesystem-pull-request-field-generation.test.ts
  • src/renderer/src/components/native-chat/NativeChatMessageList.provider-retry-runs.test.tsx
  • src/renderer/src/components/native-chat/NativeChatMessageList.interrupted-turn-fold.test.tsx
  • src/main/runtime/rpc/methods/orchestration/worker/worker-abandon-caller.test.ts

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

@nwparker
nwparker merged commit 0a73d1e into main Oct 10, 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