Skip to content

improve: make ACP process checks faster and stable - #122229

Merged
steipete merged 1 commit into
mainfrom
perf/acp-process-duplicates
Aug 11, 2026
Merged

steipete merged 1 commit into
mainfrom
perf/acp-process-duplicates

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Resolves a CI stability and runtime problem where the agentic CLI shard launches five separate ACP child processes, including a redundant acp --help case that reached its 30-second timeout on a hosted exact-head run.

Why This Change Was Made

Keeps the two unique ACP bridge process contracts: disconnect after a framed initialize request, and processing input buffered before Gateway hello. The weaker empty-stdin case is removed. Root and nested ACP help remain covered through the real dynamic registrar as concurrent in-process checks that assert exact usage, successful help exit, empty stderr, and action suppression.

The generic real-process help exit contract remains owned by help-exit.process.test.ts; no production code changes.

User Impact

No user-visible runtime behavior changes. Contributors get a faster, less flaky CLI process shard without losing ACP help or bridge-exit coverage.

Evidence

  • Focused ACP process test body: 15.035s → 8.221s (45.3% faster).
  • Focused ACP Vitest duration: 19.58s → 12.36s (36.9% faster).
  • ACP child-process cases: 5 → 2.
  • ACP process + help owner: 22/22 passed after the final review fix.
  • ACP option/registration owner suites: 30/30 passed; generic help owner: 20/20 passed.
  • oxfmt --check and git diff --check passed.
  • Hosted failure being removed: acp --help timed out at 30.253s.
  • Final independent review: approve, no blockers. The repository autoreview wrapper also completed its secret scan; no supported external reviewer executable is installed in this orb, so the available read-only expert reviewer was used.

Production LOC: +0/-0 | Tests: +41/-50 (net -9)

@clawsweeper

clawsweeper Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added cli CLI command changes size: S maintainer Maintainer-authored PR labels Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

Hosted exact-ref A/B on checks-node-agentic-cli:

  • Baseline b955a7b989776d325e36049d60756c5a417a7a2b: src/cli/acp-cli-exit.process.test.ts — 5 tests, 19.679s (run)
  • Head 994fa4bad91d9bcea450845f98683c574d69f319: 2 tests, 11.813s (run)
  • Improvement: 40.0% faster (7.866s removed) on the same hosted workflow/config.

The separate help owner remained green with both new real-registrar ACP cases. All four files in the hosted cli-process config passed at head; importantly, the removed acp --help child no longer exists to hit the observed 30s deadlock guard.

@steipete
steipete merged commit 7a1d5a8 into main Aug 11, 2026
103 checks passed
@steipete
steipete deleted the perf/acp-process-duplicates branch August 11, 2026 19:40

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes maintainer Maintainer-authored PR size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants