Skip to content

perf(ci): use tsrs and reduce PE acceptance startup - #5795

Merged
gensokyo-dev merged 12 commits into
mainfrom
perf/tsrs-compiler-20261021
Oct 21, 2026
Merged

gensokyo-dev merged 12 commits into
mainfrom
perf/tsrs-compiler-20261021

Conversation

@gensokyo-dev

@gensokyo-dev gensokyo-dev commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-21T11:19:01.039476Z 36eca06 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5617badad8

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread package.json Resolved
@greptile-apps

greptile-apps Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5 Tier: plus

[High impact] The PR appears safe to merge; no new actionable defect was found.

Summary

The PR selects pinned tsrs on supported hosts, separates compiler caches, and reduces repeated PE acceptance startup.

  • PE acceptance tests reuse compiled CLI startup for repeated cases.
  • Repository compile and typecheck tasks use the compiler selected for each host.
  • Compiler changes select CI lanes for the hosts that use them.
  • The browser verifier checks that a page target remains after transport loss.

No new actionable issue was found. Tests were not run because dependencies were absent. Live replacement status could not be checked because GitHub authentication was unavailable.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Npm or focused tests] --> B[Select host compiler]
  B --> C[Set compiler package and version]
  C --> D[Turbo hashes compiler identity and launchers]
  D --> E{Matching cache entry?}
  E -->|Yes| F[Restore outputs]
  E -->|No| G[Run selected compiler]
  G --> H[Store outputs under matching identity]
Loading

Reviews (13) · Last reviewed commit: "fix(ci): avoid redundant PE acceptance i..." · Reviewed by Greptile

Comment thread turbo.json Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0b6eefb325

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread package.json Resolved
@gensokyo-dev

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review current head 5973157, including compiler-version alignment, the stable peer/fixture dependency split, and the tracked dependency inventory update.

@morluto

morluto commented Oct 21, 2026

Copy link
Copy Markdown
Owner

directionally very good

@gensokyo-dev
gensokyo-dev force-pushed the perf/tsrs-compiler-20261021 branch from 5973157 to c714e2f Compare October 21, 2026 06:36
@gensokyo-dev

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review final rebased head c714e2f. It retains the original stable fallback and partitions compiler caches before lookup, with a real Go-success/Rust-error cache regression and an observed stale-success negative control.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: c714e2f900

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@gensokyo-dev

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review d34bdaf. The delta from the reviewed c714e2f is a Windows test-oracle correction: compare the wrapper’s failure status with a direct invocation of the selected compiler while retaining the TS2322 assertion. Windows’ official compiler returns 1 where Rust returned 2. The 14 focused compiler tests and check:fast passed; runtime/build sources are unchanged.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: d34bdafe15

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@gensokyo-dev
gensokyo-dev force-pushed the perf/tsrs-compiler-20261021 branch from 54e0055 to c840166 Compare October 21, 2026 07:24
@gensokyo-dev

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review current rebased head c840166 on latest main a5f982d. The final follow-up adds the Windows compiler test to its central CI lane owner and makes the cached-build dependency/resource fixtures include and invoke the shared compiler/Turbo entrypoints. 284 focused tests and the complete rebased-head static gate passed.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c840166165

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread scripts/ci/scopes.mjs Resolved
@gensokyo-dev

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review current head 866ca39. It closes compiler-input ownership over both launchers/configuration/lockfile and relevant compiler manifest fields, so fast PRs exercise the official fallback lane. 295 focused tests and complete static checks passed; the regression fails under the old test-only ownership.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 866ca392e3

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread scripts/ci/plan.mjs Resolved
@gensokyo-dev
gensokyo-dev force-pushed the perf/tsrs-compiler-20261021 branch from 866ca39 to 6dc59b2 Compare October 21, 2026 08:40
@gensokyo-dev

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review exact head 6dc59b2, rebased onto current main 5241597. Compiler lifecycle hooks now select fallback host checks; Windows independently runs the complete official-compiler source typecheck before build reuse. Final focused tests: 307 passed; rebased static checks passed. Full CI remains enabled.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: 6dc59b230b

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@gensokyo-dev
gensokyo-dev force-pushed the perf/tsrs-compiler-20261021 branch from 6dc59b2 to 2d33825 Compare October 21, 2026 09:00
@gensokyo-dev gensokyo-dev changed the title perf(build): use tsrs on supported development hosts fix(ci): restore verification and accelerate supported compilers Oct 21, 2026
@gensokyo-dev

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review exact head 9a479c9 on current main f801b2f. The user expanded scope to correctly repair main CI failures. The CLI requiredness gate now distinguishes object-key omission from explicit undefined for exactOptional; the real-browser verifier requires transport_disconnected, rejects invented target_terminated and confirms the same target remains live. Both old failures reproduced; 37 affected tests and the complete real Chromium CLI/MCP verifier passed. Compiler resource defaults also preserve explicit --checkers/--maxMemory choices (324 focused tests passed). Full CI remains enabled; final static checks passed.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9a479c9025

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread .github/workflows/ci.yml Resolved
@gensokyo-dev

