Skip to content

fix(qa-lab): close transport before gateway teardown - #106027

Merged
steipete merged 2 commits into
openclaw:mainfrom
morluto:fix/ci-health-main
Jul 18, 2026
Merged

steipete merged 2 commits into
openclaw:mainfrom
morluto:fix/ci-health-main

Conversation

@morluto

@morluto morluto commented Jul 13, 2026 •

Copy link
Copy Markdown
Contributor

Closes #106005

What Problem This Solves

QA Smoke scenarios could finish successfully while transport work was still delivering an HTTP response. The suite stopped the gateway first, so that delivery could end as an unhandled HTTP response closed before delivery completed rejection.

Why This Change Was Made

Close the transport before stopping the gateway. Transport cleanup drains outstanding provider HTTP work while the gateway can still accept delivery.

The cleanup order now lives in one production-plan helper. Its regression test exercises that exact plan, verifies every dependency boundary, and proves later resources still close when transport cleanup fails.

User Impact

QA Smoke no longer reports a post-success unhandled rejection caused by its own teardown order. Runtime behavior outside QA Lab is unchanged.

Evidence

  • node scripts/run-vitest.mjs extensions/qa-lab/src/suite.test.ts: 1 file, 28 tests passed.
  • node scripts/check-changed.mjs -- extensions/qa-lab/src/suite.ts extensions/qa-lab/src/suite.test.ts: passed extension production/test types, formatting, lint, plugin boundaries, guardrails, and import-cycle checks on Blacksmith Testbox tbx_01kxsbnwmep7and94wx80qd1v4 (run).
  • Real mock-provider QA suite: channel-chat-baseline passed 1/1 through the QA Lab gateway and qa-channel transport on Blacksmith Testbox tbx_01kxsbzwran95fx03ampreece7 (run); teardown completed without a response-close rejection.
  • Exact-head CI on d85ef465d90fd64983183251ce30d40e9f5c691d: passed (run).
  • git diff --check: passed.
  • Fresh autoreview: no accepted/actionable findings; patch correct (0.98).

Limitations

The smoke uses the repository's deterministic mock OpenAI provider. No external channel or provider credentials are involved.

AI-assisted: yes. No agent transcript attached (not requested).

@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@morluto
morluto force-pushed the fix/ci-health-main branch 2 times, most recently from 0a9ff2a to 3629368 Compare July 13, 2026 04:55
@openclaw-barnacle openclaw-barnacle Bot added the scripts Repository scripts label Jul 13, 2026
@morluto

morluto commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

Validation update for 0a9ff2a6dbd7f3f3ca2d2649bb94a13ea3cb1a5c:

  • corepack pnpm test extensions/qa-lab/src/suite.test.ts — passed (29/29).
  • corepack pnpm openclaw qa suite --provider-mode mock-openai --scenario channel-chat-baseline --concurrency 1 --output-dir .artifacts/qa-e2e/crabbox-ci-health-channel-smoke — passed (1/1).

Ran from a fresh detached checkout on DigitalOcean Crabbox (provider=digitalocean, lease cbx_b65ac94fb6e7) with public networking and Tailscale disabled. The lease was deleted after validation.

This validates the stated rebased teardown commit above; the PR has since advanced to a newer head and needs fresh validation before treating these results as exact-head proof.

@morluto
morluto force-pushed the fix/ci-health-main branch from 3629368 to e133624 Compare July 13, 2026 05:06
@openclaw-barnacle openclaw-barnacle Bot removed the scripts Repository scripts label Jul 13, 2026
@morluto
morluto force-pushed the fix/ci-health-main branch from e133624 to 7d17c42 Compare July 13, 2026 05:07
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. labels Jul 13, 2026
@clawsweeper

clawsweeper Bot commented Jul 13, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed July 17, 2026, 9:28 PM ET / July 18, 2026, 01:28 UTC.

Summary
The PR centralizes QA flow-suite teardown ordering so transport cleanup runs before gateway shutdown, with a regression test exercising the production cleanup plan.

PR surface: Source +12, Tests +9. Total +21 across 2 files.

Reproducibility: yes. from the supplied source and PR evidence: the linked report identifies the teardown sequence and the PR’s mock-provider QA smoke exercises that same QA Lab gateway/transport path. I did not execute the scenario in this read-only review.

Review metrics: none identified.

Root-cause cluster
Relationship: fixed_by_candidate
Canonical: #106005
Summary: This PR is the active candidate fix for the reported QA smoke teardown rejection.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🦞 diamond lobster
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • none.

Next step before merge

  • [P2] A maintainer is assigned and contributed the current-head regression test; the remaining action is ordinary review and required-check completion, not an automated repair.

