Repository navigation
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 31, 2026, 3:34 PM ET / 19:34 UTC. ClawSweeper reviewWhat this changesThe PR expires a session-scoped poll-vote echo record at its exact 30-second TTL and adds cross-run boundary coverage. Regression provenancePossible regression — probable (reviewed change; failure trace). No predecessor PR is attributed. Merge readinessNo blocking findings. The PR remains necessary because current main retains the exclusive TTL checks; the inclusive checks correctly make a matching follow-up deliver at exactly 30 seconds while retaining session, route, and one-shot safeguards. Priority: P2 Review scores
Verification
How this fits togetherThe agent Message tool records a successful poll vote for the current session and route, then suppresses one matching text echo before outbound delivery. Non-suppressed messages continue into the message-action runner, which resolves and sends through the selected channel. flowchart LR
Vote[Poll vote action] --> Record[Recent vote record]
Send[Follow-up send] --> Guard[Session and route echo guard]
Record --> Guard
Guard -->|within TTL and matching| Suppress[Suppress duplicate echo]
Guard -->|expired or different route| Runner[Message-action runner]
Runner --> Delivery[Channel delivery]
Before merge
Agent review detailsSecurityNone. PR surfaceSource 0, Tests +29. Total +29 across 2 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain the paired inclusive expiry checks and land only after exact-head CI confirms the focused boundary behavior remains clean. Do we have a high-confidence way to reproduce the issue? Yes—source-reproducible with high confidence: a matching same-session, same-route echo exactly 30,000 ms after a recorded vote reaches the exclusive check and is suppressed on current main. Is this the best way to solve the issue? Yes. Both state-owner expiry paths define the same TTL, and making both inclusive is the smallest coherent repair; moving the rule into the channel plugin would duplicate core session-state policy. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 0820b89d3b20. 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
HistoryReview history (4 earlier review cycles)
|
dc7e524 to
5be01b4
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Expire both read and write-time records at the same inclusive TTL boundary. Cover adjacent times and retain inspectable Gateway/channel transport proof. Co-authored-by: qingminlong <[email protected]>
|
@clawsweeper re-review Both expiry predicates now use the same boundary. The updated body includes the complete inspectable synthetic mock-Gateway/channel harness and before/after results at29999,30000,and30001ms, plus focused tests and full changed-file checks. New-head CI is required before landing. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Merged via squash.
|
* fix(agents): expire poll vote echo at TTL * fix(agents): align poll echo pruning with expiry Expire both read and write-time records at the same inclusive TTL boundary. Cover adjacent times and retain inspectable Gateway/channel transport proof. Co-authored-by: qingminlong <[email protected]> --------- Co-authored-by: Peter Steinberger <[email protected]> Co-authored-by: qingminlong <[email protected]>
What Problem This Solves
A same-route poll-vote follow-up at exactly 30 seconds could still be suppressed even though the echo guard had reached its expiry boundary.
Why This Change Was Made
Use inclusive expiry in both the pre-dispatch lookup and the write-time pruning loop. Preserve the existing session/agent/route/account scope, one-shot consumption, and text matching. Production remains net zero; no configuration, persistence, or channel API changes.
User Impact
An echo at 29,999 ms stays suppressed. At 30,000 ms and afterward, the follow-up reaches outbound delivery.
Evidence
Independently authored tests first ran against unchanged trusted main
37db48c3e93cef9330bad6de67fd7d77183e05da: the 30,000 ms case failed because the result was suppressed, while 29,999 ms and 30,001 ms controls passed. The equivalent two-comparator repair passes all ten existing and authored poll-guard cases, covering fresh tool instances across turns, conversation/route/account isolation, emoji identity, and one-shot consumption. OnlyDate.nowis controlled in the boundary regression; unrelated timers retain normal behavior.The retained inspectable harness below proves the changed delivery boundary through the real
createMessageTooland defaultrunMessageAction, a loopback WebSocket mock Gateway, the production server-side action runner, and an HTTP synthetic channel API. The vote is handled through the channel's local action path, and follow-up sends use its Gateway execution path. Each follow-up uses a fresh tool and turn capability for the same session and route. The same unchanged harness records baseline suppression at exactly 30,000 ms and repaired delivery at 30,000 and 30,001 ms, while retaining suppression at 29,999 ms. Both socket servers are closed and the isolated state is removed infinally.This is actual mock-Gateway/channel transport proof. It does not start the complete production Gateway, use a model, or deliver an external iMessage; the action runner and tool results are not mocked. The original temporary direct-adapter trace is superseded by this retained harness and its explicit transport observations, addressing the latest ClawSweeper proof request.
Node 24.20.0: the baseline regression command took 27.50 seconds; the repaired ten-case poll group took 26.86 seconds. The initial harness calibration failed before actions because the synthetic plugin lacked its required outbound surface; the retained harness includes that surface and then reproduced the intended baseline failure. No production workaround, deadline change, or assertion weakening was made. Production +2/-2 (net0), tests +29/-0. Thanks @qingminglong; contributor ancestry is preserved.
The incoming branch's CI failed in checkout authentication before tests began. Final published-head CI and native landing validation remain pending; runtime results above come from the independently authored equivalent on trusted main.
Changed-scope validation passed formatting, core and core-test typechecks, targeted lint, and the required repository guards. The temporary gate checkout initially lacked the UI workspace dependency link and resolved an older root pako without declarations; linking the existing pinned UI installation corrected that checkout layout, with no dependency or source change.
Inspectable synthetic proof harness
Run from the reviewed, dependency-complete checkout with Node 24:
node --import ./scripts/tsx.mjs /path/to/probe.mts "$PWD"Before proof result
{ "passed": false, "sourceSha256": "76dbcc332bb46fb2cf24944beeeaa7a1a349ad98a39d8ffb995095328df5a2fd", "node": "v24.20.0", "transport": "loopback WebSocket mock Gateway + HTTP synthetic channel API", "realGatewayServer": false, "mockActionRunner": false, "externalDelivery": false, "results": [ { "elapsedMs": 29999, "suppressed": true, "channelRecords": [ { "action": "poll-vote", "target": "user:synthetic-recipient", "accountId": "default", "pollId": "synthetic-poll" } ], "expected": "suppressed" }, { "elapsedMs": 30000, "suppressed": true, "channelRecords": [ { "action": "poll-vote", "target": "user:synthetic-recipient", "accountId": "default", "pollId": "synthetic-poll" } ], "expected": "delivered" }, { "elapsedMs": 30001, "suppressed": false, "channelRecords": [ { "action": "poll-vote", "target": "user:synthetic-recipient", "accountId": "default", "pollId": "synthetic-poll" }, { "action": "send", "target": "user:synthetic-recipient", "accountId": "default", "message": "🦞 Black." } ], "expected": "delivered" } ], "gatewayRecords": [ { "action": "send", "channel": "ttl-proof", "params": { "action": "send", "channel": "ttl-proof", "target": "user:synthetic-recipient", "message": "🦞 Black.", "idempotencyKey": "followup-30001:message-tool:-LdJxFPey48gLnmhZfEyOkpm:send-30001", "bestEffort": true, "to": "user:synthetic-recipient", "accountId": "default", "__sessionKey": "agent:main:main", "__agentId": "main" } } ], "wallMs": 3374.4456249999994, "rssBytes": 759595008 }After proof result
{ "passed": true, "sourceSha256": "f518a930ee6f785f032648a4ee14a62ddd38220e025e2f3a4df4a3215ad6a58a", "node": "v24.20.0", "transport": "loopback WebSocket mock Gateway + HTTP synthetic channel API", "realGatewayServer": false, "mockActionRunner": false, "externalDelivery": false, "results": [ { "elapsedMs": 29999, "suppressed": true, "channelRecords": [ { "action": "poll-vote", "target": "user:synthetic-recipient", "accountId": "default", "pollId": "synthetic-poll" } ], "expected": "suppressed" }, { "elapsedMs": 30000, "suppressed": false, "channelRecords": [ { "action": "poll-vote", "target": "user:synthetic-recipient", "accountId": "default", "pollId": "synthetic-poll" }, { "action": "send", "target": "user:synthetic-recipient", "accountId": "default", "message": "🦞 Black." } ], "expected": "delivered" }, { "elapsedMs": 30001, "suppressed": false, "channelRecords": [ { "action": "poll-vote", "target": "user:synthetic-recipient", "accountId": "default", "pollId": "synthetic-poll" }, { "action": "send", "target": "user:synthetic-recipient", "accountId": "default", "message": "🦞 Black." } ], "expected": "delivered" } ], "gatewayRecords": [ { "action": "send", "channel": "ttl-proof", "params": { "action": "send", "channel": "ttl-proof", "target": "user:synthetic-recipient", "message": "🦞 Black.", "idempotencyKey": "followup-30000:message-tool:-LdJxFPey48gLnmhZfEyOkpm:send-30000", "bestEffort": true, "to": "user:synthetic-recipient", "accountId": "default", "__sessionKey": "agent:main:main", "__agentId": "main" } }, { "action": "send", "channel": "ttl-proof", "params": { "action": "send", "channel": "ttl-proof", "target": "user:synthetic-recipient", "message": "🦞 Black.", "idempotencyKey": "followup-30001:message-tool:-LdJxFPey48gLnmhZfEyOkpm:send-30001", "bestEffort": true, "to": "user:synthetic-recipient", "accountId": "default", "__sessionKey": "agent:main:main", "__agentId": "main" } } ], "wallMs": 3949.3650829999997, "rssBytes": 760463360 }