Skip to content

fix(googlechat): prevent oversized attachments from blocking durable ingress - #118986

Merged
steipete merged 1 commit into
mainfrom
codex/qa0803-googlechat-oversized-attachment-lane
Aug 3, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/qa0803-googlechat-oversized-attachment-lane

Conversation

@steipete

@steipete steipete commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Root cause

Google Chat attachment download raised an untyped permanent failure for either an oversized Content-Length header or streamed body. The shared durable per-space ingress queue then retried the impossible message and prevented all later messages in that conversation from running until the 24-hour dead-letter threshold.

Canonical owner-boundary repair

  • Classify both header and streamed overflow at the Google Chat media producer using the existing shared MediaFetchError("max_bytes") contract.
  • After Google authorization and access checks, adopt only that proven permanent media failure, preserve the original caption plus safe attachment type facts, emit the existing operator-visible unavailable notice, and durably release the conversation lane.
  • Preserve ordinary downloads, captionless messages, transient network/auth failures, and all existing retry behavior; never expose hostile attachment filenames.
  • Production delta: +20 lines for the existing typed producer and explicit owner-controlled operator-visible degradation; no new API, config, storage/schema, or compatibility surface.

Real behavior proof

{
  "transport": "real Google Chat ingress through actual per-account SQLite durable queue",
  "before": {
    "oversizedAttachment": "permanently retried",
    "laterSameSpaceMessage": "blocked",
    "retryHorizon": "at least 24 hours"
  },
  "after": {
    "oversizedAttachment": "accepted once with existing safe media-unavailable notice",
    "originalCaption": "preserved",
    "laterSameSpaceMessage": "processed",
    "pendingEvents": 0,
    "outstandingClaims": 0
  },
  "oversizeProducers": [
    "Content-Length",
    "streamed body"
  ],
  "transientFailures": "still retry",
  "authorization": "completed before permanent-error adoption"
}
  • Focused monitor.test.ts, monitor.lifecycle.test.ts, and targets.test.ts: 74/74 passed, including real SQLite poisoned-lane recovery and merged webhook-readiness coverage.
  • Formatting, full exact-three default oxlint, diff checks, and available focused type-aware owner checks passed.
  • Independently reviewed Google media/auth official source and SDK, shared SQLite retry owner, Telegram/LINE siblings; exactly-one fresh Codex/Sol/high formal review passed with zero P0/P1 findings (0.94).
  • Depends on already-merged Google Chat readiness fix fix(googlechat): block webhook startup without valid audience configuration #118968.

@openclaw-barnacle openclaw-barnacle Bot added channel: googlechat Channel integration: googlechat size: M maintainer Maintainer-authored PR labels Aug 3, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P1 High-priority user-facing bug, regression, or broken workflow. labels Aug 3, 2026
@clawsweeper

clawsweeper Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 3, 2026, 6:02 PM ET / 22:02 UTC.

ClawSweeper review

What this changes

The branch marks oversized Google Chat attachment downloads as permanent size failures, preserves the message caption with an unavailable-media notice, and lets later messages in that durable conversation lane run.

Merge readiness

⚠️ Ready for maintainer review - 1 item remains

Keep this PR open for the explicit maintainer landing decision required by its protected maintainer label. Current main still treats Google Chat size overflows as untyped errors, while this branch uses the shared typed media contract to accept the text with a visible unavailable-media notice and release the durable conversation lane; no blocking patch defect was found.

Priority: P1
Reviewed head: 6ebc3e28d7e739d9ee9fd46e24c548b0c26c8201
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) This is a focused, source-aligned reliability repair with credible durable-queue behavior proof and no blocking finding.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (live_output): The PR body provides after-fix, real SQLite durable-queue output for both size-overflow producers and a released same-space follow-up message; the added focused test visibly exercises the same queue state and assertions.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The PR body provides after-fix, real SQLite durable-queue output for both size-overflow producers and a released same-space follow-up message; the added focused test visibly exercises the same queue state and assertions.
Evidence reviewed 6 items Typed permanent-failure producer: The branch changes both the Content-Length and streamed-body overflow paths from generic Error values to MediaFetchError with code max_bytes, matching the shared media contract.
Owner-boundary recovery: The monitor catches only MediaFetchError(max_bytes) after inbound access authorization, appends the safe operator-visible notice, and rethrows every other download failure for existing retry behavior.
Durable-lane regression coverage: The added regression uses the real test SQLite ingress queue, sends an oversized attachment followed by another message in the same space, and asserts both no pending events and no outstanding claims.
Findings None None.
Security None None.

How this fits together

A Google Chat webhook is durably admitted per account and space before the plugin processes its message and attachment. Attachment download results become inbound media facts and an agent turn, so a permanent media-size failure must be handled after authorization without leaving the queued conversation blocked.

