Repository navigation
fix(gateway): finish cleanup after sidecar failures - #117646
IWhatsskill wants to merge 1 commit into
Conversation
|
Thanks for the context here. I did a careful shell check against current Current main already contains this PR’s head and subsequently strengthens the same Gateway sidecar-cleanup owner boundary, so there is no remaining branch behavior to merge. So I’m closing this as already implemented rather than keeping a duplicate issue open. Review detailsBest possible solution: Retain current main’s lifecycle-owned stop, seal, and shutdown sequence rather than reviving this obsolete branch. Do we have a high-confidence way to reproduce the issue? No high-confidence live reproduction is available; the submitted mocked lifecycle tests and current source establish the cleanup path, while current main already contains the repair. Is this the best way to solve the issue? Yes: current main solves the central cleanup-continuation problem through a stronger lifecycle-owner design, so merging this stale branch is not the best path. Security review: Security review cleared: The diff changes local Gateway lifecycle sequencing only; it adds no dependency, secret, permission, or authority boundary. AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning high; reviewed against b7cafbe7e826; fix evidence: commit 0f2e9064ca10, main fix timestamp 2026-08-08T14:08:22Z. |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
9a55601 to
2722514
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Co-authored-by: Peter Steinberger <[email protected]> Punchcard-Session: amber-workshop-workshop-36
2722514 to
0f2e906
Compare
|
ClawSweeper applied the proposed close for this PR.
|
[AI-assisted]
Summary
Repair Gateway startup and shutdown cleanup at the lifecycle owner boundary.
server-close.tsNo new sidecar helper module, retry stack, generation framework, or downstream guard is added.
What Problem This Solves
Registered sidecars had split cleanup ownership. A sidecar stop rejection could abort the remaining Gateway cleanup contract, while startup teardown could replace the root startup failure with cleanup noise.
The first repair still had two owner-boundary holes:
runClosePreluderejoined the memoized close fence after the outer cleanup sequence had already caught its rejection, which could skip node notifications, watch-node HTTP shutdown, metadata cache clearing, and the remaining close prelude.The lifecycle owner now separates the fence join from post-fence cleanup and exposes a post-ready-only drain for hot reload. Full close and startup rollback still drain both sidecar classes. Startup reports its initiating error; explicit close reports the first cleanup error only after every cleanup step has been attempted.
Evidence
Exact base:
b5180b68163a0dec24ac7615b81e7f12aadbd5e2Exact head:
0f2e9064ca10e14bb0920c955c92a73d5654f940oxfmt: cleanoxlint: cleangit diff --check: clean0.96)Hosted exact-head CI and exact-head ClawSweeper remain the final gates.
Scope
The positive production delta is the lifecycle-owned sequential cleanup contract shared by startup failure and explicit close, sync/async late-stop diagnostics, and the separate post-ready-only reload owner. The connected duplicate close ownership was removed in the same change.
Credit
The editable contributor branch was rebuilt in place. The signed commit preserves IWhatsskill as author and Peter Steinberger as co-author.
Punchcard
Punchcard-Session: amber-workshop-workshop-36
PR attestation receipt:
pc1.cHVuY2hjYXJkLXNlcnZlci1yZWNlaXB0LXYxAGF0dF8wMUtaR1lUMlZYWDRZQ1Q5WlpBRDBUQ1g4NQB0bnRfMDFKMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAdXNyXzAxSjAwMDAwMDAwMDAwMDAwMDAwMDAwMDAxAGRldl9FMDNCQTNBOENDNzdGOUQ5QjFCRTI3RTE5MgB3cmtfMDFLWkFCN1pDVzBHRktKTVI5QTdKRjA2MlQAc2VzXzAxS1pGWE42TVBWRDRBMzM2VlZDWVdHUDQ1AGFtYmVyLXdvcmtzaG9wLXdvcmtzaG9wLTM2AG9wZW5jbGF3L29wZW5jbGF3AAAxMTc2NDYAZGZjNzYwZDFhZmZkYjg5ZGU1Zjc3NmE2NTgxNmFkNjUzNzM3MDg2NTgxNGQ3NTFkMzQyZmRlNTVmMmNiN2ViOABzaWduaW5nLXYxADJTR1hwTUFXS2lsWE9NQVloSVJ1R0xZNDUtQTBqUW9TUHN1Z2VFLXVKNk9HREJCMjJVWFA5ZTFwb3hwWHVuRUZoNVlyakoxS0lCRzB4aUk5SWs1UkJ3ADIwMjYtMDgtMDhUMTU6MTA6MzYuNDEzWgA.fxfOAUlWOOcbEJ22W7TKjJSMMVeSGsHa_CLm_NuLCBjCIoacBFnAjopQ3y-JlLio9G3cGU-W_x49Zs4rWBSuAA