Repository navigation
fix(test): publish runtime in CLI live harness - #129041
Conversation
Co-authored-by: Josh Lehman <[email protected]>
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 25, 2026, 3:01 AM ET / 07:01 UTC. ClawSweeper reviewWhat this changesThe PR makes the CLI backend live harness start a full Gateway for every probe so agent RPCs see the prepared reply-dispatch runtime. Regression provenancePossible regression — probable (reviewed change; failure trace). No predecessor PR is attributed. Merge readinessKeep open. The narrow harness repair matches the current Gateway startup invariant, has exact-head Docker proof, and this active MEMBER-authored PR carries the protected maintainer label. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherThe Gateway CLI live harness starts an isolated Gateway and submits agent RPC probes. Its startup mode determines whether the prepared runtime used by reply dispatch is published before those probes run. flowchart LR
A[CLI live test] --> B[Live environment setup]
B --> C[Gateway startup mode]
C --> D[Prepared dispatch runtime]
D --> E[Agent RPC probe]
E --> F[Live validation result]
Before merge
Agent review detailsSecurityNone. PR surfaceSource 0, Tests -5. Total -5 across 3 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Land the shared full-Gateway startup mode after normal exact-head maintainer review so every CLI live probe exercises the same prepared-runtime publication boundary. Do we have a high-confidence way to reproduce the issue? Yes—current main selects minimal Gateway mode for the shared CLI harness, while minimal startup omits the sidecar publication required by agent execution; the PR body also records an exact-head after-fix Docker run. Is this the best way to solve the issue? Yes—the shared environment helper is the canonical owner for startup mode, replacing a cache-probe-only exception rather than adding another consumer override. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against df83ff516ffd. LabelsLabel changes:
Label 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)
|
|
Merged via squash.
|
Co-authored-by: Josh Lehman <[email protected]>
Related: #128965
Additional instructions
MUST: Keep Allow edits from maintainers enabled for this PR so maintainers
can help update the branch when needed.
What Problem This Solves
Fixes an issue where the CLI backend live harness could reject ordinary agent RPCs before the Gateway published its prepared reply-dispatch runtime.
Why This Change Was Made
The shared CLI live environment now uses full Gateway startup for every probe, including the cache path. This replaces the broader uneditable #128965 patch with the narrow three-file owner fix and preserves Josh Lehman's contribution through commit co-authorship.
User Impact
No production behavior changes. Release validation can exercise CLI backend agent requests through the same prepared-runtime publication boundary required by the production Gateway.
Evidence
node scripts/run-vitest.mjs src/gateway/gateway-cli-backend.live-helpers.test.ts- 11 tests passed.node_modules/.bin/oxfmt --check src/gateway/gateway-cli-backend.live-helpers.ts src/gateway/gateway-cli-backend.live.test.ts src/gateway/gateway-cli-backend.live-helpers.test.ts- passed.git diff --check- passed.node scripts/check-changed.mjs -- <three changed files>- all targeted guards passed through dead-export scanning; the final core typecheck hit unrelated stale local dependency typings inpackages/ai,packages/markdown-core, andsrc/tui.Production LOC: +1/-1 (net 0). Test and live-test support: +2/-7 (net -5).
AI-assisted: yes. The scoped diff and generated commit were reviewed directly before publication.
4a8a00647fa638ffd6040b8515b9795e6ae0581fin 207.55s; emittedagent-request:done {"status":"ok"}with no prepared-runtime assertion. Run: https://github.com/openclaw/openclaw/actions/runs/32818734175