[PR #432] [MERGED] perf(test): speed up local and CI validation #1980

Closed
opened 2026-10-16 21:13:03 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/432
Author: @morluto
Created: 7/24/2026
Status: ✅ Merged
Merged: 7/24/2026
Merged by: @morluto

Base: main ← Head: codex/test-suite-performance-main


📝 Commits (4)

  • 42fbbb2 perf(test): speed up local and CI validation
  • 13f3372 fix(test): use direct Node launcher on macOS
  • 9c3aec8 fix(process): normalize macOS launcher identity
  • 62ac73c fix(process): expose launcher identity mismatch

📊 Changes

19 files changed (+248 additions, -39 deletions)

View changed files

📝 .github/workflows/ci.yml (+26 -2)
📝 .gitignore (+1 -0)
📝 AGENTS.md (+3 -2)
📝 CONTRIBUTING.md (+5 -3)
📝 package.json (+6 -3)
➕ scripts/verify-package-environment.d.mts (+26 -0)
📝 scripts/verify-package-environment.mjs (+2 -2)
➕ src/process/ProcessCommandIdentity.ts (+24 -0)
📝 src/process/ProcessOwnership.ts (+6 -11)
📝 tests/cdpBrowserProvider.test.ts (+3 -1)
📝 tests/packageInstallWorkflow.test.ts (+28 -0)
📝 tests/processCapture.test.ts (+5 -3)
📝 tests/processCaptureElicitation.test.ts (+1 -1)
📝 tests/processOwnership.test.ts (+27 -1)
📝 tests/vitestConfiguration.test.ts (+9 -4)
📝 tsconfig.build.json (+2 -0)
📝 tsconfig.json (+2 -0)
📝 turbo.json (+29 -4)
📝 vitest.config.ts (+43 -2)

📄 Description

Description

Reduce test-runner contention and repeated build work by making execution lanes explicit and sharing one CI build artifact.

  • Pure/in-memory tests run in the faster threads pool.
  • Tests that launch child processes or production runtimes run in isolated forks.
  • Filesystem/process/CLI integration remains serial and explicit.
  • Local test:fast, test:changed, and watch commands use the non-serial lanes.
  • CI keeps two balanced coverage shards, consuming one shared dist artifact instead of rebuilding per shard.
  • TypeScript incremental state is persisted through Turbo; lint/knip inputs are narrowed to relevant files.
  • A configuration test enforces an exact, disjoint partition so tests cannot silently fall out of a lane or run twice.

The change also fixes three test-harness timing/tampering issues exposed by the mixed lane: a CDP cancellation response race, a target-loss deadline that was too tight under worker load, and a request-state mutation that could alter only base64url padding bits.

Type of Change

  • Performance improvement
  • Tests and test infrastructure
  • Bug fix
  • New feature
  • Refactoring
  • Documentation update

Testing Performed

  • npm run check:pr — 9 tasks passed; 196 files / 1,388 tests passed. TypeDoc emitted existing warnings but no errors.
  • npm run check:ci — 7 tasks passed.
  • npm run verify:package — passed.
  • npm pack --dry-run — passed; 621 files packaged.
  • git diff --check
  • Real Hopper/Ghidra/browser verification — not applicable; provider behavior is unchanged.

Tool Contract Impact

None. MCP tool inventory, schemas, and provider contracts are unchanged.

Review Order

  1. vitest.config.ts and package.json for lane and command behavior.
  2. .github/workflows/ci.yml and turbo.json for CI/build caching.
  3. Regression tests and documentation updates.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/432 **Author:** [@morluto](https://github.com/morluto) **Created:** 7/24/2026 **Status:** ✅ Merged **Merged:** 7/24/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `codex/test-suite-performance-main` --- ### 📝 Commits (4) - [`42fbbb2`](https://github.com/morluto/rea/commit/42fbbb297b8f40bcfbbfa219a1de098f3d0780ad) perf(test): speed up local and CI validation - [`13f3372`](https://github.com/morluto/rea/commit/13f3372a8beaa165473bd7ecaccaa2997dcbf2ab) fix(test): use direct Node launcher on macOS - [`9c3aec8`](https://github.com/morluto/rea/commit/9c3aec81317cd6caf627f13ebb0c6dc0f6735516) fix(process): normalize macOS launcher identity - [`62ac73c`](https://github.com/morluto/rea/commit/62ac73cdd79bee708d50b17a2dde8c23e0b66f1e) fix(process): expose launcher identity mismatch ### 📊 Changes **19 files changed** (+248 additions, -39 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/ci.yml` (+26 -2) 📝 `.gitignore` (+1 -0) 📝 `AGENTS.md` (+3 -2) 📝 `CONTRIBUTING.md` (+5 -3) 📝 `package.json` (+6 -3) ➕ `scripts/verify-package-environment.d.mts` (+26 -0) 📝 `scripts/verify-package-environment.mjs` (+2 -2) ➕ `src/process/ProcessCommandIdentity.ts` (+24 -0) 📝 `src/process/ProcessOwnership.ts` (+6 -11) 📝 `tests/cdpBrowserProvider.test.ts` (+3 -1) 📝 `tests/packageInstallWorkflow.test.ts` (+28 -0) 📝 `tests/processCapture.test.ts` (+5 -3) 📝 `tests/processCaptureElicitation.test.ts` (+1 -1) 📝 `tests/processOwnership.test.ts` (+27 -1) 📝 `tests/vitestConfiguration.test.ts` (+9 -4) 📝 `tsconfig.build.json` (+2 -0) 📝 `tsconfig.json` (+2 -0) 📝 `turbo.json` (+29 -4) 📝 `vitest.config.ts` (+43 -2) </details> ### 📄 Description ## Description Reduce test-runner contention and repeated build work by making execution lanes explicit and sharing one CI build artifact. - Pure/in-memory tests run in the faster threads pool. - Tests that launch child processes or production runtimes run in isolated forks. - Filesystem/process/CLI integration remains serial and explicit. - Local `test:fast`, `test:changed`, and watch commands use the non-serial lanes. - CI keeps two balanced coverage shards, consuming one shared `dist` artifact instead of rebuilding per shard. - TypeScript incremental state is persisted through Turbo; lint/knip inputs are narrowed to relevant files. - A configuration test enforces an exact, disjoint partition so tests cannot silently fall out of a lane or run twice. The change also fixes three test-harness timing/tampering issues exposed by the mixed lane: a CDP cancellation response race, a target-loss deadline that was too tight under worker load, and a request-state mutation that could alter only base64url padding bits. ## Type of Change - [x] Performance improvement - [x] Tests and test infrastructure - [ ] Bug fix - [ ] New feature - [ ] Refactoring - [ ] Documentation update ## Testing Performed - [x] `npm run check:pr` — 9 tasks passed; 196 files / 1,388 tests passed. TypeDoc emitted existing warnings but no errors. - [x] `npm run check:ci` — 7 tasks passed. - [x] `npm run verify:package` — passed. - [x] `npm pack --dry-run` — passed; 621 files packaged. - [x] `git diff --check` - [ ] Real Hopper/Ghidra/browser verification — not applicable; provider behavior is unchanged. ## Tool Contract Impact None. MCP tool inventory, schemas, and provider contracts are unchanged. ## Review Order 1. `vitest.config.ts` and `package.json` for lane and command behavior. 2. `.github/workflows/ci.yml` and `turbo.json` for CI/build caching. 3. Regression tests and documentation updates. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-16 21:13:03 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#1980
No description provided.