flowchart LR
  A[Google Chat webhook] --> B[Durable per-space queue]
  B --> C[Google Chat monitor]
  C --> D[Attachment download]
  D --> E{Media result}
  E -->|Usable| F[Inbound agent turn]
  E -->|Too large| G[Caption plus unavailable notice]
  G --> F
Loading

Decision needed

Question Recommendation
Should this protected Google Chat reliability repair be landed after the maintainer confirms the exact head remains cleanly mergeable? Land the focused repair: Merge the current branch after the normal exact-head merge checks, preserving its typed max-bytes boundary and durable-lane regression.

Why: The patch has no concrete correctness blocker, but the maintainer label requires an explicit human landing decision under repository policy.

Before merge

None.

Agent review details

Security

None.

PR surface

Source +20, Tests +230. Total +250 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 2 30 10 +20
Tests 1 239 9 +230
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 269 19 +250

Review metrics

Metric Value Why it matters
Production vs test LOC production +30/-10, tests +239/-9 The production growth is limited to typed overflow classification and one explicit visible degradation path; the larger test delta exercises real SQLite lane release and retry preservation.

Technical review

Best possible solution:

Merge the narrow producer-to-monitor repair: retain generic retries for network/auth/download failures, adopt only the typed size-limit failure after authorization, and preserve the SQLite lane-recovery regression coverage.

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

Yes, source-reproducible: current main emits generic errors for both size-overflow producers, while the durable ingress monitor only treats explicit permanent failures as non-retryable. The branch’s focused SQLite regression directly models the blocked-lane sequence without executing repository tests in this read-only review.

Is this the best way to solve the issue?

Yes. Classifying the known permanent failure at the Google Chat media producer and handling it after authorization is safer than teaching the shared queue to infer failure text, and it preserves retries for all non-size failures.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 65fa1f9a7bd1.

Labels

Label changes:

  • add P1: An impossible oversized attachment can otherwise keep later messages in one Google Chat conversation from processing until the queue’s dead-letter threshold.
  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR body provides after-fix, real SQLite durable-queue output for both size-overflow producers and a released same-space follow-up message; the added focused test visibly exercises the same queue state and assertions.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body provides after-fix, real SQLite durable-queue output for both size-overflow producers and a released same-space follow-up message; the added focused test visibly exercises the same queue state and assertions.

Label justifications:

  • P1: An impossible oversized attachment can otherwise keep later messages in one Google Chat conversation from processing until the queue’s dead-letter threshold.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body provides after-fix, real SQLite durable-queue output for both size-overflow producers and a released same-space follow-up message; the added focused test visibly exercises the same queue state and assertions.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body provides after-fix, real SQLite durable-queue output for both size-overflow producers and a released same-space follow-up message; the added focused test visibly exercises the same queue state and assertions.

Evidence

What I checked:

  • Typed permanent-failure producer: The branch changes both the Content-Length and streamed-body overflow paths from generic Error values to MediaFetchError with code max_bytes, matching the shared media contract. (extensions/googlechat/src/api.ts:169, 6ebc3e28d7e7)
  • Owner-boundary recovery: The monitor catches only MediaFetchError(max_bytes) after inbound access authorization, appends the safe operator-visible notice, and rethrows every other download failure for existing retry behavior. (extensions/googlechat/src/monitor.ts:288, 6ebc3e28d7e7)
  • Durable-lane regression coverage: The added regression uses the real test SQLite ingress queue, sends an oversized attachment followed by another message in the same space, and asserts both no pending events and no outstanding claims. (extensions/googlechat/src/monitor.test.ts:498, 6ebc3e28d7e7)
  • Shared queue contract: The Google Chat ingress monitor recognizes only explicit permanent ingress/auth failures as non-retryable; an untyped attachment overflow therefore remains retryable and can retain the lane. The branch avoids widening that queue-level classifier. (extensions/googlechat/src/monitor-ingress.ts:111, 65fa1f9a7bd1)
  • Feature provenance: Local blame attributes the existing generic size-overflow producer to commit 5150670; the present fix replaces that exact behavior with the typed shared error. (extensions/googlechat/src/api.ts:168, 5150670c72d9)
  • Current-main and related-work check: The PR head is not an ancestor of current main and still differs in the three reviewed Google Chat files. The referenced merged PR is adjacent webhook-readiness work, not a replacement for this attachment recovery. (extensions/googlechat/src/monitor.ts:288, 65fa1f9a7bd1)

Likely related people:

  • Vincent Koc: Local blame ties the current generic Google Chat media-overflow behavior to this commit; the PR repairs that producer contract. (role: recent area contributor; confidence: high; commits: 5150670c72d9; files: extensions/googlechat/src/api.ts)
  • steipete: The merged Google Chat readiness repair immediately preceding this work updated the same plugin’s API and monitor boundary. (role: adjacent feature owner; confidence: high; commits: 386228ad665d; files: extensions/googlechat/src/api.ts, extensions/googlechat/src/monitor.ts)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete
