Skip to content

Cache compiled main-process code and gate startup time in CI (#418) - #1662

Merged
currentbits merged 2 commits into
mainfrom
coder/electron-architecture-agent-host-utility-d9f188
Oct 18, 2026
Merged

currentbits merged 2 commits into
mainfrom
coder/electron-architecture-agent-host-utility-d9f188

Conversation

@currentbits

Copy link
Copy Markdown
Owner

Part of #418. The agent-host rewrite is split out to #1661.

What changes

  • electron/main.js now calls module.enableCompileCache() before any other require. On warm launches the store/runner/ipc/services require graph drops from about 80 ms to about 70 ms (Electron 35.7 / Node 22.16). Node keys cache entries by file content and runtime version, so an app update cannot load stale bytecode. NODE_DISABLE_COMPILE_CACHE=1 turns it off.
  • electron/smoke.js gains a startup gate. It times process start to the first React mount and logs it as {"step":"startup","ms":…}. Smoke fails if that takes longer than SOLENTA_STARTUP_BUDGET_MS (default 15 s). It runs on the macOS, Windows and Linux smoke jobs.

Already on main from earlier work

Verification

  • Smoke passed twice in a CI-comparable env (no CODER_* vars, node-only PATH), with startup at 1148 ms and 1835 ms.
  • With SOLENTA_STARTUP_BUDGET_MS=300 the smoke run exits 1 with startup took 1352 ms, over the 300 ms budget.
  • The electron tests that read main.js/smoke.js pass: 193 pass, 0 fail.

Limits

  • The 15 s budget only catches multi-second regressions, because CI runners vary about 3x. Tighten it once the CI logs give real per-OS numbers.
  • Smoke boots its own harness, not main.js, so main-only boot work (memory supervisor, schedulers) is not timed.

🤖 Generated with Claude Code

)

module.enableCompileCache() before the main-process require graph (~10-15%
off it, warm). smoke.js now times process start to first React mount and
fails over SOLENTA_STARTUP_BUDGET_MS (default 15 s) on every OS job.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 18, 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-18T19:48:06.159952Z 7c8b3bf PR opened
ℹ️ 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.

@currentbits
currentbits enabled auto-merge (squash) October 18, 2026 19:49
@currentbits
currentbits merged commit 4875c47 into main Oct 18, 2026
6 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