Copy link
Copy Markdown
Collaborator Author

@codex review

Please re-evaluate exact head 9a479c9 with the pinned compiler evidence for P1 r4335067946. Official native typescript@7.0.2 advertises --checkers in its own --help --all; the actual Windows full source typecheck with --checkers 2 has passed on this exact head (job119139792910). Reply4335083762 includes command output and real Windows CI links, and the thread is resolved. No source change was warranted; please use the actual pinned package/runtime results when checking this finding. Full CI has30 successful jobs and no failures so far, including the repaired real-browser lane.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: 9a479c9025

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@gensokyo-dev

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review exact head 46e3d3f. The preceding full run had one remaining primary failure: PE acceptance exceeded30s. Completed profiling found15 cold CLI invocations and SDK eager compilation of every catalog output schema. The PE matrix now reuses existing bounded runFileCli while retaining fresh PE32/PE32+ and raw-padding wrapper checks; all MCP calls bind actual named live tools/list definitions. Same fixtures,43 expect sites, output/identity/error/cleanup assertions and30s deadline retained. A wrong-schema control still fails through SDK output validation.71 related tests and15 actual shared-driver tests passed (overlapPE), with complete PE case11.6/24.9/17.3s. Final static checks passed and full CI is running. Prior official7.0.2 --checkers concern was disproved by its own --help --all and actual Windows CI; r4335083762 records that evidence.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: 46e3d3fe94

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@gensokyo-dev
gensokyo-dev force-pushed the perf/tsrs-compiler-20261021 branch from 46e3d3f to 898e2a9 Compare October 21, 2026 10:28
@gensokyo-dev gensokyo-dev changed the title fix(ci): restore verification and accelerate supported compilers perf(ci): use tsrs and reduce PE acceptance startup Oct 21, 2026
@gensokyo-dev

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review exact head 898e2a9 after rebase onto main5eebe2fdf. Full CI39580474248 qualified the prior merge tree (40success/1intentional skip,24009 portable tests passed), including PE in9.2s. Main subsequently incorporated overlapping omission/browser fixes plus Apple/manifest changes. We adopted the complete stronger upstream omission tests and upstream browser assertions, retaining only our extra live-target countercheck. The compiler/PE fixes are unchanged; fresh rebased static checks passed and full CI39584801109 is running. Review the final diff against latest main; prior official7.0.2 checker-flag evidence remains in r4335083762.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: 898e2a93c2

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@gensokyo-dev
gensokyo-dev force-pushed the perf/tsrs-compiler-20261021 branch from 898e2a9 to f3e4d58 Compare October 21, 2026 11:07
Check missing fields at the Zod object boundary, preserving the difference
between exact optional omission and explicit undefined. Require a transport
disconnect observation without inventing target termination, and verify
that the original browser target remains advertised after transport loss.

Assisted-by: Reimu (gensokyo-skills:reimu-incident-triage)
Bind SDK calls to the current named tool definitions so validation prepares
only the selected output schemas. Reuse the bounded compiled CLI for the
stateless matrix while retaining fresh wrapper checks for both PE formats
and raw-padding rejection. Keep all fixture, identity, output and cleanup
assertions, the independent MCP connection and the original 30s deadline.

Assisted-by: Reimu (gensokyo-skills:reimu-incident-triage)
@gensokyo-dev
gensokyo-dev force-pushed the perf/tsrs-compiler-20261021 branch from f3e4d58 to 36eca06 Compare October 21, 2026 11:14
@gensokyo-dev

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review exact head 36eca06, rebased onto bcfcd8b. Retains upstream named PE MCP definitions and worker lifetime ownership; our net PE change reuses the existing bounded CLI. Combined dependency inventory was regenerated from the lockfile, preserving the upstream GPU runtime dependency. Fresh npm ci and full static checks passed; latest-main integrated focused tests and full ci:full qualification are being refreshed. Please inspect compiler cache identity, fallback host coverage, CLI resource lifetime, and the current main integration.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: 36eca066f1

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@gensokyo-dev
gensokyo-dev merged commit 905cbaf into main Oct 21, 2026
49 of 51 checks passed
@gensokyo-dev
gensokyo-dev deleted the perf/tsrs-compiler-20261021 branch October 21, 2026 11:47
@github-actions github-actions Bot mentioned this pull request Oct 21, 2026
3 tasks done
@morluto morluto added area: build Build, CI, packaging, and publishing performance Performance regressions, scaling limits, and bounded-resource work labels Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: build Build, CI, packaging, and publishing ci:full performance Performance regressions, scaling limits, and bounded-resource work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants