Repository navigation
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 real behavior proof before merge. Reviewed September 12, 2026, 4:45 PM ET / 20:45 UTC. ClawSweeper reviewWhat this changesPass the TLS certificate-renewal handle directly to the Gateway lifecycle owner so shutdown can stop its watchers and join pending work. Merge readiness⛔ Blocked before merge - 1 item remains This PR remains necessary: pinned main still passes an array to the variadic lifecycle owner. The focused correction has no actionable correctness findings and preserves the existing shutdown contract. Priority: P2 Review scores
Verification
How this fits togetherThe Gateway watches configured TLS certificate files and refreshes its HTTPS listeners when valid replacement material arrives. Its lifecycle owner collects background-service handles and stops them during shutdown. flowchart TD
A[Certificate files] --> B[TLS renewal watcher]
B --> C[HTTPS listeners]
B --> D[Renewal cleanup handle]
D --> E[Gateway lifetime owner]
F[Gateway shutdown] --> E
E --> G[Stop watchers and join pending work]
Before merge
Agent review detailsSecurityNone. PR surfaceSource 0. Total 0 across 1 file. View PR surface stats
Review metricsNone. Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Retain the existing variadic lifecycle owner and register the renewal handle directly, with no compatibility adapter or renewal-policy changes. Do we have a high-confidence way to reproduce the issue? Yes, from source: TLS-enabled startup on pinned main registers an array, and shutdown invokes stop() on that array. Runtime reproduction and compiler execution were not performed in this read-only review. Is this the best way to solve the issue? Yes. Passing the existing handle directly repairs the violated type and cleanup contract at its caller without introducing another owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against a6d61de5616e. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
The canonical one-line repair landed through #146412 as |
|
@clawsweeper re-review Added actual supported-CLI TLS startup/shutdown evidence to the main PR body. HTTPS health passed with certificate verification, both real TLS renewal watchers were registered, SIGTERM removed both original listeners and emitted both native StatWatcher stop events, Gateway shutdown completed cleanly in 54 ms, and the CLI exited0 without a forced kill. The port was reusable and the isolated synthetic state/certificates/logging were removed. The tested Gateway caller, producer and lifetime owner are byte-identical to this PR head. The formerly failing production type check is also green. |
|
🦞🧹 Reason: re-review requires an open issue or PR. |
Related: #146267 and #146275. Unblocks #146401.
What Problem This Solves
Fixes TLS renewal being registered as an array after the Gateway lifetime-sidecar owner changed to a variadic API.
User Impact
The lifetime owner receives the renewal handle itself, so shutdown can call its
stop()method. This also repairs the main-branch TS2741 failure currently blocking type, lint, and package-boundary CI.Why This Change Was Made
The TLS renewal caller landed alongside the sidecar ownership refactor and missed that API cutover. Pass the existing handle directly to its existing owner. Renewal policy, scheduling, and TLS configuration stay unchanged.
Evidence
The failing main integration is visible in the production type job:
server-startup-finish.ts:416passes an array whereGatewayPostReadySidecarHandleis required. Source inspection confirms that the lifetime owner later calls.stop()on each registered handle.The one-line repair passed independent P0–P2 review, exact-file formatting, and
git diff --check. The existing exact-head CI compiler checks provide the regression guard; local dependency installation was unnecessary for this isolated repair. No new test duplicates the existing type contract.After-change live proof passed through
pnpm openclaw gateway runon built30f1f01dfc2e, whose Gateway caller, TLS producer, and sidecar owner are byte-identical to this PR's638a07d74dfbaversions. The instance used private state/config/workspace/logging, credential-free environment, synthetic self-signed TLS, a free loopback port, and disabled channels/providers/cron/plugins.The observer recorded only the synthetic certificate/key watchers at Node's real watchFile/unwatchFile boundary. No production code was replaced or mocked. The exact-head CI production type check also passed: job103617942905. Four canceled test shards are being retried; there was no source/test failure in that attempt.