improve(gateway): speed up pristine plugin-heavy startup [AI]#106195
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3458f92e91
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
3458f92 to
4b2a540
Compare
1264ba7 to
c7edaa3
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c7edaa3ea6
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
c7edaa3 to
21da079
Compare
|
Codex review: stale review; fresh review needed. Summary Next step |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 21da0790d4
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
21da079 to
ed243b6
Compare
|
Land-ready at Proof:
Known proof gaps: none. |
|
Merged via squash.
|
…aw#106195) * perf(gateway): skip absent core startup migrations * fix(gateway): revalidate recovered startup config
…aw#106195) * perf(gateway): skip absent core startup migrations * fix(gateway): revalidate recovered startup config
Closes #106194
What Problem This Solves
Fixes an issue where users starting a Gateway against a pristine state root would wait for unrelated core legacy-migration detector imports when local plugins were configured. Plugin-heavy first starts paid this cost even though no core state existed to migrate.
Why This Change Was Made
The Gateway now captures the physically pristine core-state fact before selection can create runtime files, then carries it through the existing bootstrap seam. Startup skips only core migration discovery when that fact remains safe; plugin-owned doctor migrations still run, and existing core state, external session stores,
$include, or stateful core config retain the full migration path.This keeps one canonical migration boundary and adds no cache, config, protocol, persistence, compatibility shim, or fallback.
User Impact
Newly provisioned Gateways become ready sooner, especially with many local plugins. Existing installations and migration behavior are unchanged.
Release note: Faster first Gateway startup for plugin-heavy configurations.
Evidence
Controlled Blacksmith Testbox A/B: 7 measured runs, 2 warmups, p50.
/readyz4911.3 ms -> 4242.9 ms (-13.6%); bootstrap 2711.2 ms -> 2289.9 ms (-15.5%)./readyz4603.2 ms -> 4287.0 ms (-6.9%); bootstrap 2741.9 ms -> 2426.6 ms (-11.5%)./readyz3184.7 ms -> 3039.7 ms (-4.6%); bootstrap remained flat (143.7 ms -> 143.1 ms).Exact rebased-head proof at
ed243b617059on direct AWS Crabboxcbx_8df19c39207d(run):pnpm build/readyzp50 4797.5 ms; 50 plugins 7509.1 ms; 50 startup-lazy plugins 7260.3 msPre-commit autoreview: clean, no accepted/actionable findings. GitHub review's same-path recovery edge is fixed by revalidating the final guarded config without repeating physical-state discovery.
AI-assisted implementation; maintainer-reviewed behavior and proof.