Skip to content

chore(gateway): cover client transport defaults - #118798

Merged
vincentkoc merged 1 commit into
mainfrom
gateway-b1-client-defaults
Aug 3, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
gateway-b1-client-defaults

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Aug 3, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

The documented Gateway client transport defaults had no single executable QA
owner at the public client and real WebSocket boundary. Drift in request,
challenge, reconnect, or tick-watch behavior could therefore escape the
repo-backed coverage portfolio.

Why This Change Was Made

Adds one native Vitest QA scenario using the public GatewayClient against a
real local WebSocketServer. Fake time starts only after the socket is
established, and the change does not modify production behavior.

User Impact

No runtime behavior changes. Maintainers gain regression proof for the
30-second request timeout, 15-second challenge watchdog, capped exponential
reconnect schedule, server-advertised tick policy, tick-timeout close code, and
unbounded-request keepalive behavior.

Evidence

  • Current head: 61c0e04486db3ef3233120f8dbde126df826289b.
  • Exact-head Blacksmith Testbox proof passed after asserting the remote checkout
    SHA: gateway-client package build; 14 package files / 209 tests; focused E2E
    5/5; private QA build; and the declared QA suite. Provider
    blacksmith-testbox; lease tbx_01kz4p8arck0zeq7ntzw8txh7p; run
    https://github.com/openclaw/openclaw/actions/runs/30852015166; QA evidence
    .artifacts/qa-e2e/suite-msdpn1lv-36a09652/qa-evidence.json.
  • Hosted current-head CI: 70 successful checks, 0 failed, 0 pending.
  • Fresh coverage inventory: exactly one primary owner for
    gateway.client-transport-defaults.
  • Earlier proof on the identical test-only diff also passed the full
    pnpm check:changed gate, including typecheck, lint, import cycles,
    formatting, and guards.
  • Autoreview: no findings; patch correct at 0.99 confidence.
  • Formatting: both new files pass oxfmt --check; git diff --check passes.
  • Diff: production +0/-0; test +368/-0; QA scenario metadata +29/-0.

ClawSweeper rank-up move disposition: the requested current-head QA scenario
and Testbox package proof are complete on the frozen final head above.

AI-assisted: yes. The implementation follows a maintainer-reviewed,
single-ID test-only scope.

@vincentkoc vincentkoc self-assigned this Aug 3, 2026
@vincentkoc
vincentkoc force-pushed the gateway-b1-client-defaults branch from ee5dca2 to 6535e1d Compare August 3, 2026 18:00
@clawsweeper clawsweeper Bot added 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. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels Aug 3, 2026
@clawsweeper

clawsweeper Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 3, 2026, 2:04 PM ET / 18:04 UTC.

ClawSweeper review

What this changes

Adds a QA Lab scenario and a real-local-WebSocket test suite covering Gateway client request, handshake, reconnect, tick-watch, and unbounded-request defaults.

Merge readiness

⚠️ Ready for maintainer review - 1 item remains

Keep this maintainer-authored draft open for normal review. The branch adds focused real-WebSocket regression coverage for public Gateway client defaults that current synthetic watchdog tests do not exercise at the same boundary; no concrete correctness or security defect was found in the patch.

Priority: P3
Reviewed head: 6535e1d9fab9e5b7aaff846a2adca56bcdc524e4

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused and coherent regression-coverage addition with no actionable patch defect found; current-head QA/Testbox execution is the remaining readiness check.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored draft changes QA metadata and an automated local-WebSocket test, so the external-contributor real-behavior-proof gate does not apply.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored draft changes QA metadata and an automated local-WebSocket test, so the external-contributor real-behavior-proof gate does not apply.
Evidence reviewed 7 items Current default policy: The current Gateway client defaults a finite request timeout to the shared default, requires a connect challenge using the resolved timeout, and configures exponential reconnects from 1 second through a 30-second cap.
Current tick-watch ownership: After hello, the client adopts the server-advertised tick interval and closes a stale transport with code 4000 and reason "tick timeout"; an unbounded pending request keeps that watchdog active.
Proposed real-transport coverage: The branch starts a local WebSocket server, enables deterministic timers only after socket establishment, and exercises the default request, challenge, reconnect, tick, and unbounded-request paths through the public GatewayClient.
Findings None None.
Security None None.

How this fits together

Gateway clients connect to the Gateway over WebSocket, complete a challenge and hello handshake, then enforce request, reconnect, and tick-watch timers. This QA scenario exercises that public client-to-transport boundary and records ownership of the resulting regression coverage.

flowchart LR
  A[Gateway client] --> B[Local WebSocket server]
  B --> C[Challenge and hello handshake]
  C --> D[Transport timer policy]
  D --> E[Request timeout and reconnect]
  D --> F[Tick watchdog and close]
  E --> G[QA regression scenario]
  F --> G
Loading

Before merge

  • Resolve merge risk (P1) - The PR is still a draft and its claimed focused run has not been independently executable in this read-only review; complete the declared QA/Testbox validation on the current head before marking it ready.
Agent review details

Security

None.

PR surface

Tests +368, Other +29. Total +397 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 368 0 +368
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 29 0 +29
Total 2 397 0 +397

Review metrics

Metric Value Why it matters
Production versus regression coverage production +0/-0; tests +368/-0; QA scenario metadata +29/-0 The patch deliberately changes no runtime behavior, so review should focus on whether the new real-transport assertions accurately protect existing defaults.

