Skip to content

fix(test): describe unverified Gateway cleanup accurately - #148692

Merged
steipete merged 1 commit into
mainfrom
codex/gateway-cleanup-error-wording
Sep 15, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/gateway-cleanup-error-wording

Conversation

@steipete

@steipete steipete commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Related: #148674

What Problem This Solves

Gateway fixture cleanup reports a stop deadline failure even when Windows tree termination is immediately indeterminate.

User Impact

No user-visible runtime change. Developers get an accurate cleanup error without changing stop timing, process ownership, failure behavior, or structured diagnostics.

Why This Change Was Made

CI for #148674 recorded taskkill status 255 after 87 ms and cleanup failure after 89 ms. The outer error now describes unverified termination and output closure, and the existing exact-message assertion matches it. This correction does not explain or fix the native taskkill failure.

Evidence

Frozen dependency install, pinned oxfmt 0.66.0 check, canonical targeted oxlint 1.81.0 check, git diff --check, and fresh independent P2 review passed. No native process replay was run. Existing JavaScript stop doubles cover failure classification but do not reach the outer message; the existing exact-message assertion belongs to a native inherited-pipe fixture and was updated without running it.

Exact-head hosted CI passed for ac2e5067e487dc1ac2f10d7847e75a66356ad5c5, including both native Windows lanes. Native PR preparation completed using that hosted evidence without changing the head.

@clawsweeper

clawsweeper Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added size: XS maintainer Maintainer-authored PR labels Sep 15, 2026
@steipete
steipete marked this pull request as ready for review September 15, 2026 02:04
@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 Sep 15, 2026
@clawsweeper

clawsweeper Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 14, 2026, 10:09 PM ET / September 15, 2026, 02:09 UTC.

ClawSweeper review

What this changes

Updates the shared Gateway test fixture’s cleanup error and its existing assertion to describe unverified termination and output closure accurately.

Merge readiness

✅ Ready for maintainer review

The correction remains useful: current main and v2026.9.4 still report a deadline failure for cleanup that can become indeterminate immediately. No introduced correctness defect was found, and the maintainer-protected PR should remain open.

Priority: P3
Reviewed head: ac2e5067e487dc1ac2f10d7847e75a66356ad5c5

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, source-supported diagnostic correction with a matching existing assertion and no actionable defect.
Proof confidence 🌊 off-meta tidepool Not applicable: The supplied repository state identifies this as maintainer-authored, so the external-contributor proof gate does not apply. The fixture diagnostic and assertion were inspected; the body explicitly reports no native replay, and no runtime success is inferred.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The supplied repository state identifies this as maintainer-authored, so the external-contributor proof gate does not apply. The fixture diagnostic and assertion were inspected; the body explicitly reports no native replay, and no runtime success is inferred.
Evidence reviewed 6 items Introduced change and merge result: The pinned introduction changes only the cleanup message and its matching assertion. The verified test merge has the supplied main and PR head as its ordered parents; its comparison with main preserves the same narrow change. The whitespace check passed.
Failure does not imply deadline expiry: The complete helper shows that Windows cleanup returns false immediately for termination-indeterminate or an exception. stopGatewayChild converts that false result into the changed error while retaining ownership. Existing structured diagnostics preserve the specific failure reason.
Current main and release still need the correction: Both the fetched main revision and latest supplied release retain the old deadline wording alongside the termination-indeterminate failure path.
Findings None None.
Security None None.

How this fits together

The shared test fixture starts isolated Gateway processes for integration tests and owns their shutdown. Cleanup checks process termination and captured-output closure before releasing the process owner and removing temporary state.

flowchart TD
  A[Test requests stop or restart] --> B[Shared Gateway fixture]
  B --> C[Terminate owned process tree]
  C --> D{Termination and output closure verified?}
  D -->|Yes| E[Release process owner]
  D -->|No| F[Retain owner and report cleanup uncertainty]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +2. Total +2 across 2 files.

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

Review metrics

None.

Technical review

Best possible solution:

Keep the diagnostic aligned with cleanup uncertainty while preserving the existing termination checks and detailed failure reasons.

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

Yes, from source: indeterminate Windows termination returns false before deadline expiry and reaches the misleading outer error on current main. Native execution was not reproduced in this review.

Is this the best way to solve the issue?

Yes. Correcting the outer message and its existing assertion is the narrowest repair; changing termination behavior would exceed the demonstrated diagnostic problem.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 98b321fce638.

Labels

Label changes:

  • add P3: This is a low-risk developer diagnostic correction with no change to Gateway runtime or cleanup decisions.
  • 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: The supplied repository state identifies this as maintainer-authored, so the external-contributor proof gate does not apply. The fixture diagnostic and assertion were inspected; the body explicitly reports no native replay, and no runtime success is inferred.

Label justifications:

  • P3: This is a low-risk developer diagnostic correction with no change to Gateway runtime or cleanup decisions.
  • 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: The supplied repository state identifies this as maintainer-authored, so the external-contributor proof gate does not apply. The fixture diagnostic and assertion were inspected; the body explicitly reports no native replay, and no runtime success is inferred.

Evidence

What I checked:

  • Introduced change and merge result: The pinned introduction changes only the cleanup message and its matching assertion. The verified test merge has the supplied main and PR head as its ordered parents; its comparison with main preserves the same narrow change. The whitespace check passed. (test/helpers/openclaw-test-instance.ts:698, 5ad8949c890f)
  • Failure does not imply deadline expiry: The complete helper shows that Windows cleanup returns false immediately for termination-indeterminate or an exception. stopGatewayChild converts that false result into the changed error while retaining ownership. Existing structured diagnostics preserve the specific failure reason. (test/helpers/openclaw-test-instance.ts:467, ac2e5067e487)
  • Current main and release still need the correction: Both the fetched main revision and latest supplied release retain the old deadline wording alongside the termination-indeterminate failure path. (test/helpers/openclaw-test-instance.ts:698, 3a9d69db306c)
  • Existing behavioral assertion remains intact: The inherited-pipe test still requires failed restart, retention of the original child and state, no replacement launch before closure, and successful replacement after release. Only its expected diagnostic changes. No tests were executed during this read-only review. (test/helpers/openclaw-test-instance.test.ts:1375, ac2e5067e487)
  • Discussion and validation scope: The complete captured PR body reports taskkill status 255 after 87 ms and cleanup failure after 89 ms during fix: avoid database cleanup errors after temporary agent runs #148674. It explicitly disclaims fixing taskkill and states that native replay and the changed native assertion were not run; formatting, lint, whitespace, and independent review are reported as passing. (ac2e5067e487)
  • Relevant merged history: Current-main file history includes prior cleanup work by Peter Steinberger and port-lifecycle work by Vincent Koc. GitHub commit metadata identifies their handles as steipete and vincentkoc. Local blame and deeper pickaxe inspection encountered an unavailable historical blob, so no exact introduction attribution is asserted. (test/helpers/openclaw-test-instance.ts, b399056d2f6b)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • vincentkoc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

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.

@steipete
steipete merged commit f843938 into main Sep 15, 2026
181 checks passed
@steipete
steipete deleted the codex/gateway-cleanup-error-wording branch September 15, 2026 02:32
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

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: 🐚 platinum hermit Good normal PR readiness with ordinary 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