Repository navigation
fix(qa): isolate gateway child supervisor state - #146397
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 12, 2026, 5:36 PM ET / 21:36 UTC (Revision 2). ClawSweeper reviewWhat this changesQA Lab removes inherited service-manager and test-runner markers from its Gateway children, exposes the canonical supervisor-key list through the process SDK, and documents and tests that isolation. Merge readiness✅ Ready for maintainer review This remains a useful, focused fix missing from current main. The updated restart and cleanup evidence addresses the previous review request; no blocking patch defect was found. Priority: P2 Review scores
Verification
How this fits togetherQA Lab launches isolated Gateway processes to exercise OpenClaw scenarios. Its environment builder combines parent settings and scenario overrides before the Gateway decides how to restart and shut down. flowchart TD
A[Parent environment] --> C[QA environment builder]
B[Scenario overrides] --> C
D[Canonical supervisor markers] --> E[Final environment scrub]
C --> E
E --> F[QA-owned Gateway child]
F --> G[In-process restart and scenario completion]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource -2, Tests +30, Docs +5. Total +33 across 4 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep QA child isolation in the existing environment builder and share the canonical supervisor markers through the documented process SDK. Do we have a high-confidence way to reproduce the issue? Yes: current-main source preserves inherited supervisor markers that affect Gateway shutdown budgets, and the captured evidence identifies the failing forced-restart scenario. This read-only review did not execute it. Is this the best way to solve the issue? Yes: removing parent-only markers after all overlays repairs the existing owner boundary while preserving production supervisor rules and intentional QA restart controls. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 9b59fe4ef7da. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
4095169 to
9cafbfe
Compare
|
Merged via squash.
|
What Problem This Solves
A QA runner launched under a native service manager passes supervisor markers into a Gateway child that QA owns directly. During a forced restart, that child can use native shutdown rules and exit expecting a supervisor to replace it, leaving the scenario waiting for a process that will never start. This caused the
subagent-completion-direct-fallbacksmoke failure observed while validating #146129.Why This Change Was Made
Remove the canonical supervisor hints after all QA environment overlays. Reuse the existing key list through the process SDK, and combine duplicate test-runner cleanup with the existing environment scrub. QA retains its own process identity and in-process restart control. The intentional restart-recovery scenarios and production supervisor deadlines stay intact.
Production is net −2 lines; tests +30 and SDK documentation +5.
Evidence
Both inherited-parent and runtime-overlay regressions failed before repair. They and seven existing environment-isolation cases pass afterward; independent P0–P2 review is clean.
Clean Linux proof on exact
40951697d477a419335fd0b7ca9325abc91119b2passed the private-QA build, core/plugin/test types, all 104 Gateway-child tests, import-cycle, SDK export/surface, and lint checks. Source tree:d47b13f44eee3d832232bd610ce9d73360014c80. Testbox proof run.The original failing smoke scenario ran with a synthetic parent
INVOCATION_IDand completed with one pass and zero failures in 25.3 seconds. The actual Gateway launcher and its QA-owned descendants had no supervisor hints and retainedOPENCLAW_NO_RESPAWN=1; the parent still had its injected marker. Captured Gateway logs show SIGUSR1 at 20:51:55.878 UTC, completed in-process restart at 20:51:55.945, and a new HTTP listener at 20:51:56.611. Post-restart completion was delivered without replay or unexpected payloads. There was no abandoned-cleanup deadline and no leftover owned process. The lease is stopped.Private proof archive SHA-256:
52444447b4c1640f1201331bdfbf5437a4806c89d74c6f654e07afa4207d68e5. Check archive SHA-256:77fb864586caf7607e24fb6eb4bf6dfa98e2a2cd95643486278f566e3bbd3392.Proof-driver path, private artifact permissions, and successful-run log-retention assumptions were corrected without changing product code or weakening the original scenario. The final explicit signal → completed restart → new listener trace is retained.
The initial hosted CI run was blocked only by the current-main TLS sidecar array/variadic mismatch. Canonical repair #146412 is merged as
b405e7f644106306d2d3965ecf22335fdbe15716. This branch was rebased patch-identically onto repaired main; the QA environment owner, restart helper/scenario, supervisor detection and Gateway run loop are unchanged from the live-tested base. Final integration CI passed on9cafbfe122e71c19d2bd073aa2985edc9cfb0e7f: 119 successes, 15 skips, zero failures. CI run.