Stored data model

Persistent data-model change detected: serialized state: test/e2e/qa-lab/runtime/gateway-client-transport-defaults.e2e.test.ts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Retain this narrowly scoped real-WebSocket regression scenario, obtain current-head QA/Testbox evidence, and land it without changing Gateway runtime behavior.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Retain this narrowly scoped real-WebSocket regression scenario, obtain current-head QA/Testbox evidence, and land it without changing Gateway runtime behavior.

Do we have a high-confidence way to reproduce the issue?

Yes, at source level: the proposed test drives the public GatewayClient against a local WebSocket server and deterministically advances the relevant timers. This read-only review did not execute the test.

Is this the best way to solve the issue?

Yes. Existing watchdog tests use a synthetic harness, while this patch adds a focused real-WebSocket boundary check without duplicating or changing the runtime policy owner.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against a67c52611e57.

Labels

Label changes:

  • add P3: This is low-risk regression-test and QA-metadata coverage with no production behavior change.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored draft changes QA metadata and an automated local-WebSocket test, so the external-contributor real-behavior-proof gate does not apply.

Label justifications:

  • P3: This is low-risk regression-test and QA-metadata coverage with no production behavior change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored draft changes QA metadata and an automated local-WebSocket test, so the external-contributor real-behavior-proof gate does not apply.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Current blame maps the Gateway client default-policy block to commit 8d1fe4f, and the available local history identifies him as the strongest source-level routing candidate. (role: current-source contributor; confidence: medium; commits: 8d1fe4f09106; files: packages/gateway-client/src/client.ts, packages/gateway-client/src/client.watchdog.test.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Run the declared QA scenario and Testbox package proof on the current head before marking the draft ready.

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.

@vincentkoc
vincentkoc force-pushed the gateway-b1-client-defaults branch from 6535e1d to 4d6129d Compare August 3, 2026 19:33
@vincentkoc

vincentkoc commented Aug 3, 2026 •

Copy link
Copy Markdown
Member Author

ClawSweeper rank-up move disposition:

No production code changed.

@vincentkoc
vincentkoc marked this pull request as ready for review August 3, 2026 19:52
@vincentkoc

vincentkoc commented Aug 3, 2026 •

Copy link
Copy Markdown
Member Author

Current-head CI baseline comparison:

The PR changes only qa/scenarios/runtime/gateway-client-transport-defaults.yaml and test/e2e/qa-lab/runtime/gateway-client-transport-defaults.e2e.test.ts; its declared focused/current-head proof is green.

@vincentkoc
vincentkoc force-pushed the gateway-b1-client-defaults branch from 4d6129d to 61c0e04 Compare August 3, 2026 20:28
@vincentkoc
vincentkoc merged commit 1cb030f into main Aug 3, 2026
98 of 99 checks passed
@vincentkoc
vincentkoc deleted the gateway-b1-client-defaults branch August 3, 2026 20:58
vincentkoc added a commit that referenced this pull request Aug 3, 2026
* origin/main:
  test(ui): add shell and PWA primary QA proof (#118788)
  test(qa): cover CLI distribution workflows (#118948)
  chore(i18n): refresh native locales (#118883)
  test(qa): prove plugin tool ownership in gateway flow (#118958)
  docs: correct onboarding risk flags and Google Chat credential shapes (#118936)
  fix(imessage): honor explicitly enabled accounts during startup (#118944)
  test(gateway): cover client transport defaults (#118798)
  fix(signal): normalize accounts during noninteractive setup (#118932)
  fix(msteams): enable channels for federated environment credentials (#118931)
  fix(openai): enforce final transcript bounds before callback delivery (#118928)
  test(tasks): cover plugin-managed flows (#118919)

# Conflicts:
#	qa/scenarios/runtime/docker-package-install.yaml
vincentkoc added a commit that referenced this pull request Aug 3, 2026
…-worker-update-20260803

* origin/main: (48 commits)
  test(ui): add shell and PWA primary QA proof (#118788)
  test(qa): cover CLI distribution workflows (#118948)
  chore(i18n): refresh native locales (#118883)
  test(qa): prove plugin tool ownership in gateway flow (#118958)
  docs: correct onboarding risk flags and Google Chat credential shapes (#118936)
  fix(imessage): honor explicitly enabled accounts during startup (#118944)
  test(gateway): cover client transport defaults (#118798)
  fix(signal): normalize accounts during noninteractive setup (#118932)
  fix(msteams): enable channels for federated environment credentials (#118931)
  fix(openai): enforce final transcript bounds before callback delivery (#118928)
  test(tasks): cover plugin-managed flows (#118919)
  test(agents): prove process control roundtrip (#118843)
  test(qa): add memory redaction boundary coverage (#118916)
  fix(kilocode): model discovery overstates the usable context window (#118868)
  fix(media): isolate generated-provider text from delivery directives (#118780)
  test(gateway): add node control-plane QA coverage (#118784)
  fix(config): reject unsupported diagnostics otel grpc (#93087)
  fix(providers): recognize configured media credentials across provider boundaries (#118761)
  refactor: delete dead post-landing plugin/hooks scaffolding (#118920)
  fix(cron): deliver child results after heartbeat-only parent responses (#118743)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions: qa-lab maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M 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