Repository navigation
fix: restore --exclude-labels SPAM,TRASH,DRAFT,SENT in Gmail watcher - #56726
JuniperTheDev wants to merge 1 commit into
Conversation
…ixes openclaw#56635) The --exclude-labels flag was present in 2026.2.24 but was accidentally dropped in 2026.3.24. Without it, sent mail and draft saves trigger webhook notifications, causing the agent to process the user's own outbound email.
Greptile SummaryThis PR restores the
Confidence Score: 5/5Safe to merge — the one-line restore is correct and matches the documented pre-regression behavior. The change is a straightforward, targeted restore of a single argument that was accidentally dropped. Logic is correct, unconditional, and consistent with the original intent. No P0 or P1 issues found; the only observation is a missing unit test for this function path, which is P2. No files require special attention, though adding a unit test for buildGogWatchServeArgs asserting --exclude-labels is always present would guard against future regressions.
|
| Filename | Overview |
|---|---|
| src/hooks/gmail.ts | Restores the unconditional --exclude-labels SPAM,TRASH,DRAFT,SENT argument; change is correct and targeted. |
Reviews (1): Last reviewed commit: "fix: restore --exclude-labels SPAM,TRASH..." | Re-trigger Greptile
|
This pull request has been automatically marked as stale due to inactivity. |
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. Close as superseded. Current main still has the Gmail watcher regression, but #56720 is the better canonical open PR for the same bug because it covers the same runtime argument path plus tests/docs/config-surface work, while this one-line PR is not merge-ready on its own. So I’m closing this here and keeping the remaining discussion on the canonical linked item. Review detailsBest possible solution: Use #56720, or a maintainer-approved narrow equivalent, as the canonical fix that restores DRAFT/SENT exclusion with updated Gmail args/log coverage and changelog/docs as appropriate. Do we have a high-confidence way to reproduce the issue? Yes. A high-confidence source-level reproduction exists on current main by resolving Gmail hook defaults and inspecting Is this the best way to solve the issue? No as submitted. Restoring the runtime argument is the right narrow surface, but this branch leaves the focused test/changelog updates missing and is superseded by the more complete #56720 path. Security review: Security review cleared: The diff only adds a fixed non-secret CLI argument to an existing local What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 0fbf4636f52c. |
Summary
Fixes #56635.
The
--exclude-labels SPAM,TRASH,DRAFT,SENTflag was passed togog gmail watch servein 2026.2.24 but was accidentally dropped in 2026.3.24. Without it only SPAM and TRASH are excluded by thegogCLI defaults, causing sent mail and draft saves to trigger webhook notifications and the agent to process the user's own outbound email.Changes
src/hooks/gmail.ts: Restore the--exclude-labels SPAM,TRASH,DRAFT,SENTargument inbuildGogWatchServeArgs().🤖 Generated with Claude Code