Repository navigation
fix(gmail): inspect pushes matching stored history - #1140
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 22, 2026, 2:27 AM ET / 06:27 UTC (Revision 5). ClawSweeper reviewWhat this changesAllow Gmail notifications matching the saved history cursor to trigger a history lookup, add delivery regression coverage and documentation, and remove an unused CLI adapter. Merge readiness✅ Ready for maintainer review The fix remains necessary on current main and v0.40.0. No blocking defects were found, and the previously accepted runtime proof still covers the unchanged production implementation. Priority: P2 Review scores
Verification
How this fits togetherThe Gmail watcher receives Pub/Sub notifications, reads mailbox changes from a saved history cursor, and forwards messages to a configured webhook. Push and pull delivery share the cursor selector and processing logic. flowchart LR
A[Pub/Sub notification] --> B[Authentication and account checks]
B --> C[Select history cursor]
D[Saved watch state] --> C
C --> E[Gmail history and messages]
E --> F[Configured webhook]
E --> D
Before mergeNone. Agent review detailsSecurityNone. Review metricsNone. Technical reviewBest possible solution: Use the existing history-processing path for equal cursors while preserving older-notification filtering, duplicate suppression, and delivery recovery. Do we have a high-confidence way to reproduce the issue? Yes, from source: an equal history ID with a new Pub/Sub message ID exits before Gmail history lookup on current main. This review did not execute a failing main build. Is this the best way to solve the issue? Yes. Changing the existing comparison is a focused repair, supported by delivery regression coverage and historical real-Gmail proof for the same production implementation. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against baac9cf45f3c. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (4 earlier review cycles)
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Check Gmail history when a notification matches the saved cursor, retaining older-ID and duplicate-message handling. Remove the unused CLI state adapter and keep its ordering tests with the state owner. Co-authored-by: 江口 和幸 <201872039+kazuyuki-eguchi@users.noreply.github.com>
f170f60 to
dd740fa
Compare
|
Landed as 0ebd74d. Both equal-cursor regressions failed before the fix; the processor test now verifies lookup from cursor 200, message delivery at history 201, and persisted delivery/cursor state. Full |
A Gmail notification whose history ID equaled the saved watch cursor was dropped before Gmail history could be inspected. Allow equality to trigger the history lookup, while retaining the older-ID and duplicate-message protections.
The regression follows one equal-history delivery through lookup from cursor 200, a pending message at history 201, hook delivery, and the persisted cursor/delivery result. It fails on the old selector. The watch guide documents the boundary, and a test-only CLI forwarding helper is removed with its ordering coverage moved to the state package.
Thanks @kazuyuki-eguchi for the fix and correlated delivery evidence. Independent validation uses synthetic history and hooks, without live mailbox changes.
The focused cursor/processor regressions and full make ci pass on AWS Crabbox. Independent Codex review of the staged candidate found no actionable P0–P2 findings.