Repository navigation
fix(ui): release deferred responses on socket close - #120554
vincentkoc wants to merge 1 commit into
Conversation
efc1d2e to
c2e4dc1
Compare
|
@clawsweeper re-review Exact head: |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: blocked before merge. Reviewed September 2, 2026, 4:35 PM ET / 20:35 UTC. ClawSweeper reviewWhat this changesThis PR makes Control UI mock-Gateway deferred responses request-scoped and updates reconnect, question-recovery, and catalog-history E2E tests to use deterministic controls. Regression provenancePossible regression — probable (reviewed change; known regression link). No predecessor PR is attributed. Merge readiness⛔ Blocked before merge - 4 items remain Keep open for maintainer handling. The member-authored, maintainer-labeled PR is not mergeable against current main, and its test-harness API and global test setup must be reconciled with newer merged fixture contracts before it can land. Priority: P2 Review scores
Verification
How this fits togetherControl UI browser tests install a serialized mock Gateway in the page, then exercise reconnect and session-history behavior through that simulated transport. The helper records browser requests and controls delayed responses so E2E tests can assert the UI’s recovery behavior. flowchart LR
A[Browser E2E scenario] --> B[Control UI page]
B --> C[Mock Gateway harness]
C --> D[Deferred request controls]
D --> E[Reconnect or history response]
E --> F[UI assertions]
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceTests +392. Total +392 across 7 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Rebase onto current main, preserve its parameter-matched deferral, held-response, cursor-wait, and isolated-realm contracts, and add only the deterministic reconnect coverage that remains necessary. Do we have a high-confidence way to reproduce the issue? Yes, source comparison provides a high-confidence reproduction path: applying the branch’s old helper/test shape over current main would remove current matched-deferral and isolated-realm coverage unless reconciled. Is this the best way to solve the issue? No. Request-scoped control is plausible, but the branch is not the best current solution until it is expressed as an additive extension of current main’s deferral and fixture-lifetime contracts. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against d4eb1353071c. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (6 earlier review cycles)
|
3e30e2e to
4b8c42e
Compare
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Exact-head publication proof:
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: fix(ui): release deferred responses on socket close This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
|
Final close proof (September 5, 2026):
Closing as superseded/unneeded. The merged replacements own the durable behavior, the cleanup attempt violates current contracts, and no current reconstruction remains. |
Root cause
The serialized Control UI mock Gateway retained deferred responses after their owning WebSocket closed. Method settlement could then select a stale response, attempt delivery to the closed socket, and leave the replacement socket waiting without a visible result.
Repair
MockWebSocket.close()now removes only deferred responses owned by that socket. The socket lifecycle remains the cleanup owner, while method deferrals, held methods, parameter matching, count cursors, and request logs keep their existing behavior.This changes test infrastructure only. Production behavior is unchanged.
Files
ui/src/test-helpers/control-ui-e2e.tsui/src/test-helpers/control-ui-e2e.deferral.test.tsProof
4b8c42ef60f828b08e746981a83013ce1389663b16/16passed.40/40passed.+0/-0; test support+44/-0.tsgo:uiandcheck:changedremain blocked by four unrelated current-mainassertBeforeRenametype errors insrc/infra/install-package-dir.ts.