Security
Cleared: The two-file QA Lab teardown and test change introduces no apparent credential, dependency, permission, artifact, or supply-chain surface.

Review details

Best possible solution:

Land the narrow production cleanup-plan ordering only after the assigned reviewer confirms the current head retains the reported QA smoke behavior and all required checks for that head complete.

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

Yes, from the supplied source and PR evidence: the linked report identifies the teardown sequence and the PR’s mock-provider QA smoke exercises that same QA Lab gateway/transport path. I did not execute the scenario in this read-only review.

Is this the best way to solve the issue?

Yes. Moving the dependency ordering into one production cleanup-plan helper and testing that exact plan is narrower and less drift-prone than maintaining a separate ordering-only test fixture.

AGENTS.md: unclear because the file could not be read completely.

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

Label changes

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • remove rating: 🦞 diamond lobster: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.

Label justifications:

  • P2: This is a bounded QA Lab teardown reliability regression that can create post-success CI failures without affecting the general runtime.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR includes a real mock-provider QA smoke transcript showing the affected gateway/transport path completes without the reported teardown rejection; the scenario is appropriate because the defect is in QA Lab’s own teardown ordering.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR includes a real mock-provider QA smoke transcript showing the affected gateway/transport path completes without the reported teardown rejection; the scenario is appropriate because the defect is in QA Lab’s own teardown ordering.
Evidence reviewed

PR surface:

Source +12, Tests +9. Total +21 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 42 30 +12
Tests 1 24 15 +9
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 66 45 +21

What I checked:

  • Proposed cleanup ordering: The PR introduces a production cleanup-plan helper that runs web-session cleanup, transport cleanup, gateway shutdown, harness disposal, provider shutdown, and lab finishing in that dependency order. (extensions/qa-lab/src/suite.ts:322, d85ef465d90f)
  • Failure-continuation regression coverage: The changed test invokes the production cleanup plan, makes transport cleanup fail, and asserts the later gateway, harness, provider, and lab cleanup steps still run. (extensions/qa-lab/src/suite.test.ts:40, d85ef465d90f)
  • Current-head ownership signal: The latest PR commit is a test binding teardown order to the production plan and was authored by steipete, who is also assigned to the PR. (extensions/qa-lab/src/suite.test.ts:40, d85ef465d90f)
  • Real behavior proof: The PR body records a mock-provider channel-chat-baseline QA smoke run through the QA Lab gateway and qa-channel transport, with teardown completing without the response-close rejection. (extensions/qa-lab/src/suite.ts:2020, d85ef465d90f)
  • Review-state context: The linked report remains open, while this PR explicitly presents itself as its candidate fix; the PR is cleanly mergeable and has maintainer assignment, so closing either item before review/merge would be premature.

