[PR #5795] [MERGED] perf(ci): use tsrs and reduce PE acceptance startup #7068

Closed
opened 2026-11-01 21:45:08 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/5795
Author: @gensokyo-dev
Created: 10/21/2026
Status: ✅ Merged
Merged: 10/21/2026
Merged by: @gensokyo-dev

Base: main ← Head: perf/tsrs-compiler-20261021


📝 Commits (10+)

  • 72c2d8a perf(build): use tsrs on supported development hosts
  • b01aed9 docs(testing): clarify the compiler memory target scope
  • 4639f85 fix(build): align fallback compiler and dependency inventory
  • da155de fix(build): isolate the prerelease fallback from stable compiler peers
  • 87c7bb7 fix(ci): partition compiler caches and retain stable fallbacks
  • 93d8590 test(build): compare failure status with the selected compiler
  • 3d20eac fix(ci): retain compiler setup in cache and host-lane fixtures
  • 4b9bd94 fix(ci): qualify fallback hosts for compiler input changes
  • d8d26bd fix(ci): qualify compiler lifecycle hooks on fallback hosts
  • 88735a2 fix(build): preserve explicit compiler resource limits

📊 Changes

22 files changed (+837 additions, -46 deletions)

View changed files

📝 .github/workflows/ci.yml (+6 -0)
📝 docs/testing.md (+28 -2)
📝 licenses/npm-dependencies.txt (+31 -1)
📝 package-lock.json (+118 -0)
📝 package.json (+22 -21)
📝 scripts/ci/plan.mjs (+25 -0)
📝 scripts/ci/scopes.mjs (+12 -0)
📝 scripts/run-development-tests.mjs (+1 -1)
➕ scripts/run-turbo.mjs (+11 -0)
➕ scripts/run-typescript.d.mts (+11 -0)
➕ scripts/run-typescript.mjs (+75 -0)
📝 scripts/verify-real-browser.mjs (+6 -0)
📝 src/application/binary/AnalysisProviderRegistry.test.ts (+7 -2)
📝 tests/acceptance/applications/peResources.test.ts (+15 -6)
📝 tests/boundary/filesystem/ciChangeScope.test.ts (+89 -3)
📝 tests/boundary/filesystem/ciTestReports.test.ts (+1 -1)
📝 tests/boundary/filesystem/dependencyInstall.test.ts (+3 -1)
📝 tests/boundary/filesystem/staticTaskCache.test.ts (+139 -4)
➕ tests/boundary/filesystem/typescriptCompiler.test.ts (+206 -0)
📝 tests/boundary/mcp/providerSelectionMcp.test.ts (+4 -1)

...and 2 more files

📄 Description

Summary

Use pinned tsrs@0.18.0-ts7.1.0-dev.20260929 for builds, typechecks and Frida binding checks on supported Linux x64/arm64 and macOS arm64. Windows and unsupported hosts retain official typescript@7.0.2; Windows independently checks the complete source. Three test callbacks name their existing options contract. Strictness, Termux/Stryker APIs and runtime dependencies are unchanged by this PR.

Select the compiler before Turbo hashing; include its identity and both launchers in compile/typecheck caches. Missing binaries or stale identity fail. Fast CI selects fallback hosts for compiler inputs, commands and lifecycle hooks. Rust defaults to two checkers and a soft 3G no-emit target, preserving explicit resource arguments.

Reduce repeated PE acceptance CLI initialization through the existing bounded compiled driver. Keep fresh PE32/PE32+ and malformed-padding wrapper checks, independent MCP coverage, every fixture/assertion and the original 30s deadline. Main now owns the omission/browser corrections and named MCP schema bindings; retain those upstream implementations. The browser verifier additionally confirms the original target remains live after disconnect. No provider authority change.

Validation

Head 36eca066f1638edda07553d02c374ab94d542618, rebased onto main bcfcd8b6e2ee0c44c7ac656688db5ceb61a847d5 (GPU, SQLite and JavaScript worker changes). Full CI checks merge preview 55728769e8ed668ca8a454b97375f8a6db7c773d. Node 24.18.0 / npm 11.16.0; four-core local affinity, two checker threads, serial Turbo.

  • Fresh normal npm ci and npm run check passed: build, typecheck, lint, formatting, knip, metadata, module boundaries and architecture guards. Complete source also passed the official compiler directly.
  • Latest integrated focused run: 450 passed, 2 conditional SQLite capability skips across 15 files, including GPU, SQLite, compiler/cache/install/routing and CLI worker lifecycle. The skipped cases require native limits to be absent; this Node has them. CI separately exercises Node 24.15 compatibility.
  • Current full qualification passed on its first attempt: 40 jobs passed, 1 intentional source-only skip; 24,121 portable tests passed, 198 named conditional skips (1892 files passed, 24 skipped). All platform lanes passed. PE acceptance completed in 5.6s. Codex and Greptile completed review of this exact head with no actionable findings. Greptile did not execute tests; executed evidence comes from local checks and CI.
  • Compiler/launcher perturbations proved cache invalidation; a deliberately wrong selected PE output schema failed SDK validation. Controls restored. Complete real Chromium CLI/MCP verification passed locally and in full CI.

Merged as 905cbaf2398c905e96a1492b6145ece13e91c3cc onto main 33f91291. The firmware/cleanup integration passed npm run check and 224 related tests across 14 files (one unsupported-host conditional skip); the later Interface Builder/immutable JSON integration passed the full static check and 26 domain tests. Final merged tree f094b1510b8e840d5e727ffa68e96ecc7afa9ab6 exactly matches the locally tested integration. Normal squash merge; no admin/bypass. Author: gensokyo-dev; no Co-authored-by trailer.

Main full qualification binds to exact merge SHA 905cbaf2 and is running. The main push CI failed the unchanged external Windows PowerShell ACL probe at 15s with empty stdout/stderr; typecheck and curated tests passed. No retry of that failure was requested. Follow-up #5941 removes duplicate account-name resolution and adds phase diagnostics while preserving the deadline and all ACL assertions. Exact historical timeout cause remains unconfirmed. A fresh emit comparison on the actual merge commit found all 1724 files identical: official / tsrs elapsed 17.3s / 2.8s, CPU 34.5s / 5.9s, sampled family RSS 2440 / 594 MiB.

Completed same-head probes, fresh compiler/test processes with warm filesystem cache:

Workload Before / after elapsed CPU Sampled family RSS
Complete typecheck: official 7.0.2 / tsrs 87.4s / 6.9s 138.8s / 13.7s 3679 / 914 MiB
Production emit: official 7.0.2 / tsrs 20.1s / 3.4s 39.5s / 7.1s 2224 / 596 MiB
PE command: latest main / CLI reuse 35.9s / 18.6s 49.5s / 25.9s 1734 / 2078 MiB

All 1724 emit files have identical SHA-256 and size. The PE comparison already includes main's named MCP bindings and changes only CLI reuse: case 28.8s / 11.3s, all 43 assertion sites retained. Baseline used an uncommitted 120s diagnostic budget to observe completion; committed tests keep 30s. Temporary variants were restored. RSS samples can double-count shared pages; no whole-CI speedup, PE memory reduction or formal soundness claim. Agent tokens unmeasured.

Earlier qualification had one external Windows PowerShell ACL probe timeout (15s, empty output). One accepted identical-SHA diagnostic rerun passed unchanged assertions/deadline and the entire lane; exact cause remains unknown. No source fix or timeout increase is claimed.

An earlier local check:pr was interrupted, not passed, with root-owned home EACCES and clean-main timing failures. Musl/remaining fallback hosts were not executed. Real-provider claims are limited to lanes actually run.

Author readiness

Human owner: @gensokyo-dev

Declarations entered under the user's explicit delegation; independent human review was not observed in this session.

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.

🔄 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/5795 **Author:** [@gensokyo-dev](https://github.com/gensokyo-dev) **Created:** 10/21/2026 **Status:** ✅ Merged **Merged:** 10/21/2026 **Merged by:** [@gensokyo-dev](https://github.com/gensokyo-dev) **Base:** `main` ← **Head:** `perf/tsrs-compiler-20261021` --- ### 📝 Commits (10+) - [`72c2d8a`](https://github.com/morluto/rea/commit/72c2d8ace4a650bfae8634c343ecbf7c28544f7a) perf(build): use tsrs on supported development hosts - [`b01aed9`](https://github.com/morluto/rea/commit/b01aed964f924fffcde38cd8ab4e51d38beb9473) docs(testing): clarify the compiler memory target scope - [`4639f85`](https://github.com/morluto/rea/commit/4639f85788d23a6bfe4fed4d0f31b4f96338b220) fix(build): align fallback compiler and dependency inventory - [`da155de`](https://github.com/morluto/rea/commit/da155dec461dc852e1032467ef3ddcbeb29220a4) fix(build): isolate the prerelease fallback from stable compiler peers - [`87c7bb7`](https://github.com/morluto/rea/commit/87c7bb7e6a9678460d9b9d2ab03b17cd6b85fc31) fix(ci): partition compiler caches and retain stable fallbacks - [`93d8590`](https://github.com/morluto/rea/commit/93d8590833c46a328339f403a8c8dcf03bb7893d) test(build): compare failure status with the selected compiler - [`3d20eac`](https://github.com/morluto/rea/commit/3d20eacc4640439893d78596e25ca4306950707d) fix(ci): retain compiler setup in cache and host-lane fixtures - [`4b9bd94`](https://github.com/morluto/rea/commit/4b9bd9485ee69b1f36624d2b0e1fdabe2e3613af) fix(ci): qualify fallback hosts for compiler input changes - [`d8d26bd`](https://github.com/morluto/rea/commit/d8d26bd241f0439f5eb5c9149569dfc1c49ca160) fix(ci): qualify compiler lifecycle hooks on fallback hosts - [`88735a2`](https://github.com/morluto/rea/commit/88735a2a264b2cf6ad50c27447dbde970cf1be61) fix(build): preserve explicit compiler resource limits ### 📊 Changes **22 files changed** (+837 additions, -46 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/ci.yml` (+6 -0) 📝 `docs/testing.md` (+28 -2) 📝 `licenses/npm-dependencies.txt` (+31 -1) 📝 `package-lock.json` (+118 -0) 📝 `package.json` (+22 -21) 📝 `scripts/ci/plan.mjs` (+25 -0) 📝 `scripts/ci/scopes.mjs` (+12 -0) 📝 `scripts/run-development-tests.mjs` (+1 -1) ➕ `scripts/run-turbo.mjs` (+11 -0) ➕ `scripts/run-typescript.d.mts` (+11 -0) ➕ `scripts/run-typescript.mjs` (+75 -0) 📝 `scripts/verify-real-browser.mjs` (+6 -0) 📝 `src/application/binary/AnalysisProviderRegistry.test.ts` (+7 -2) 📝 `tests/acceptance/applications/peResources.test.ts` (+15 -6) 📝 `tests/boundary/filesystem/ciChangeScope.test.ts` (+89 -3) 📝 `tests/boundary/filesystem/ciTestReports.test.ts` (+1 -1) 📝 `tests/boundary/filesystem/dependencyInstall.test.ts` (+3 -1) 📝 `tests/boundary/filesystem/staticTaskCache.test.ts` (+139 -4) ➕ `tests/boundary/filesystem/typescriptCompiler.test.ts` (+206 -0) 📝 `tests/boundary/mcp/providerSelectionMcp.test.ts` (+4 -1) _...and 2 more files_ </details> ### 📄 Description ## Summary Use pinned `tsrs@0.18.0-ts7.1.0-dev.20260929` for builds, typechecks and Frida binding checks on supported Linux x64/arm64 and macOS arm64. Windows and unsupported hosts retain official `typescript@7.0.2`; Windows independently checks the complete source. Three test callbacks name their existing options contract. Strictness, Termux/Stryker APIs and runtime dependencies are unchanged by this PR. Select the compiler before Turbo hashing; include its identity and both launchers in compile/typecheck caches. Missing binaries or stale identity fail. Fast CI selects fallback hosts for compiler inputs, commands and lifecycle hooks. Rust defaults to two checkers and a soft 3G no-emit target, preserving explicit resource arguments. Reduce repeated PE acceptance CLI initialization through the existing bounded compiled driver. Keep fresh PE32/PE32+ and malformed-padding wrapper checks, independent MCP coverage, every fixture/assertion and the original 30s deadline. Main now owns the omission/browser corrections and named MCP schema bindings; retain those upstream implementations. The browser verifier additionally confirms the original target remains live after disconnect. No provider authority change. ## Validation Head `36eca066f1638edda07553d02c374ab94d542618`, rebased onto main `bcfcd8b6e2ee0c44c7ac656688db5ceb61a847d5` (GPU, SQLite and JavaScript worker changes). Full CI checks merge preview `55728769e8ed668ca8a454b97375f8a6db7c773d`. Node 24.18.0 / npm 11.16.0; four-core local affinity, two checker threads, serial Turbo. - Fresh normal `npm ci` and `npm run check` passed: build, typecheck, lint, formatting, knip, metadata, module boundaries and architecture guards. Complete source also passed the official compiler directly. - Latest integrated focused run: 450 passed, 2 conditional SQLite capability skips across 15 files, including GPU, SQLite, compiler/cache/install/routing and CLI worker lifecycle. The skipped cases require native limits to be absent; this Node has them. CI separately exercises Node 24.15 compatibility. - Current [full qualification](https://github.com/morluto/rea/actions/runs/39590450889) passed on its first attempt: 40 jobs passed, 1 intentional source-only skip; 24,121 portable tests passed, 198 named conditional skips (1892 files passed, 24 skipped). All platform lanes passed. PE acceptance completed in 5.6s. Codex and Greptile completed review of this exact head with no actionable findings. Greptile did not execute tests; executed evidence comes from local checks and CI. - Compiler/launcher perturbations proved cache invalidation; a deliberately wrong selected PE output schema failed SDK validation. Controls restored. Complete real Chromium CLI/MCP verification passed locally and in full CI. Merged as `905cbaf2398c905e96a1492b6145ece13e91c3cc` onto main `33f91291`. The firmware/cleanup integration passed `npm run check` and 224 related tests across 14 files (one unsupported-host conditional skip); the later Interface Builder/immutable JSON integration passed the full static check and 26 domain tests. Final merged tree `f094b1510b8e840d5e727ffa68e96ecc7afa9ab6` exactly matches the locally tested integration. Normal squash merge; no admin/bypass. Author: `gensokyo-dev`; no Co-authored-by trailer. [Main full qualification](https://github.com/morluto/rea/actions/runs/39594664795) binds to exact merge SHA `905cbaf2` and is running. The [main push CI](https://github.com/morluto/rea/actions/runs/39594629876) failed the unchanged external Windows PowerShell ACL probe at 15s with empty stdout/stderr; typecheck and curated tests passed. No retry of that failure was requested. [Follow-up #5941](https://github.com/morluto/rea/pull/5941) removes duplicate account-name resolution and adds phase diagnostics while preserving the deadline and all ACL assertions. Exact historical timeout cause remains unconfirmed. A fresh emit comparison on the actual merge commit found all 1724 files identical: official / tsrs elapsed 17.3s / 2.8s, CPU 34.5s / 5.9s, sampled family RSS 2440 / 594 MiB. Completed same-head probes, fresh compiler/test processes with warm filesystem cache: | Workload | Before / after elapsed | CPU | Sampled family RSS | | --- | --- | --- | --- | | Complete typecheck: official 7.0.2 / tsrs | 87.4s / 6.9s | 138.8s / 13.7s | 3679 / 914 MiB | | Production emit: official 7.0.2 / tsrs | 20.1s / 3.4s | 39.5s / 7.1s | 2224 / 596 MiB | | PE command: latest main / CLI reuse | 35.9s / 18.6s | 49.5s / 25.9s | 1734 / 2078 MiB | All 1724 emit files have identical SHA-256 and size. The PE comparison already includes main's named MCP bindings and changes only CLI reuse: case 28.8s / 11.3s, all 43 assertion sites retained. Baseline used an uncommitted 120s diagnostic budget to observe completion; committed tests keep 30s. Temporary variants were restored. RSS samples can double-count shared pages; no whole-CI speedup, PE memory reduction or formal soundness claim. Agent tokens unmeasured. Earlier [qualification](https://github.com/morluto/rea/actions/runs/39584801109) had one external Windows PowerShell ACL probe timeout (15s, empty output). One accepted identical-SHA diagnostic rerun passed unchanged assertions/deadline and the entire lane; exact cause remains unknown. No source fix or timeout increase is claimed. An earlier local `check:pr` was interrupted, **not passed**, with root-owned home EACCES and clean-main timing failures. Musl/remaining fallback hosts were not executed. Real-provider claims are limited to lanes actually run. ## Author readiness Human owner: @gensokyo-dev Declarations entered under the user's explicit delegation; independent human review was not observed in this session. - [x] I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work. - [x] I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps. - [x] I declare this PR ready for initial maintainer review. ## Before merge - [x] This PR addresses a concrete problem or an agreed enhancement. - [x] Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-01 21:45:08 +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#7068
No description provided.