Repository navigation
perf(cli): split plugin registry startup timing - #119318
Conversation
Punchcard-Session: coral-workshop-workshop-3f
|
@clawsweeper review |
|
🦞👀 Command router queued. I will update this comment with the next step. |
Punchcard-Session: coral-workshop-workshop-3f
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: needs maintainer review before merge. Reviewed August 4, 2026, 4:03 PM ET / 20:03 UTC. ClawSweeper reviewWhat this changesThe PR separates CLI plugin-registry startup diagnostics into lazy module-import and registry-runtime-load timing spans while keeping the existing aggregate span. Merge readinessNo blocking correctness or security finding: the PR preserves the existing aggregate startup span and adds its child spans at the loader boundary. Current main does not contain this observability improvement, so this maintainer-authored PR remains useful for normal human review. Priority: P3 Review scores
Verification
How this fits togetherCLI startup conditionally loads plugin metadata before commands run. The diagnostics timeline records that startup work so maintainers can distinguish import-graph cost from registry activation cost. flowchart LR
A[CLI startup] --> B[Plugin registry aggregate]
B --> C[Lazy module import]
C --> D[Registry runtime load]
D --> E[Diagnostics timeline]
E --> F[Performance analysis]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +6, Tests +34. Total +40 across 2 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Land the nested timing breakdown after a human reviewer confirms the latest PR-review discussion has no remaining rank-up move. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR adds timing observability rather than repairing a reported user failure; its timeline behavior is directly covered by source and focused tests. Is this the best way to solve the issue? Yes. The loader is the narrow owner boundary between the lazy module import and synchronous registry activation, while command bootstrap retains the aggregate stage needed for total startup timing. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against aa07d55ec98f. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Maintainer review completed on exact head I reviewed the latest ClawSweeper discussion plus the repo-native review and prepare artifacts. There are no blocking correctness or security findings, and no code-changing rank-up move remains. The stored-data note is a test-only diagnostics timeline JSONL assertion in The ClawSweeper |
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: perf(cli): split plugin registry startup timing This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
|
Merged via squash.
|
Punchcard-Session: crisp-lantern-orchard-nv * origin/main: fix(release): accept legacy empty core artifacts (#119337) fix(qa): carry selected runtime into flow scenarios (#119324) fix(ci): retry interrupted Windows dashboard release checks (#119095) fix(release): filter validation ancestry fetch (#119334) fix(release): accept trusted extended-stable validation evidence (#119264) fix(sessions): preserve recorder-owned user turns (#119307) perf(cli): split plugin registry startup timing (#119318) fix(qa): align release scenario setup and compaction proof (#119188) fix(ci): avoid duplicate Matrix release QA runs (#119171)
…time * origin/main: (75 commits) fix(commands): restore tool inventory for dynamic models (#119306) fix(media): release rejected BytePlus and Runway video downloads under debug capture (#119257) docs: add ChromeOS (Crostini) platform install guide (#107663) test(msteams): serve JWKS from in-process server in auth coverage (#119354) fix(qa): enable OpenAI for stored audio scenario (#119349) test(agents): realpath apply-patch temp dir fixture (#119353) test(slack): drop redundant .js-suffixed system-event mock (#119352) fix(exec): leave safe builtins unrewritten in enforced mode (#119351) fix(sessions): keep gateway responsive while large transcript archives are built (#112424) fix(tui): restore provider auth in installed local mode (#119283) fix(release): accept legacy empty core artifacts (#119337) fix(qa): carry selected runtime into flow scenarios (#119324) fix(ci): retry interrupted Windows dashboard release checks (#119095) fix(release): filter validation ancestry fetch (#119334) fix(release): accept trusted extended-stable validation evidence (#119264) fix(sessions): preserve recorder-owned user turns (#119307) perf(cli): split plugin registry startup timing (#119318) fix(qa): align release scenario setup and compaction proof (#119188) fix(ci): avoid duplicate Matrix release QA runs (#119171) perf(agents): reuse provider policy manifest registry (#119305) ...
* perf(cli): split plugin registry startup timing Punchcard-Session: coral-workshop-workshop-3f * test(cli): use managed temp directory cleanup Punchcard-Session: coral-workshop-workshop-3f
What Problem This Solves
Latest-main Kova runs can attribute roughly 1.3 seconds to CLI plugin-registry startup, but the existing aggregate cannot distinguish lazy module import from runtime registry loading. That makes the next performance change speculative.
Why This Change Was Made
Add nested
cli.command-startupspans for the plugin-registry module import and runtime load while preserving the existing parent aggregate. Plugin activation, config handling, cache behavior, and log routing remain unchanged.User Impact
There is no direct user-visible behavior change. Maintainers can now identify whether CLI plugin startup time belongs to the import graph or registry work before choosing an optimization.
Evidence
kova-260804-185805-67747apassed 5/5 at832459d2ae76; the existingplugin-registrystage remained the largest unattributed warm-start bucket.node scripts/run-vitest.mjs src/cli/plugin-registry-loader.test.ts src/cli/command-bootstrap.test.ts src/cli/command-startup-timing.test.ts(14 tests passed).tsgochecks passed.env CI=1 PNPM_CONFIG_VERIFY_DEPS_BEFORE_RUN=false node scripts/build-all.mjs cliStartuppassed.oxfmt,oxlint, andgit diff --checkpassed.AI-assisted: yes. The implementation, ownership boundary, and proof were verified against current
main.Punchcard-Session: coral-workshop-workshop-3f