Likely related people:

  • steipete: Authored the latest commit that binds the regression test to the production cleanup plan and is assigned to review the PR. (role: current-head test author and assigned reviewer; confidence: high; commits: d85ef465d90f; files: extensions/qa-lab/src/suite.test.ts, extensions/qa-lab/src/suite.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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.

How this review workflow works
  • 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.
Review history (10 earlier review cycles; latest 8 shown)
  • reviewed 2026-07-13T06:15:02.973Z sha fd41dc3f1c600cd948e37f97a2078122ebde868b :: needs maintainer review before merge. :: none
  • reviewed 2026-07-13T06:21:37.815Z sha caad540e5375a5f11f7daecd3299a1cf63ca4e4c :: needs maintainer review before merge. :: none
  • reviewed 2026-07-13T06:27:44.570Z sha caad540e5375a5f11f7daecd3299a1cf63ca4e4c :: needs maintainer review before merge. :: none
  • reviewed 2026-07-13T07:37:25.028Z sha b0893f4203e7352d83f6c12c999be388a44abc3d :: needs maintainer review before merge. :: none
  • reviewed 2026-07-13T08:18:48.665Z sha b0893f4203e7352d83f6c12c999be388a44abc3d :: needs maintainer review before merge. :: none
  • reviewed 2026-07-13T21:46:49.271Z sha 97ae13ec7bbc44736ae99f96cf868c1d675ad378 :: needs maintainer review before merge. :: none
  • reviewed 2026-07-13T22:14:20.261Z sha 721a1a6eef74db1cb94609b19a8bb600d3828b4e :: needs maintainer review before merge. :: none
  • reviewed 2026-07-18T01:08:50.239Z sha b314dc54d05425627a0b908ab9b83964176b6fa7 :: needs maintainer review before merge. :: none

@morluto

morluto commented Jul 13, 2026 •

Copy link
Copy Markdown
Contributor Author

Exact-head Crabbox validation for b0893f4203e7352d83f6c12c999be388a44abc3d:

$ corepack pnpm check:architecture
Kysely guardrails OK
Database-first legacy-store guard passed.

$ corepack pnpm test extensions/qa-lab/src/suite.test.ts
Test Files  1 passed (1)
Tests       29 passed (29)

$ corepack pnpm openclaw qa suite --provider-mode mock-openai --scenario channel-chat-baseline --concurrency 1
[qa-suite] scenario pass (1/1): channel-chat-baseline
[qa-suite] run complete: passed=1 failed=0 total=1
TEARDOWN_REJECTION:absent
CRABBOX_PHASE:complete

Environment: DigitalOcean Crabbox, provider=digitalocean, lease cbx_16a7892bd40b, Node 24.18, public networking, Tailscale disabled. The lease was deleted after validation.

@morluto

morluto commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Exact-head validation is now attached for 7d17c42bf0f8df1f01884c87fb11c66328925282:

  • focused QA extension suite: 29/29 passed
  • channel-chat-baseline QA smoke: 1/1 passed from a fresh DigitalOcean Crabbox checkout using public networking with Tailscale disabled
  • no post-success response-close teardown rejection was observed

@clawsweeper

clawsweeper Bot commented Jul 13, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@morluto
morluto force-pushed the fix/ci-health-main branch from 7d17c42 to fd41dc3 Compare July 13, 2026 05:50
@morluto

morluto commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Fresh exact-head behavior proof is now in the PR body and validation comment for fd41dc3f1c600cd948e37f97a2078122ebde868b: focused QA tests passed 29/29, channel-chat-baseline passed 1/1, and teardown completed without the response-close rejection.

@clawsweeper

clawsweeper Bot commented Jul 13, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. 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. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Jul 13, 2026
@morluto

morluto commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Fresh exact-head proof is now attached for eca3e82dacf0a8f48414ade78674a93a9d45f223. The previously failing plugin SDK surface test passes 10/10, the focused QA suite passes 29/29, and channel-chat-baseline passes 1/1 without the teardown rejection.

@clawsweeper

clawsweeper Bot commented Jul 13, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

@openclaw-barnacle openclaw-barnacle Bot added the scripts Repository scripts label Jul 13, 2026
@morluto

morluto commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Fresh exact-head proof is attached for b0893f4203e7352d83f6c12c999be388a44abc3d. The failing architecture gate now passes, focused QA passes 29/29, and channel-chat-baseline passes 1/1 without the teardown rejection.

@clawsweeper

clawsweeper Bot commented Jul 13, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@morluto
morluto force-pushed the fix/ci-health-main branch from b0893f4 to 97ae13e Compare July 13, 2026 21:11
@openclaw-barnacle openclaw-barnacle Bot removed the scripts Repository scripts label Jul 13, 2026
@morluto
morluto force-pushed the fix/ci-health-main branch from 97ae13e to 721a1a6 Compare July 13, 2026 22:10
@steipete steipete self-assigned this Jul 18, 2026
@steipete
steipete force-pushed the fix/ci-health-main branch from 721a1a6 to b314dc5 Compare July 18, 2026 01:05
@steipete
steipete force-pushed the fix/ci-health-main branch from b314dc5 to d85ef46 Compare July 18, 2026 01:25
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. labels Jul 18, 2026
@steipete

Copy link
Copy Markdown
Contributor

Maintainer pass complete. I rebased onto current main, kept the transport-before-gateway fix, and replaced the hand-written cleanup-list test with a regression test for the exact production cleanup plan.

Proof:

  • focused QA suite: 28/28 passed
  • changed extension gates: passed on Blacksmith Testbox tbx_01kxsbnwmep7and94wx80qd1v4
  • real mock-provider channel-chat-baseline: 1/1 passed on Testbox tbx_01kxsbzwran95fx03ampreece7, with teardown completing without the response-close rejection
  • exact-head CI for d85ef465d90fd64983183251ce30d40e9f5c691d: green
  • fresh branch autoreview: no accepted/actionable findings (0.98)

Review artifacts: READY FOR /prepare-pr, zero findings, linked issue valid.

@steipete
steipete merged commit cf63c83 into openclaw:main Jul 18, 2026
129 of 131 checks passed
@steipete

Copy link
Copy Markdown
Contributor

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 18, 2026
* fix(qa-lab): close transport before gateway teardown

* test(qa-lab): bind teardown order to production plan

---------

Co-authored-by: Peter Steinberger <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions: qa-lab P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S 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.

CI: QA smoke teardown leaves an unhandled HTTP response rejection

2 participants