Repository navigation
test(macos): stabilize gateway session negotiation tests - #120141
Conversation
Fixes #120130 Punchcard-Session: golden-meadow-timber-8g
|
@clawsweeper review |
|
🦞👀 Command router queued. I will update this comment with the next step. |
|
Codex review: needs maintainer review before merge. Reviewed August 7, 2026, 12:21 AM ET / 04:21 UTC. ClawSweeper reviewWhat this changesThe PR makes macOS gateway-session negotiation and receipt tests deterministic by explicitly ordering fake protocol frames and replacing sleep-based retry assertions. Regression provenancePossible regression — probable (reproduction; reviewed change). No predecessor PR is attributed. Merge readinessKeep open for normal maintainer review: the PR removes a real test-harness ordering race without changing runtime behavior, and no blocking correctness or security finding was found. Priority: P2 Review scores
Verification
How this fits togetherOpenClawKit’s macOS node session negotiates protocol capabilities over a gateway connection before handling invokes and receipt retries. The changed fake-transport tests verify that negotiation state is resolved before subsequent frames are processed. flowchart LR
Node[Mac node session test] --> Fake[Fake gateway transport]
Fake --> Negotiation[Protocol negotiation response]
Negotiation --> Mode[Resolved session mode]
Mode --> Invoke[Gateway invoke]
Invoke --> Receipt[Receipt retry assertion]
Before merge
Agent review detailsSecurityNone. PR surfaceOther +56. Total +56 across 1 file. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land the focused test-owner repair once exact-head checks and the current review moves are satisfied; no production session behavior change is warranted. Do we have a high-confidence way to reproduce the issue? Yes: the linked report gives a repeated focused Swift-test path, and current source establishes the race between the detached fake response and the emitted invoke; this review did not rerun it. Is this the best way to solve the issue? Yes: controlling the fake transport’s frame order and separating deadline semantics fixes the test owner boundary instead of weakening production behavior or adding timing tolerance. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against f87d8bb72daa. 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
|
|
Merged via squash.
|
…cope * origin/main: fix(qa): bound Matrix scenario preparation separately (#119996) test(msteams): cover occupied webhook port (#120158) fix(agents): clear btw attribution reservations fix(agents): reserve execution attribution atomically fix(agents): reject attribution collisions before capture fix(agents): reject CLI attribution collisions fix(agents): reject private attribution recovery by run id fix(agents): restore runtime check cleanliness fix(agents): refresh rebound run admission time refactor(agents): propagate exact attribution across runtimes fix(release): provide prerelease plugin companions to package QA (#120107) test(macos): stabilize gateway session negotiation tests (#120141) refactor(test): replace logic-bearing vi.mock factories with boundary fakes, batch 2 (#120117) # Conflicts: # src/agents/command/attempt-execution.ts
…0141) Fixes openclaw#120130 Punchcard-Session: golden-meadow-timber-8g
Fixes #120130
What Problem This Solves
Fixes an issue where unrelated pull requests could intermittently fail the
macos-swiftgate becauseGatewayNodeSessionTestsasserted negotiation andreceipt timing that the test transport had not made deterministic.
Why This Change Was Made
Post-negotiation tests now enqueue the protocol response or error before the
invoke frame, matching websocket frame ordering without waiting on scheduler
timing. Receipt coverage separately proves an unbounded stale retry dispatches
exactly once and that a deadline-bound retry may expire before or after its
single permitted dispatch.
Intentional pre-negotiation and response-plus-invoke ordering tests are
unchanged. This is test-only: no production behavior, timeout, polling, or sleep
changed.
User Impact
No runtime behavior changes. Contributors get a deterministic
macos-swiftsignal instead of intermittent failures inherited from
main.Evidence
GatewayNodeSessionTests: 11 consecutive runs, 83/83 tests passed each run.origin/mainreport the same three pre-existingwhole-file violations; no changed-line violation.
tbx_01kzd5x2wcm3m3gyx5mz8bme0z(run).
Punchcard-Session: golden-meadow-timber-8g