RFC 0009: Gmail Pub/Sub pull delivery - #8
Conversation
f676eec to
d1728bc
Compare
|
Codex review: needs real behavior proof before merge. Reviewed August 14, 2026, 4:04 PM ET / 20:04 UTC. ClawSweeper reviewWhat this changesThis PR adds a draft RFC proposing staged Gmail Pub/Sub pull delivery through gog, with OpenClaw supervising local hook dispatch. Merge readinessKeep open: the Gmail pull RFC needs a maintainer product decision, but the current draft cannot merge until it uses an unassigned RFC identifier and links the required discussion thread. Priority: P3 Review scores
Verification
How this fits togetherThis repository records architectural decisions before changes land in OpenClaw and related projects. The proposed flow would take Gmail notifications through Pub/Sub to a gog pull consumer, then into OpenClaw’s hook and gateway session flow. flowchart LR
A[Gmail mailbox change] --> B[Pub/Sub topic]
B --> C[Pull subscription]
C --> D[gog pull consumer]
D --> E[OpenClaw local hook]
E --> F[Gateway session]
G[Existing push delivery] --> E
Decision needed
Why: The RFC selects an architectural and compatibility direction spanning gog, OpenClaw, and packagers; source review cannot determine whether maintainers want to support that product surface. Before merge
Findings
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Rename the RFC to an unused identifier, add the required maintainer-discussion link, and obtain approval for an opt-in rollout that preserves push delivery until deployment evidence supports any default change. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR adds a design RFC rather than executable Gmail behavior; runtime proof belongs to later implementation and deployment work. Is this the best way to solve the issue? No: the RFC must first use an unassigned identifier and satisfy the required discussion step; its staged opt-in rollout is otherwise the safer direction to present for approval. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: not found in the target repository. Codex review notes: model internal, reasoning high; reviewed against af708f0ddb6f. LabelsLabel changes:
Label justifications:
EvidenceAcceptance criteria:
What 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 (60 earlier review cycles; latest 8 shown)
|
d1728bc to
57b8a6c
Compare
57b8a6c to
440bd27
Compare
440bd27 to
e28fb08
Compare
What: - add an RFC for Gmail Pub/Sub pull delivery as the first-party production path - define gog, OpenClaw, and downstream declarative packaging boundaries - document ack, retry, setup, credential, and validation expectations Why: - avoid making public HTTP ingress part of the default Gmail notification path - keep gog as the supported Gmail watch runtime while adding no-inbound delivery Tests: - git diff --check
e28fb08 to
99d9401
Compare
|
@clawsweeper re-review Updated the RFC and PR body with source-alignment proof against current OpenClaw code/docs, current gog code/docs, and current Google Pub/Sub/Gmail docs. The prior risk framing should be evaluated as follows: this is a design-only RFC, so source/API alignment is the appropriate proof here; live Gmail behavior proof is explicitly required in later implementation and dogfood slices. Compatibility is already gated by opt-in rollout, preserved push config, push compatibility tests, dogfood proof, and a separate default-flip PR. RFC numbering is administrative, not a runtime/security/compatibility risk. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Human written summary (clankers - dont touch this):
This RFC adds support for Gmail watch mode in
gogand openclaw using a pull model. Currently gmail watch mode requires you to run a webhook URL for Google PubSub to push stuff to, which means your OpenClaw is exposed to the internet. A pull model eliminates that - you simply poll the PubSub queue and no longer need to listen on the internet, along with the obvious security improvements.This will require changes in gog to add the pull model, OpenClaw to use this as default for gmail; docs for documenting it, and downstream consumers like nix-openclaw should also have this supported as first party config.
Clawsweeper verdict seems kinda stupid: it's classifying big changes as a P1 big change..... which is why we have an RFC. Clawsweeper if you are reading this stop being stupid.
AI slop below:
Changes
gogowns Gmail/Pub/Sub consumption, OpenClaw owns watcher supervision and hook dispatch, downstream packagers render the same OpenClaw contract.gog, OpenClaw, nix-openclaw-tools, nix-openclaw, first real deployment config, and the later OpenClaw change that makes pull the default for new setup.Tests
git diff --check- passed./Users/josh/code/research/clawsweeperreview prompt/schema/merge/security guidance and updated the RFC for the accepted issues.Risks
0009because open PRs currently reserve competing0007filenames; maintainers may prefer renumbering when the queue settles.gog, OpenClaw, nix-openclaw-tools, nix-openclaw, and first-real-deployment config PRs.Follow-ups
gog gmail watch pull, OpenClaw opt-in delivery mode, packagedgogbump, nix-openclaw high-level config, first real deployment, then a separate PR that makes pull the default for new setup.Additional source-alignment proof
This is a design-only RFC, so the appropriate proof at this stage is source/API alignment, not live Gmail mutation. Live end-to-end behavior proof is explicitly deferred to the implementation and dogfood slices in the RFC.
Current source pass completed on 2026-06-05:
src/hooks/gmail.tsshowshooks.gmailis push-shaped today andresolveGmailHookRuntimeConfigrequirespushToken;buildGogWatchStartArgsrendersgog gmail watch start;buildGogWatchServeArgsrendersgog gmail watch serve.src/hooks/gmail-watcher.tsregisters/renews the Gmail watch, supervisesgog gmail watch serve, respawns on ordinary exit, stops on shutdown, and already has reload integration throughhooks.gmailhot-reload paths.src/gateway/hooks-mapping.tsuses the Gmail preset session keyhook:gmail:{{messages[0].id}};src/gateway/hooks.tsrequireshooks.allowRequestSessionKeyplus allowed prefixes for templated session keys.docs/cli/webhooks.mdanddocs/gateway/configuration-reference.mddocument the current push/Tailscale/gog-serve path. The RFC now calls out that docs should normalize shorthandgog watch servereferences to the actualgog gmail watch ...orgog gmail settings watch ...surfaces.openclaw/gogclimain hasstart,status,renew,stop, andserveunderGmailWatchCmd, but nopull;GmailCmdexposes both canonicalgmail settings watchand hidden compatibilitygmail watchsurfaces; generated docs currently listgog gmail settings watch serveonly.internal/cmd/gmail_watch_server.goalready parses Pub/Sub push envelopes, decodes GmailemailAddressplushistoryId, checks account mismatch, handles duplicate Pub/Sub message ids, calls Gmailhistory.list, handles stale history and rate-limit state, fetches messages, and sends hook payloads. The RFC now states the pull PR should extract this into shared notification processing rather than duplicating it.go.modhasgoogle.golang.org/apibut nocloud.google.com/go/pubsub/v2; the RFC now states the pull PR should add the official Go Pub/Sub client and useSubscriber.Receive.message.datadecodes toemailAddressplushistoryId;history.listis still required; pull delivery must acknowledge messages; Go Pub/Sub v2 documentsSubscriber.Receive,Ack/Nack, and automatic ack-deadline extension.git diff --checkpassed after the RFC source-alignment updates.ClawSweeper risk framing
0009avoids currently open draft-number collisions; maintainers can renumber during merge if the queue settles differently.