steipete merged commit 554968f into main Aug 3, 2026
102 of 107 checks passed
@steipete
steipete deleted the codex/qa0803-googlechat-oversized-attachment-lane branch August 3, 2026 22:12
@steipete

steipete commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Aug 3, 2026
* origin/main: (90 commits)
  fix(googlechat): recover durable lanes after oversized attachments (#118986)
  test(qa): cover runtime telemetry evidence (#118950)
  fix(gateway): resolve SQLite usage details (#118918)
  test(cron): cover durable scheduler state (#118981)
  test(gateway): cover node exec approval relay (#118825)
  test(qa): add Active Memory recall coverage (#118963)
  test(qa): promote package-backed Docker artifact proof (#118826)
  test(qa): cover diagnostic event boundary (#118844)
  test(gateway): cover WebSocket runtime contracts (#118797)
  fix(signal): drain accepted websocket messages before shutdown (#118975)
  fix(plugins): remove stale load paths during uninstall (#118930)
  test(qa): cover bundled runtime discovery (#118922)
  chore(clawhub): cover plugin release policy contracts (#118971)
  test(qa): cover support export and stability (#118956)
  fix(feishu): enforce exact signed webhook request boundaries (#118758)
  feat(sms): add Twilio MMS support (#118664)
  test(gateway): prove TLS certificate pinning (#118812)
  test(qa): cover tool policy and sandbox gates (#118925)
  fix(cli): keep update dry-run state immutable (#118856)
  fix(scripts): honor last repeated CLI flag value (#118710)
  ...

# Conflicts:
#	pnpm-workspace.yaml
vincentkoc added a commit that referenced this pull request Aug 3, 2026
…r-admin-20260803

* origin/main: (89 commits)
  fix(googlechat): align doctor policy ownership with canonical account configuration (#118972)
  test(tui): prove editor input through PTY (#118982)
  fix(memory): persist trusted owner provenance at canonical transcript boundary (#118987)
  test(qa): cover health monitor and cache boundaries (#118961)
  fix(macos): restore dashboard frame double-click zoom (#118976)
  fix(googlechat): recover durable lanes after oversized attachments (#118986)
  test(qa): cover runtime telemetry evidence (#118950)
  fix(gateway): resolve SQLite usage details (#118918)
  test(cron): cover durable scheduler state (#118981)
  test(gateway): cover node exec approval relay (#118825)
  test(qa): add Active Memory recall coverage (#118963)
  test(qa): promote package-backed Docker artifact proof (#118826)
  test(qa): cover diagnostic event boundary (#118844)
  test(gateway): cover WebSocket runtime contracts (#118797)
  fix(signal): drain accepted websocket messages before shutdown (#118975)
  fix(plugins): remove stale load paths during uninstall (#118930)
  test(qa): cover bundled runtime discovery (#118922)
  chore(clawhub): cover plugin release policy contracts (#118971)
  test(qa): cover support export and stability (#118956)
  fix(feishu): enforce exact signed webhook request boundaries (#118758)
  ...
vincentkoc added a commit that referenced this pull request Aug 3, 2026
…ansports-20260803

* origin/main: (120 commits)
  test(ui): add service-worker update primary QA proof (#118805)
  test(qa): cover CLI onboarding and plugin install sources (#118882)
  test(qa): cover remote logging boundaries (#118951)
  fix(sms): retry transient MMS failures before durable adoption (#118994)
  test(qa): cover video generation invocation (#118864)
  test(qa): cover media reference intake (#118858)
  test(qa): cover image generation task lifecycle (#118915)
  feat(sms): track Twilio delivery status (#118665)
  test(tasks): cover TaskFlow registry lifecycle (#118983)
  test(gateway): verify SSH tunnel fallback (#118818)
  fix(security): harden network tool output at canonical owner boundaries (#118984)
  fix(googlechat): align doctor policy ownership with canonical account configuration (#118972)
  test(tui): prove editor input through PTY (#118982)
  fix(memory): persist trusted owner provenance at canonical transcript boundary (#118987)
  test(qa): cover health monitor and cache boundaries (#118961)
  fix(macos): restore dashboard frame double-click zoom (#118976)
  fix(googlechat): recover durable lanes after oversized attachments (#118986)
  test(qa): cover runtime telemetry evidence (#118950)
  fix(gateway): resolve SQLite usage details (#118918)
  test(cron): cover durable scheduler state (#118981)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: googlechat Channel integration: googlechat maintainer Maintainer-authored PR P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. 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