Skip to content

test(qa): await gateway startup before network probes - #130353

Merged
RomneyDa merged 1 commit into
mainfrom
fix/qa-gateway-startup-settlement
Aug 26, 2026
Merged

RomneyDa merged 1 commit into
mainfrom
fix/qa-gateway-startup-settlement

Conversation

@RomneyDa

Copy link
Copy Markdown
Member

Problem

Maturity run 32992034783 failed gateway-loopback-lan-access after its LAN HTTP endpoint was attached but before mandatory Gateway startup settled. The invalid-token probe correctly exercised auth, while the immediately following valid-token connection received the intentional gateway starting; retry shortly admission response.

startGatewayServer deliberately publishes the HTTP transport before deferred sidecar startup completes and exposes startupSettled as the owner-native readiness boundary. The QA producer treated server construction and HTTP health as full admission readiness.

Repair

Await the returned server generation’s startupSettled promise inside the producer’s startup owner before any loopback or LAN probe. This removes the race without retries, sleeps, timeouts, or weakened assertions.

Verification

  • Pre-fix run artifact: valid LAN token rejected with gateway starting; retry shortly.
  • node scripts/run-vitest.mjs test/e2e/qa-lab/runtime/gateway-loopback-lan-access.test.ts — 3 passed, including the real loopback/LAN HTTP and WebSocket proof.
  • node scripts/check-changed.mjs -- test/e2e/qa-lab/runtime/gateway-loopback-lan-access.ts — passed (test-root typecheck and script/Docker E2E lint included).
  • Duplicate search found no open PR for this producer/startup-settlement gap.

Test/support LOC: +5/-1. No production LOC. No changelog: QA-only synchronization repair.

@clawsweeper

clawsweeper Bot commented Aug 26, 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 size: XS maintainer Maintainer-authored PR labels Aug 26, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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 26, 2026
@clawsweeper

clawsweeper Bot commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 26, 2026, 5:18 PM ET / 21:18 UTC.

ClawSweeper review

What this changes

The PR changes the loopback/LAN Gateway QA producer so it waits for deferred startup settlement before issuing HTTP and WebSocket probes.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep open for the normal human landing decision: the protected maintainer PR makes the QA probe wait on the Gateway’s documented admission-readiness boundary, and current main still lacks that wait.

Priority: P3
Reviewed head: f5babd0b2cf8659f40747d03984bd8b49c2b7295
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) A small, owner-aligned QA repair with stated real transport proof and no actionable defect found.
Proof confidence 🦞 diamond lobster (5/6) Not applicable: The member-authored PR is exempt from the external-contributor proof gate; its body nevertheless reports real loopback/LAN HTTP and WebSocket after-fix coverage.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The member-authored PR is exempt from the external-contributor proof gate; its body nevertheless reports real loopback/LAN HTTP and WebSocket after-fix coverage.
Evidence reviewed 5 items Changed QA owner: The helper now captures the returned server, awaits its readiness promise, and only then returns it to the network-probe sequence.
Gateway readiness contract: The public server type defines the promise as resolving after mandatory sidecar startup and rejecting on failure.
Deferred startup behavior: For deferred sidecars, readiness settles only after both sidecar startup and startup logging complete.
Findings None None.
Security None None.

Live Verification

Command: node scripts/run-vitest.mjs test/e2e/qa-lab/runtime/gateway-loopback-lan-access.test.ts

Result: FAIL (failed) — step 1 run node scripts/run-vitest.mjs test/e2e/qa-lab/runtime/gateway-loopback-lan-access.test.ts: previous terminal command was still running after 30 seconds: "node scripts/run-vitest.mjs test/e2e/qa-lab/runtime/gateway-loopback-lan-access.test.ts"

[test] starting test/vitest/vitest.unit-fast.config.ts

 RUN  v4.1.11 /tmp/clawsweeper-live-proof-130353-gFIjEd/target

Assertions:

  • FAIL expect_output: 3 passed

How this fits together

The QA producer starts an isolated Gateway, then probes loopback and LAN HTTP/WebSocket access with valid and invalid tokens. The Gateway publishes its transport before deferred sidecars settle, so the producer must wait for the generation readiness promise before treating it as admitted.

