fix(websocket): shield the response-create account-lease release against cancellation - #1651
fix(websocket): shield the response-create account-lease release against cancellation#1651Komzpa wants to merge 5 commits into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 714d2086d2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
30750a1 to
d0779a2
Compare
d0779a2 to
e1663f5
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5f91c1754b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Thanks for the quick turnaround on the first review round — the tracked-cleanup-task approach is the right direction. However, the second Codex review (commit 5f91c17) raised two findings that both check out on inspection, and they're blocking merge:
Both are small, contained changes; once pushed, re-request |
|
To use Codex here, create an environment for this repo. |
31aa627 to
d6b08fa
Compare
|
Folded into #1644: cancellation-safe response-create lease release joins the inflight-future cleanup carrier (they collided on the same hunks all day); history preserved via merge. |
_release_websocket_response_create_gatenulled the lease fields onrequest_stateand THEN awaited the release. A cancellation at that await (reachable under_runtime_lockcontention) left the lease neither released nor recoverable from request_state — a leakedresponse_createslot self-healing only after the 900s TTL; 4 leaks on one account inside a TTL produces429 account_response_create_cap.Fix: the lease release is shielded so a cancellation cannot orphan it. The stale-lease reclaim path still works for genuinely stale leases.
Regression fails pre-fix (
inflight_create == 1leaked) and passes post-fix (7 probes); 964 named-suite tests green; openspec change validates strictly.