perf: speed up secrets and nodes help startup#84818
Conversation
|
Codex review: needs maintainer review before merge. Workflow note: Future ClawSweeper reviews update this same comment in place. How this review workflow works
Summary Reproducibility: not applicable. this is a performance PR, not a bug report with a failing current-main reproduction. The PR body provides before/after benchmark commands, and source inspection confirms the affected help path is startup/metadata routing. PR rating Rank-up moves:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. Real behavior proof Risk before merge
Maintainer options:
Next step before merge Security Review detailsBest possible solution: Resolve the current changelog conflict, then land the fast path after exact-head validation confirms metadata generation, launcher bypass, entry fallback, and plugin-sensitive nodes help behavior. Do we have a high-confidence way to reproduce the issue? Not applicable: this is a performance PR, not a bug report with a failing current-main reproduction. The PR body provides before/after benchmark commands, and source inspection confirms the affected help path is startup/metadata routing. Is this the best way to solve the issue? Yes: reusing the existing precomputed help metadata architecture is the right fit, and the nodes path preserves the plugin-sensitive fallback. The remaining issue is merge readiness, not a different implementation approach. Label justifications:
What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 4a360ac1cc18. |
|
ClawSweeper PR egg ✨ Hatched: 🥚 common Clockwork Review Wisp Hatch commandComment Hatchability rules:
Rarity: 🥚 common. What is this egg doing here?
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
9930253 to
d65ae1b
Compare
|
Merged via squash.
Thanks @frankekn! |
Summary
secrets --helpandnodes --helpRoot Cause
Parent help was taking the normal command-registration path, which eagerly loaded action/runtime-heavy secrets and nodes modules even though parent help only needs static command metadata.
Startup Bench
secrets --help: 800.6ms / 337.6MB RSS -> 23.8ms / 46.8MB RSSnodes --help: 923.5ms / 344.7MB RSS -> 28.3ms / 46.7MB RSSVerification
OPENCLAW_HEAVY_CHECK_LOCK_SCOPE=worktree pnpm test src/entry.test.ts src/cli/run-main.test.ts src/cli/run-main.exit.test.ts src/cli/help-cold-imports.test.ts test/scripts/write-cli-startup-metadata.test.ts src/cli/secrets-cli.test.ts src/cli/nodes-cli.coverage.test.ts src/cli/program/register.subclis.test.ts test/openclaw-launcher.e2e.test.ts -- --reporter=defaultOPENCLAW_HEAVY_CHECK_LOCK_SCOPE=worktree pnpm buildOPENCLAW_HEAVY_CHECK_LOCK_SCOPE=worktree pnpm tsgoOPENCLAW_HEAVY_CHECK_LOCK_SCOPE=worktree pnpm test:startup:bench -- --case secretsHelp --case nodesHelp --runs 3 --warmup 1 --json --output .artifacts/perf-secrets-nodes-help-after.jsonReview