Skip to content

fix(test): publish runtime in CLI live harness - #129041

Merged
vincentkoc merged 1 commit into
mainfrom
fix/cli-live-full-gateway
Aug 25, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
fix/cli-live-full-gateway

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Aug 25, 2026 •

Copy link
Copy Markdown
Member

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 in packages/ai, packages/markdown-core, and src/tui.
  • Autoreview's secret scan passed; its Codex review engine was unavailable because the standalone CLI is not installed on this host.

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.

@clawsweeper

clawsweeper Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@vincentkoc vincentkoc self-assigned this Aug 25, 2026
@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime size: XS maintainer Maintainer-authored PR labels Aug 25, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review August 25, 2026 06:17
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 25, 2026
@clawsweeper

clawsweeper Bot commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 25, 2026, 3:01 AM ET / 07:01 UTC.

ClawSweeper review

What this changes

The PR makes the CLI backend live harness start a full Gateway for every probe so agent RPCs see the prepared reply-dispatch runtime.

Regression provenance

Possible regression — probable (reviewed change; failure trace). No predecessor PR is attributed.

Merge readiness

⚠️ Ready for maintainer review - 1 item remains

Keep 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
Reviewed head: 4a8a00647fa638ffd6040b8515b9795e6ae0581f

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) A focused owner-boundary correction with direct after-fix Docker evidence and no supported correctness finding.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (linked_artifact): The PR body supplies exact-head after-fix Blacksmith Testbox Docker evidence showing an agent RPC completed successfully without the missing prepared-runtime assertion.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (linked_artifact): The PR body supplies exact-head after-fix Blacksmith Testbox Docker evidence showing an agent RPC completed successfully without the missing prepared-runtime assertion.
Evidence reviewed 5 items Current-main gap: Current main still sets the CLI live environment to minimal Gateway mode, while the PR changes that value to full mode.
Runtime owner boundary: Minimal Gateway mode skips startup sidecars; full startup invokes the sidecar path that publishes configured prepared model runtimes, and agent execution rejects a missing reply-dispatch runtime.
Regression coverage: The changed helper test asserts full mode and preserves restoration of the surrounding live-test environment.
Findings None None.
Security None None.

Live Verification

Command: node scripts/run-vitest.mjs src/gateway/gateway-cli-backend.live-helpers.test.ts

Result: PASS (completed)

node scripts/run-vitest.mjs src/gateway/gateway-cli-backend.live-helpers.test.ts
runner@runnervm76f27:/tmp/clawsweeper-live-proof-129041-3YcKiq/target$ node scripts/run-vitest.mjs src/gateway/gateway-cli-backend.live-helpers.test.ts
node scripts/run-vitest.mjs src/gateway/gateway-cli-backend.live-helpers.test.ts
[test] starting test/vitest/vitest.gateway.config.ts

 RUN  v4.1.10 /tmp/clawsweeper-live-proof-129041-3YcKiq/target

 ✓  gateway-client  ../../src/gateway/gateway-cli-backend.live-helpers.test.ts (11 tests) 1079ms

 Test Files  1 passed (1)
      Tests  11 passed (11)
   Start at  07:02:09
   Duration  10.96s (transform 8.03s, setup 1.23s, import 8.47s, tests 1.08s, environment 0ms)

[test] passed 1 Vitest shard in 17.35s
runner@runnervm76f27:/tmp/clawsweeper-live-proof-129041-3YcKiq/target$ node scripts/run-vitest.mjs src/gateway/gateway-cli-backend.live-helpers.test.ts



































Assertions:

  • PASS expect_output: 11 passed

How this fits together

The 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]
Loading

Before merge

  • Complete next step (P2) - No repair lane is appropriate: this active MEMBER-authored maintainer PR has a clean focused patch and should proceed through normal exact-head merge review.
Agent review details

Security

None.

PR surface

Source 0, Tests -5. Total -5 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 1 1 1 0
Tests 2 2 7 -5
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 3 8 -5

Review metrics

Metric Value Why it matters
Production versus test LOC production +1/-1 (net 0); live-test support +2/-7 (net -5) The repair centralizes an existing cache-only override without growing production code.

Technical review

Best 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.

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR body supplies exact-head after-fix Blacksmith Testbox Docker evidence showing an agent RPC completed successfully without the missing prepared-runtime assertion.
  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • remove rating: 🐚 platinum hermit: Current PR rating is rating: 🦞 diamond lobster, so this older rating label is no longer current.

Label justifications:

  • P2: This repairs bounded release-validation harness behavior and does not change production user behavior.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (linked_artifact): The PR body supplies exact-head after-fix Blacksmith Testbox Docker evidence showing an agent RPC completed successfully without the missing prepared-runtime assertion.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body supplies exact-head after-fix Blacksmith Testbox Docker evidence showing an agent RPC completed successfully without the missing prepared-runtime assertion.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Current-main blame attributes the minimal-mode helper and cache-probe override to this baseline commit; history also shows extensive work in the CLI live-harness files. (role: current owner-boundary author; confidence: high; commits: 3c7143d65040; files: src/gateway/gateway-cli-backend.live-helpers.ts, src/gateway/gateway-cli-backend.live.test.ts)
  • Vincent Koc: Recent history includes multiple CLI-backend live-harness changes, and this PR is the current focused continuation. (role: recent area contributor; confidence: high; commits: 824d5d44cd18, 029e8f0153f4, 4a8a00647fa6; files: src/gateway/gateway-cli-backend.live-helpers.ts, src/gateway/gateway-cli-backend.live-helpers.test.ts)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-08-25T06:22:40.676Z sha 4a8a006 :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Aug 25, 2026
@vincentkoc
vincentkoc merged commit 0d4e8f2 into main Aug 25, 2026
255 checks passed
@vincentkoc
vincentkoc deleted the fix/cli-live-full-gateway branch August 25, 2026 18:13
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

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

Labels

gateway Gateway runtime maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant