Repository navigation
test(cli): reduce redundant process launches - #118141
Conversation
fac2af3 to
39abf13
Compare
|
Codex review: needs maintainer review before merge. Reviewed August 2, 2026, 4:18 PM ET / 20:18 UTC. ClawSweeper reviewWhat this changesThis test-only PR reduces redundant CLI process launches by retaining representative lifecycle coverage and moving command-specific help fallback and debug-proxy warning checks to their direct owners. Merge readinessKeep this PR open for protected maintainer handling. The prior coverage finding is addressed: the branch now proves both that the precomputed-help fast path declines Priority: P2 Review scores
Verification
How this fits togetherThe CLI entry point handles eligible help requests before loading the main command runtime; otherwise it passes the original argv to the normal Commander-based command tree. The PR keeps process tests for entry/lifecycle behavior while unit tests cover the secrets command parser and debug-proxy warning owner directly. flowchart LR
Args[CLI arguments] --> FastPath[Precomputed help fast path]
FastPath -->|handled| Help[Help output and exit]
FastPath -->|declines| Entry[CLI entry point]
Entry --> Commander[Commander command parser]
Commander --> Secrets[Secrets apply command]
Secrets --> Error[Exit code and diagnostic]
Entry --> Lifecycle[Process lifecycle checks]
Decision needed
Why: The patch has no remaining concrete correctness finding, but the Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests -411. Total -411 across 4 files. View PR surface stats
Review metricsNone. Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Preserve the streamlined process suite and land the branch after the protected maintainer review confirms that the direct tests remain the canonical owners of the fast-path and secrets-parser contracts. Do we have a high-confidence way to reproduce the issue? Not applicable: this is a test-only PR. The relevant verification is source-level comparison of the deleted process assertion with the replacement tests and entry-point composition. Is this the best way to solve the issue? Yes. The direct tests align with the ownership boundary: the precomputed-help test owns fast-path rejection, the secrets test owns Commander parsing and diagnostic behavior, and the process suite retains lifecycle coverage. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 3a2337ece4f9. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
@steipete it might get a regression-detection gap, especially for the Commander fallback and JSON console path. Subsequent production regressions would be needed. |
* origin/main: feat(gateway): track event-loop degradation persistence and add concurrency benchmark (#118193) fix(config): preserve secret ownership when configuration rows move (#118149) fix(cron): deliver failure alerts after persistence (#118200) chore(lint): clear 172 lint:all baseline violations in five batches (#118098) perf(gateway): remove streaming hot-path rescans (#118192) test(gateway): use in-memory task registry (#118191) test(macos): fix three races in the bounded process suites (#118196) refactor(migrate-hermes): consolidate test fixtures (#118182) test(android): share Wear transport fixtures (#118177) test(ui): deduplicate control UI e2e setup (#118180) fix(plugins): unblock prerelease validation (#118103) test(cli): reduce redundant process launches (#118141) test(gateway): compact terminal observer fixtures (#118179) fix(agents): make requested threads sidebar-visible (#118073) test(plugins): canonicalize native resolver fixtures (#118174) test: deduplicate agent runner fixtures (#118176) refactor(policy): consolidate doctor test fixtures (#118173) fix(plugins): remove disabled channel plugin configuration on uninstall (#118127) refactor(matrix): consolidate monitor test fixtures (#118175)
* test(cli): reduce redundant process launches * test(proxy): complete debug coverage fixture * test(cli): preserve secrets help fallback --------- Co-authored-by: Peter Steinberger <[email protected]>
* origin/main: feat(gateway): track event-loop degradation persistence and add concurrency benchmark (openclaw#118193) fix(config): preserve secret ownership when configuration rows move (openclaw#118149) fix(cron): deliver failure alerts after persistence (openclaw#118200) chore(lint): clear 172 lint:all baseline violations in five batches (openclaw#118098) perf(gateway): remove streaming hot-path rescans (openclaw#118192) test(gateway): use in-memory task registry (openclaw#118191) test(macos): fix three races in the bounded process suites (openclaw#118196) refactor(migrate-hermes): consolidate test fixtures (openclaw#118182) test(android): share Wear transport fixtures (openclaw#118177) test(ui): deduplicate control UI e2e setup (openclaw#118180) fix(plugins): unblock prerelease validation (openclaw#118103) test(cli): reduce redundant process launches (openclaw#118141) test(gateway): compact terminal observer fixtures (openclaw#118179) fix(agents): make requested threads sidebar-visible (openclaw#118073) test(plugins): canonicalize native resolver fixtures (openclaw#118174) test: deduplicate agent runner fixtures (openclaw#118176) refactor(policy): consolidate doctor test fixtures (openclaw#118173) fix(plugins): remove disabled channel plugin configuration on uninstall (openclaw#118127) refactor(matrix): consolidate monitor test fixtures (openclaw#118175)
Summary
secrets apply --from --helpand required debug-proxy warning assertions to their direct ownersPerformance
help-exit.process.test.ts: 69.37s to 25.68s (63% faster)Proof
node scripts/run-vitest.mjs src/cli/secrets-cli.test.ts src/cli/precomputed-help.test.ts src/cli/help-exit.process.test.ts src/proxy-capture/coverage.test.ts— 53/53 passed across three test projects in 32.46scli-processplan: 36/36 tests passed in 46.79sgit diff --checkoxfmton touched filesTest-only change; no changelog entry.