Skip to content

fix(qa): stop zombie-only gateway process groups - #119396

Merged
vincentkoc merged 1 commit into
mainfrom
fix/qa-zombie-process-groups
Aug 5, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
fix/qa-zombie-process-groups

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Aug 5, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Fixes an issue where successful Docker live/E2E lanes could be reported as failed after cleanup when Linux retained only zombie members in the Gateway process group.

Why This Change Was Made

The QA Lab Gateway child teardown treated unsettled Node child-exit metadata as authoritative before checking Linux process-group members. The process owner now classifies /proc members directly: runnable members remain alive, while zombie/exited-only groups are stopped. If /proc cannot be inspected, cleanup still fails closed.

Forced-shutdown errors now include process-group membership and child-exit state, capped at 2 KiB. This does not change convergence restart behavior, provider execution, or other live-test failures.

Architectural owner: extensions/qa-lab/src/gateway-child.ts.

Canonical invariant: on Linux, runnable process-group membership owns teardown liveness; zombie-only groups cannot retain ports or execute work.

Removed path: the child-exit metadata short-circuit and boolean-only Linux group classifier.

Production LOC: +109/-29. Test LOC: +120/-11. The production growth makes the owner boundary explicit and adds bounded diagnostics for real cleanup failures.

User Impact

Maintainers no longer get false-red live/E2E results after every scenario has passed and the remaining process-group entries are non-runnable zombies. Genuine runnable descendants still fail cleanup with actionable diagnostics.

Evidence

Two Linux changed-gate Testbox attempts hung with zero output before any repository check and ended only when their exact owned runs were stopped. Testbox reported blocked_stage=unknown and blacksmith testbox run exited -1; the lease was stopped. This is a transport-stage failure, not a code/test failure, so the repository-hosted Linux checks on this exact head are the authoritative platform validation.

AI-assisted: yes. The change was independently reviewed and the implementation and tests were verified before publication.

Punchcard-Session: amber-orchard-valley-s4

@vincentkoc vincentkoc self-assigned this Aug 5, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review August 5, 2026 01:19
@vincentkoc
vincentkoc force-pushed the fix/qa-zombie-process-groups branch from 2b5725a to 88ac276 Compare August 5, 2026 01:40
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 5, 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: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

Punchcard-Session: amber-orchard-valley-s4
@vincentkoc
vincentkoc force-pushed the fix/qa-zombie-process-groups branch from 88ac276 to 057a85e Compare August 5, 2026 01:43
@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. P2 Normal backlog priority with limited blast radius. labels Aug 5, 2026
@clawsweeper

clawsweeper Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 4, 2026, 10:03 PM ET / August 5, 2026, 02:03 UTC.

ClawSweeper review

What this changes

QA Lab’s gateway cleanup now treats Linux process groups containing only exited zombies as stopped while retaining failures for runnable or uninspectable groups.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

Keep open for explicit maintainer handling: this focused QA Lab repair is not on current main, has no actionable code finding, and correctly moves Linux teardown liveness to the process-group owner.

Priority: P2
Reviewed head: 057a85ea0b7808a6c391f45627d54972acdb5765
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused owner-boundary repair with strong regression coverage; reconciling the exact-head Linux proof reference would remove the remaining review uncertainty.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: This is a MEMBER-authored PR, so the external-contributor proof gate does not apply; the supplied check rollup also reports QA smoke and real-behavior-proof success.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This is a MEMBER-authored PR, so the external-contributor proof gate does not apply; the supplied check rollup also reports QA smoke and real-behavior-proof success.
Evidence reviewed 5 items Current-main root cause: Current main returns alive when Node child-exit metadata is still unset before consulting Linux process-group state, which permits zombie-only groups to cause false cleanup failures.
Owner-boundary repair: The PR inspects Linux group members after confirming the group exists, returns stopped only for Z/X-only groups, and fails closed when inspection is unavailable or empty.
Regression coverage: The colocated tests cover zombie-only groups, runnable descendants, unknown snapshots, unavailable /proc, unsettled child metadata, and bounded diagnostics.
Findings None None.
Security None None.

