Repository navigation
fix(swift): keep canvas refresh responses from being dropped in tests - #120106
Conversation
|
@clawsweeper review |
|
🦞👀 Command router queued. I will update this comment with the next step. |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
ClawSweeper rank-up proof is satisfied on the exact clean merge head.
|
|
Codex review: needs maintainer review before merge. Reviewed August 6, 2026, 10:39 PM ET / August 7, 2026, 02:39 UTC. ClawSweeper reviewWhat this changesThis PR changes the OpenClawKit fake WebSocket so Swift tests retain back-to-back gateway frames until the next receive callback is registered. Merge readinessKeep this maintainer-owned PR open: the FIFO fixture repair correctly models the production receive gap and current main does not contain it; no blocking patch defect was found. Priority: P3 Review scores
Verification
How this fits togetherOpenClawKit gateway-session tests simulate native WebSocket delivery while the gateway client processes protocol-feature and canvas-refresh responses. The fake transport feeds frames into the receive loop, which drives concurrent request completion and canvas assertions. flowchart LR
A[Gateway test scenario] --> B[Fake WebSocket]
B --> C[Inbound frame queue]
C --> D[Gateway receive loop]
D --> E[Protocol and canvas requests]
E --> F[Canvas refresh assertion]
Decision needed
Why: The patch is correct, but the protected maintainer label and a newer main base require an explicit maintainer readiness decision rather than automated cleanup. Before merge
Agent review detailsSecurityNone. PR surfaceOther +3. Total +3 across 1 file. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the FIFO buffering at the fake transport boundary and merge only after exact-current-main validation confirms the fixture remains clean. Do we have a high-confidence way to reproduce the issue? Yes, in source: the sequential production receive loop and the prior fake transport's no-handler drop create the documented back-to-back-frame loss window; the changed test recreates that ordering. Is this the best way to solve the issue? Yes: buffering at the fake transport producer is the narrowest maintainable repair, while retaining polling or sleeps would hide the ordering bug instead of modeling the real receive boundary. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 21e9634f1084. LabelsLabel changes:
Label 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
|
|
Exact-current-main validation is green without moving the PR head.
This satisfies the latest ClawSweeper rank-up and before-merge request while preserving the signed PR head. |
|
Merged via squash.
|
* origin/main: (58 commits) fix(test): restart shared gateway after migration convergence (openclaw#120089) fix(ui): make active-run steering reliable (openclaw#120083) fix(telegram): preserve voice fallback text test(swift): preserve queued websocket frames (openclaw#120106) fix: reject missing oxlint shard selectors (openclaw#120096) test(channels): align prerelease fallback catalog spec (openclaw#120092) fix(node-cli): warn when systemd user lingering is disabled after install (openclaw#118430) fix(diagnostics): preserve CLI turn usage totals (openclaw#120100) fix(gateway): derive lock and coordinator paths from the resolved state dir (openclaw#120110) fix(release): isolate private Telegram QA harness (openclaw#120088) test(agents): exercise execution attribution ingress guard fix(gateway): defer attribution until admission succeeds refactor(agents): centralize exact execution attribution fix(google): accept base64url provider media (openclaw#116204) fix(plugins): warn when registerHook uses a typed hook event name (openclaw#118601) fix(canvas): serve Content-Length on A2UI HEAD responses (openclaw#117961) fix(gateway): make doctor dreaming timestamp comparators NaN-safe (openclaw#118749) fix(heartbeat): explain target-none skips (openclaw#119689) fix(security): stop recommending retired install-policy bypasses (openclaw#120011) fix(plugins): preserve startup release during repair (openclaw#120085) ... # Conflicts: # CHANGELOG.md # src/config/sessions/session-accessor.sqlite-transcript-write.ts
Related: #120081
What Problem This Solves
Fixes an issue where OpenClawKit websocket tests could lose a response when the gateway delivered two frames before the test actor registered its next receive callback. This surfaced as the canvas surface refresh test timing out after protocol feature publication.
Why This Change Was Made
The fake websocket now preserves inbound results in FIFO order until a receive callback is registered, matching URLSession websocket behavior. The protocol feature responder no longer polls for a callback, and the existing surface-sharing test deterministically emits the protocol feature and surface responses back-to-back.
The change is confined to the OpenClawKit test fixture. Production LOC delta: 0. Test LOC delta: +3 net.
User Impact
No runtime behavior changes. OpenClawKit CI now tests back-to-back gateway responses without dropping frames or relying on timing sleeps.
Evidence
OpenClawKit testsin Actions run 31137514056 timed out the shared canvas surface refresh after about 8 seconds.swift test --package-path apps/shared/OpenClawKit --filter GatewayNodeSessionTests: 82 tests passed.tbx_01kzczcx9hp1dp1782xdv4d6q3: passed with wrapper exit 0 (Actions run 31140036822).macos-swift, including the exactOpenClawKit testslane: passed on Actions run 31140104670.git diff --checkpassed.