Skip to content

improve: trim duplicate gateway CLI process tests - #122240

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

steipete merged 1 commit into
mainfrom
perf/gateway-backed-process-duplicates

Conversation

@steipete

@steipete steipete commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

The gateway-backed CLI process suite paid for seven serial Node + TSX process launches even though four of them replayed error classification and JSON-routing contracts already owned by focused command and formatter tests. The focused file took 18.936s in exact-ref hosted CI and was a recurring CLI-shard hotspot.

Why This Change Was Made

Keep three distinct real boundaries: the system-CA one-shot shutdown regression, one missing-credential JSON/exit composition sentinel through the real health entry point, and the real pre-hello WebSocket rate-limit path. Remove the explicit-URL, routed gateway-health, generic gateway-call, and authenticated-unreachable process replays; their semantics remain covered at the health command, routed-health, gateway registration, and call/formatter owners.

Independent review also found that timeout cleanup killed a tracked child without clearing its stale object from activeChildren; teardown now clears that set after child cleanup.

User Impact

No runtime behavior changes. Developers and CI run four fewer full CLI processes while retaining the process and transport regressions that cannot be proven by in-process tests.

Evidence

  • Hosted exact-ref target: 18.936s → 9.286s (51.0% faster); both CLI jobs passed. Retained cron and rate-limit controls stayed within 1%, so the A/B was stable.
    • Baseline job at 01cd9cc2a80d71d6adb697938fe01fafb2feeb00
    • Head job at 6a9b650970bfb6dd2c97213f64e38fcd7143f2fd
  • Entire shared cli-process config: 77.47s → 69.01s (10.9% faster).
  • Local focused Vitest duration: 25.21s → 10.71s (57.5% faster).
  • Test body: 21.853s → 9.323s (57.3% faster).
  • Wrapper wall time: 31.88s → 17.07s (46.5% faster).
  • Final focused run after teardown cleanup: 3/3 passed in 10.06s.
  • Owner suites: 298/298 passed across src/gateway/call.test.ts, src/commands/health.test.ts, src/cli/gateway-cli/health-route.test.ts, and src/cli/gateway-cli.coverage.test.ts.
  • oxfmt --check and git diff --check passed.
  • Independent expert review: approve; no blocking findings. Its only cleanup finding was fixed.
  • Bundled autoreview secret scan passed twice, but the configured Codex executable is unavailable in this orb; no model review ran through that helper.

@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
@steipete
steipete marked this pull request as ready for review August 11, 2026 20:05
@steipete steipete self-assigned this Aug 11, 2026
@steipete
steipete force-pushed the perf/gateway-backed-process-duplicates branch from 82d1472 to 6a9b650 Compare August 11, 2026 20:07

Copy link
Copy Markdown
Contributor Author

Land-ready evidence for exact head 6a9b650970bfb6dd2c97213f64e38fcd7143f2fd:

Known review-tool gap: the bundled autoreview exact-diff TruffleHog scan passed twice, but this orb has no configured Codex executable, so that helper could not run its model phase. The independent expert review covered the final diff instead.

@steipete
steipete merged commit 01c1ebf into main Aug 11, 2026
106 checks passed
@steipete
steipete deleted the perf/gateway-backed-process-duplicates branch August 11, 2026 20:25

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit to tangtaizong666/openclaw that referenced this pull request Aug 11, 2026
…-prep

* commit 'edb7a1692e58d78ff7e196db39ea8eff297b2e19': (1351 commits)
  fix(telegram): expose live location updates to hooks (openclaw#122185)
  fix(ui): remove the pre-creation session row (openclaw#122259)
  fix(openai): surface failed realtime response outcomes (openclaw#121177)
  fix(logging): publish diagnostics ZIP through staged atomic overwrite (openclaw#122130)
  test(cli): trim duplicate MCP probe process cases (openclaw#122260)
  feat(agents): replay persisted native video (openclaw#122257)
  fix(test): serialize default e2e runner (openclaw#122203)
  fix(ui): always show full assistant responses (openclaw#122207)
  feat(mcp): per-requester OAuth for MCP servers (openclaw#122166)
  fix(ui): preserve focus on composer accessory clicks (openclaw#122243)
  fix(backup): exclude state temp files (openclaw#122250)
  fix(browser): let attached workers exit after CDP use (openclaw#122103)
  test(cli): trim duplicate Claw authoring process cases (openclaw#122248)
  refactor(outbound): inline delivery diagnostics (openclaw#122219)
  refactor: eliminate final wrapper-shadowing hazards (openclaw#122157)
  fix(ui): keep new-session identity anchored (openclaw#122242)
  test(cli): trim duplicate gateway process cases (openclaw#122240)
  fix(media): decode local file URLs safely (openclaw#122192)
  refactor(agents): centralize typed activity event emission (openclaw#122188)
  fix(ui): effort slider matches selected level after model switches (openclaw#122125)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 12, 2026
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