flowchart LR
  A[QA producer] --> B[Start isolated Gateway]
  B --> C[HTTP transport attached]
  C --> D[Deferred sidecars settle]
  D --> E[Startup readiness promise]
  E --> F[Loopback and LAN probes]
  F --> G[Network proof artifact]
Loading

Decision needed

Question Recommendation
Should this protected maintainer PR be landed after its focused QA proof is refreshed on the current merge result? Land after refresh: Rebase or validate the merge result, rerun the focused QA proof, and land the readiness-boundary fix.

Why: The patch is a narrow, source-backed QA repair with no remaining mechanical finding, but the maintainer label and member authorship require an explicit human landing choice.

Before merge

  • Resolve merge risk (P1) - The branch is behind current main, so focused QA validation should be refreshed on the merge result before landing.
Agent review details

Security

None.

PR surface

Tests +4. Total +4 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 5 1 +4
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 5 1 +4

Review metrics

Metric Value Why it matters
Production versus test LOC production 0, test/support +4 net The patch only synchronizes existing QA setup and adds no runtime product code.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Land the focused readiness-boundary synchronization after the normal maintainer review and merge-result validation.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Land the focused readiness-boundary synchronization after the normal maintainer review and merge-result validation.

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

Yes, at source level: current main starts a deferred Gateway and immediately probes it, while the readiness contract shows sidecar admission can still be pending. The PR body also reports a pre-fix failing artifact, though that artifact was not independently replayed in this read-only review.

Is this the best way to solve the issue?

Yes: awaiting the owner-native readiness promise at the QA producer is narrower and more deterministic than adding retries, sleeps, or weakened probe assertions.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • 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:

  • P3: This is a contained QA reliability repair with no direct production behavior change.
  • 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. Not applicable: The member-authored PR is exempt from the external-contributor proof gate; its body nevertheless reports real loopback/LAN HTTP and WebSocket after-fix coverage.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Current-main blame assigns the QA helper’s startup path to this recent Gateway/test contributor. (role: recent area contributor; confidence: high; commits: 67a9b34e91e3, d6ee4c357015, 40ef8c5e682e; files: test/e2e/qa-lab/runtime/gateway-loopback-lan-access.ts)
  • Vincent Koc: Authored the original loopback/LAN Gateway coverage commit. (role: introduced coverage; confidence: high; commits: f1a87bf364a2; files: test/e2e/qa-lab/runtime/gateway-loopback-lan-access.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-26T20:56:58.851Z sha f5babd0 :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot added 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 26, 2026
@RomneyDa
RomneyDa enabled auto-merge (squash) August 26, 2026 22:06
@RomneyDa
RomneyDa disabled auto-merge August 26, 2026 22:06
@RomneyDa
RomneyDa merged commit 4ca379e into main Aug 26, 2026
94 checks passed
@RomneyDa
RomneyDa deleted the fix/qa-gateway-startup-settlement branch August 26, 2026 22:07
vincentkoc added a commit that referenced this pull request Aug 26, 2026
* origin/main: (275 commits)
  fix(ai): require explicit compatible-provider endpoints (#130453)
  test(control-ui): guard the hand-mirrored theme --bg copies (#130444)
  fix(onboard): preserve the saved skills package manager (#130438)
  improve(worker): diagnose admission-deadline failures and widen daemon revalidation budget (#130435)
  fix(plugins): align diffs external install metadata (#130362)
  refactor(models): consolidate config normalization (#130439)
  fix(browser): accept common keyboard aliases (#130401)
  fix(release): refresh IMAP plugin baselines (#130351)
  fix(tests): type sticky model agent fixtures (#130441)
  fix(qa): track current Slack progress cards (#130354)
  feat(ui): refine the mobile composer (#130308)
  fix(ui): clarify gateway disconnect status in tab title (#130364)
  test(qa): await gateway startup before network probes (#130353)
  fix(qa): run Buzz profile scenarios with pooled credentials (#130316)
  fix(crabbox): keep the setup failure reason and name its phase (#130425)
  fix: dashboard tools target the wrong Gateway after admission (#130112)
  fix(ui): distinguish inherited model defaults from session pins (#120805)
  feat(feishu): let agents resend received stickers (#130374)
  refactor(models): prepare selection policy once (#130413)
  fix(ui): make dashboard side panels enter split view (#130426)
  ...

# Conflicts:
#	test/scripts/docker-build-helper.test.ts
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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