How this fits together

QA Lab starts a Gateway child for Docker live and E2E scenarios, then tears down its process group after the scenario. That teardown determines whether a completed scenario is reported as successful or failed.

flowchart LR
  A[QA scenario] --> B[Gateway child process]
  B --> C[Shutdown signals]
  C --> D[Linux process-group inspection]
  D --> E{Runnable member remains?}
  E -- Yes or unknown --> F[Fail cleanup with diagnostics]
  E -- Zombies only --> G[Cleanup succeeds]
  G --> H[Scenario result]
Loading

Decision needed

Question Recommendation
Should this maintainer-owned QA Lab fix land after the exact-head Linux proof status is reconciled? Confirm proof and land: Verify that the successful Linux behavior proof ran at commit 057a85e, then merge the focused repair.

Why: The code review is clean, but the maintainer label and conflicting body/check proof status require an explicit landing judgment.

Before merge

  • Resolve merge risk (P1) - The PR body says exact-head Linux proof is pending while the supplied check rollup reports success; reconcile that artifact status before landing.
  • Complete next step (P2) - This maintainer-labelled member PR has no narrow repair finding; the remaining action is explicit landing review of the proof-status discrepancy.
Agent review details

Security

None.

PR surface

Source +80, Tests +109. Total +189 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 109 29 +80
Tests 1 120 11 +109
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 229 40 +189

Review metrics

Metric Value Why it matters
Production vs test delta production +109/-29; tests +120/-11 The production growth is tied to a clearer teardown ownership boundary and bounded failure diagnostics, with focused regression coverage.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Land the single owner-boundary liveness repair once the exact-head Linux cleanup proof is confirmed or linked.
  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 single owner-boundary liveness repair once the exact-head Linux cleanup proof is confirmed or linked.

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

Yes: current main has a direct Linux path where group probing succeeds, child metadata remains unset, and the code returns alive before reading zombie-only /proc members. No local test was run because this is a read-only review.

Is this the best way to solve the issue?

Yes: process-group inspection belongs in the gateway-child teardown owner; increasing timeouts or changing the separate verified-boundary controller would retain or misplace the incorrect liveness rule.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P2: This corrects false-red QA live/E2E cleanup results with a contained maintainer and CI impact.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This is a MEMBER-authored PR, so the external-contributor proof gate does not apply; the supplied check rollup also reports QA smoke and real-behavior-proof success.

Label justifications:

  • P2: This corrects false-red QA live/E2E cleanup results with a contained maintainer and CI impact.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This is a MEMBER-authored PR, so the external-contributor proof gate does not apply; the supplied check rollup also reports QA smoke and real-behavior-proof success.

Evidence

What I checked:

Likely related people:

  • Shakker: Introduced the current gateway-child implementation containing the blamed liveness branch. (role: introduced current behavior; confidence: high; commits: 34e73d25a6f2; files: extensions/qa-lab/src/gateway-child.ts)
  • Vincent Koc: Has prior merged gateway process-group cleanup work and substantial history in this owner file, in addition to this repair. (role: recent area contributor; confidence: high; commits: 4e7a71786833, 057a85ea0b78; files: extensions/qa-lab/src/gateway-child.ts, extensions/qa-lab/src/gateway-child.test.ts)
  • Peter Steinberger: Appears most frequently in the central file’s retained history, though not on the blamed liveness lines. (role: recent area contributor; confidence: medium; commits: aa2a5c96f69a, 0cb56ace6228; files: extensions/qa-lab/src/gateway-child.ts)

Rank-up moves

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

  • Confirm or link the successful exact-head Linux cleanup run, since the PR body still describes it as pending.

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 merged commit 9f8270d into main Aug 5, 2026
137 of 141 checks passed
@vincentkoc
vincentkoc deleted the fix/qa-zombie-process-groups branch August 5, 2026 02:07
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 5, 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 P2 Normal backlog priority with limited blast radius. 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