Skip to content

improve: speed CLI capture tests#107993

Merged
steipete merged 1 commit into
mainfrom
codex/speed-cli-capture-suites
Jul 15, 2026
Merged

improve: speed CLI capture tests#107993
steipete merged 1 commit into
mainfrom
codex/speed-cli-capture-suites

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Two CLI runner test suites spent most of their test-body time waiting for the MCP loopback late-admission grace period, despite testing CLI capture behavior rather than the grace period itself.

Why This Change Was Made

The suites now partially mock the MCP loopback runtime and force only the test-local admission grace to zero. Production behavior stays unchanged, and the real late-admission timing contract remains covered in src/gateway/mcp-http.test.ts.

User Impact

No user-visible behavior change. Developers and CI get faster focused CLI runner feedback.

Evidence

  • src/agents/cli-runner.reliability.test.ts: 2.984s -> 0.818s test-body time (72.6% faster), 79/79 passing.
  • src/agents/cli-runner.spawn.test.ts: 2.355s -> 1.295s test-body time (45.0% faster), 89/89 passing.
  • Combined test-body time: 5.339s -> 2.113s (60.4% faster).
  • Exact Testbox run: https://github.com/openclaw/openclaw/actions/runs/29387848457
  • check:changed reached an inherited stale extensions/qa-matrix/src/substrate/client.ts max-lines baseline entry already present on origin/main; no failure involved either changed test file.
  • Fresh autoreview: clean, confidence 0.95.

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: XS maintainer Maintainer-authored PR labels Jul 15, 2026
@steipete steipete self-assigned this Jul 15, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

Land-ready at exact head 765fa60b61d935f020576933662369d13cd82c4b.

Proof:

Production behavior is unchanged. The late-admission grace contract remains directly covered by src/gateway/mcp-http.test.ts. No docs or changelog needed for this test-only optimization. Broad unrelated CI lanes were not held under the requested relaxed-CI policy.

@steipete
steipete merged commit 81d634b into main Jul 15, 2026
109 of 115 checks passed
@steipete
steipete deleted the codex/speed-cli-capture-suites branch July 15, 2026 04:16
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling maintainer Maintainer-authored PR size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant