Skip to content

fix(googlechat): stop metadata lookups after sender authority expires - #185972

Merged
vincentkoc merged 5 commits into
mainfrom
fix/googlechat-session-route-authority
Oct 27, 2026
Merged

vincentkoc merged 5 commits into
mainfrom
fix/googlechat-session-route-authority

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

Related: #177381

What Problem This Solves

Fixes Google Chat making a new destination-metadata request after a message was accepted and its transport authority was revoked.

User Impact

Release note: Google Chat: stop new destination-history metadata requests after send authority expires while preserving already accepted delivery receipts.

An accepted message keeps its successful receipt and local history. Revocation prevents further network discovery; authorized delivery still resolves destination metadata normally.

Why This Change Was Made

Forward the existing transport-authority check through both user and space route lookups into the guarded HTTP owner. Keep accepted-delivery persistence under its separate current-owner check.

Production delta: +12 lines for the missing callback handoff. Test consolidation preserves routing assertions while adding token/DNS revocation and accepted-history coverage; test delta: -13 lines. Two obsolete mock-export ledger entries are removed; no guard or test ceiling changes.

Separate follow-up: audit Slack's analogous route-discovery callback handoff.

Evidence

  • Final signed head: 9bb005fcd110e0d27c4d07379f767cb3a8f2294b. Independent source and correction reviews are clear. The substantive correction passed scoped autoreview; the final release-note relocation changes no production or test bytes.
  • Fresh required CI passed: 33 successful jobs, 28 skipped, zero failures. Both the mock-export ratchet and extension lint passed; the external CI/security gate also succeeded.
  • Actual tested merge: 6232680ca13d89a0a3885bc9ae32ff60b51a0f4b, base 653c1166 + final head. Pinned Bun 807211511, Linux x64, Vitest 5.0.5. Complete Google transport 7/7 and sender authority 13/13, plus accepted-history integration 10/10, all zero skips.
  • These cases exercise healthy POST/POST/GET delivery, revocation during token/DNS preparation, accepted-message receipt preservation, history deduplication, and real DELETE abort/socket closure.
  • Exact-head ClawSweeper review: no findings, no before-merge items or remaining rank-up moves.
  • Baseline proof reproduced the original defect on 6f8c9bad. Earlier eed0 CI passed the runtime cases but exposed two owned gate failures: obsolete mock-export rows and a shadowed test-local name. Both are corrected and passed fresh CI above; the earlier run remains failed.
  • No authenticated external Google account was used. Proof exercises production HTTP, token preparation, DNS/SSRF guarding, durable delivery and persistence against loopback endpoints. Earlier interactive provider-exit-255 attempts remain incomplete infrastructure proof; ordinary CI supplies the complete file verdict.

@vincentkoc vincentkoc self-assigned this Oct 27, 2026
@clawsweeper

clawsweeper Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added channel: googlechat Channel integration: googlechat size: M labels Oct 27, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 27, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review October 27, 2026 14:43
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 27, 2026
@clawsweeper

clawsweeper Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Pass the sender’s existing authority check through Google Chat destination-metadata requests while preserving accepted-delivery settlement.

Example: Google Chat accepts spaces/AAA/messages/accepted, then the sender’s authority expires.

  • Before: History enrichment can issue GET /v1/spaces/AAA after authority expires.
  • After: The metadata request is blocked, while the accepted delivery retains its successful receipt.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Focused, correct repair with sufficient production-boundary HTTP proof; evidence remains an in-process harness rather than an authenticated shipped-entry-point run.
Proof confidence 🦐 gold shrimp (3/6) ✨ media proof bonus Sufficient (linked_artifact): Retained prior-head proof exercises the production Google Chat adapters and guarded HTTP client against loopback: token/DNS revocation prevents requests, authorized delivery permits metadata discovery, and accepted delivery settles after revocation. REST verifies the linked jobs succeeded; subsequent source changes preserve production behavior and assertions. Raw log retrieval is blocked by this reviewer’s network policy, and no external Google account was exercised.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Google Chat can make destination-metadata requests after the sender’s authority has expired.
Reason: The maintainer-authored direction restores the existing cancellation contract with narrowly scoped callback plumbing and preserves accepted delivery.

Merge readiness

✅ Ready for maintainer review

Keep open: this PR repairs a current-main authority callback gap with a focused change; no actionable patch defects were found.

Priority: P2
Reviewed head: 9bb005fcd110e0d27c4d07379f767cb3a8f2294b

Before merge

None.

Findings

None.

Agent review details

How this fits together

Google Chat session routing resolves user or space targets into conversation identities; its metadata requests use the shared guarded HTTP transport, while confirmed delivery history has separate persistence authority.

flowchart TD
  A[Confirmed delivery] --> B[Destination resolution]
  B --> C[Google Chat route resolver]
  C --> D[Google Chat HTTP owner]
  D --> E[Guarded fetch authority check]
  E --> F[Metadata request]
  B --> G[Local history settlement]
Loading

Technical review

Best possible solution:

Use the existing sender-authority callback at both metadata request boundaries while retaining separate authority for accepted-delivery persistence.

Do we have a high-confidence way to reproduce the issue?

Current-main source visibly drops the callback before metadata discovery; the PR also records a failing baseline and passing real-HTTP regressions, but no target code was executed during this read-only review.

Is this the best way to solve the issue?

This is the smallest complete repair: forward the existing callback into the existing HTTP owner, preserve metadata reuse and nonfatal classification, and avoid coupling accepted persistence to expired transport authority.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 2bddc783d2a8.

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit a2a68d1 adds extensions/googlechat/src/targets.ts:121 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: a2a68d154b1b; files: extensions/googlechat/src/targets.ts)
  • Shakker: Raw commit 213d513 adds extensions/googlechat/src/api.ts:104 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 213d5133e76d; files: extensions/googlechat/src/api.ts)
  • Vincent Koc: Raw commit 6cae562 adds extensions/googlechat/src/api.ts:111 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 6cae5628b09a; files: extensions/googlechat/src/api.ts)

PR surface

Source +12, Tests -13, Other -2. Total -3 across 8 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 2 24 12 +12
Tests 5 92 105 -13
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 0 2 -2
Total 8 116 119 -3

Review metrics

Metric Value Why it matters
Production versus test delta Production +24/-12, tests +92/-105; mock ledger -2. The net 12 production lines connect existing authority plumbing; test consolidation retains route-classification coverage while adding distinct revocation boundaries.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: A bounded Google Chat cancellation defect permits auxiliary metadata requests after sender authority expires, while already accepted message delivery remains valid.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (1 earlier review cycle)
  • reviewed 2026-10-27T14:58:12.519Z sha eed0c65 :: needs maintainer review before merge. :: none

Reviewed October 27, 2026, 11:28 AM ET / 15:28 UTC (Revision 2).

Google Chat: stop new destination-history metadata requests after send authority expires while preserving already accepted delivery receipts.
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Please review exact head 9bb005f. The two diagnosed CI issues are corrected; release-note context is retained in the PR body and signed commit. The body links the complete prior-head runtime receipts and distinguishes the fresh required CI now running.

@clawsweeper

clawsweeper Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 27, 2026
@vincentkoc
vincentkoc merged commit c168d2b into main Oct 27, 2026
141 checks passed
@vincentkoc
vincentkoc deleted the fix/googlechat-session-route-authority branch October 27, 2026 15:33
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 28, 2026
…openclaw#185972)

* fix(googlechat): preserve authority for session route lookups

* test(googlechat): model healthy session metadata lookup

* test(googlechat): prune removed route mock baseline

* test(googlechat): avoid shadowing DNS lookup

* chore(googlechat): retain release note in PR context

Google Chat: stop new destination-history metadata requests after send authority expires while preserving already accepted delivery receipts.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: googlechat Channel integration: googlechat P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant