Skip to content

fix: preserve workspace request and output contracts - #1336

Merged
steipete merged 1 commit into
mainfrom
fix/round20
Nov 14, 2026
Merged

steipete merged 1 commit into
mainfrom
fix/round20

Conversation

@steipete

Copy link
Copy Markdown
Collaborator

Problem and change

Several existing commands silently dropped data or sent a different request than the caller intended. This consolidates the verified fixes from #1308, #1311–#1319, #1321–#1326, plus issues #1328–#1329, #1330–#1331 and #1335.

  • Calendar now reads short event pages up to the requested limit, truncates the correct parent for future-instance updates, reports unavailable free/busy calendars, and validates instant ranges, named calendars containing @, and malformed attendee clears.
  • Gmail excludes send-as aliases consistently in reply-all and auto-replies, preserves HTML-only originals in plain forwards, and fetches every history page before advancing a watch cursor.
  • Drive, Docs, Sheets, Sites, Tasks, Contacts and AdSense preserve their documented request/output contracts: empty arrays, explicit clears, numeric JSON tokens, stable table rows, comma-containing label values, shortcut targets, requested false booleans, search caps and report warnings.
  • Generated agent skills explain when to use each service and distinguish overlapping workflows without requiring an unshipped browser skill.

The Contacts search default matches Google's effective 30-result ceiling; larger requested limits continue with a warning. Default auto-replies stop when alias discovery fails, because the documented self-exclusion cannot be guaranteed; --allow-self keeps the earlier fallback. No release, version, scope or security-setting changes.

Validation

The regression tests failed against main before the production fixes. They exercise the actual command dispatcher or command/API boundary against synthetic HTTP responses, including serialized requests, MIME, pagination and output. Provider-side behavior is not claimed as live-tested.

make ci passed on AWS Crabbox cbx_7b5d005c5d91 (run run_997659e86efc486cc73493aec1567b3d): formatting, lint, deadcode, full tests, docs and generated skills. Two independent P0–P2 reviews returned scoped-clean. A built macOS CLI also passed loopback request checks for all four new validation/precision issues. The Docs terminal-list inheritance issue (#1333), affected-account OAuth consent issue (#1334), opaque Gmail URL feature (#1327), Chat attachments (#1320), recurrence policy (#1309), and pre-existing holds remain separate.

Thanks to @saariuslystoned, @SebTardif, @privatenumber, @pkyIntelligence and @henkisdabro.

Consolidate reproduced command bugs from #1308, #1311-#1319, #1321-#1326 and issues #1328, #1329, #1330, #1331, #1335.

Co-authored-by: Bobby Bones <159389674+saariuslystoned@users.noreply.github.com>
Co-authored-by: Sebastien Tardif <sebtardif@ncf.ca>
@steipete
steipete requested a review from a team as a code owner November 14, 2026 02:42
@clawsweeper

clawsweeper Bot commented Nov 14, 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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-14T02:43:24.881757Z c418f8e PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal priority bug or improvement with limited blast radius. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. 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. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 14, 2026
@clawsweeper

clawsweeper Bot commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR repairs pagination, recipient selection, request serialization, and output contracts across existing Google Workspace commands.

Example: A Gmail watch notification covers history pages containing m1 and m2, with mailbox historyId 300.

  • Before: Only m1 reaches the hook, while the saved cursor advances to 300 and skips m2.
  • After: Both history pages are fetched before cursor advancement, allowing m1 and m2 to reach the hook.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Useful, correct repairs supported by command-boundary regressions, linked CLI traces, upgrade evidence, and passing checks on the reviewed head.
Proof confidence 🐚 platinum hermit (4/6) This maintainer-authored PR is outside the contributor proof gate; linked source PRs provide built-CLI loopback traces for the consolidated behavior, including watch delivery, serialized clears, aliases, and output, with live Tasks and Cc-only Gmail checks.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Existing commands can silently omit results or content, alter requested values, misaddress replies, or report success without applying an explicit clear.
Reason: The failures are concrete and source-verifiable, and the maintainer-authored PR explicitly chooses the limited default and fallback changes.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored PR fixes concrete request and output defects still present on main; review found no actionable patch defect.

Priority: P2
Reviewed head: c418f8ee95968ac414138ca03166496821b53a07

Before merge

None.

Findings

None.

Agent review details

How this fits together

The command layer translates CLI arguments into authenticated Google API requests, then formats responses or delivers Gmail watch payloads to hooks.

flowchart LR
  A[CLI arguments] --> B[Command validation and planning]
  B --> C[Google API clients]
  C --> D[Response pagination and normalization]
  D --> E[JSON or table output]
  D --> F[Gmail watch processor]
  F --> G[Hook delivery and cursor state]
Loading

Technical review

Best possible solution:

Land the existing contract repairs with their regression coverage, documented compatibility changes, and contributor credits.

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

Main source establishes the one-page watch cursor loss, wrong recurring-parent target, omitted explicit clears, and float64 append conversion; linked reports supply failing regressions and CLI traces, while this read-only review ran no target code.

Is this the best way to solve the issue?

The patch fixes the demonstrated command and shared-helper boundaries directly, preserving existing request owners and avoiding new flags or parallel implementations.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 6f910fffac0a.

Provenance checked

  • Calendar search and team pagination keeps the original intent (d2be673: feat: add retry logic, concurrent fetching, and extended commands #18 added Calendar search, while team history leads to f8b83e5; neither inspected history states an intentional first-page-only result contract.)
  • Recurring update targets keeps the original intent (f1d355b: The shared scope resolver already distinguishes target instance and parent series, and delete already uses ParentEventID; the patch carries that existing distinction through update.)
  • Free/busy ranges and calendar selection keeps the original intent (23b847c: fix(calendar): parse freebusy date ranges like events #811 sought consistent Calendar time parsing; the patch preserves exact RFC3339 instants while rejecting invalid ranges and retains direct handling for email-form calendar IDs.)
  • Attendee clearing keeps the original intent (8c5c062: fix: preserve Calendar clears and bounded MCP continuation #1273 deliberately enabled explicit empty attendee clears; this patch preserves deliberate clearing while rejecting malformed nonblank input.)
  • Free/busy presentation keeps the original intent (47f1540: The typed presentation refactor carried busy-only rows and map iteration forward; warnings preserve stdout columns while distinguishing unavailable data from free time.)
  • Gmail send and autoreply recipients changes intended behavior with a stated reason (4067cc6: Autoreply originally exposed --allow-self and excluded only account/sending identities; shared reply commands later supplied full alias exclusion, and the maintainer body explains why failed discovery must stop the default path.)
  • Forwarded plain-text content keeps the original intent (13a1aae: feat(gmail): add forward command #482 intended forwards to contain original plain and HTML content; the patch reuses reply's existing HTML-to-text fallback.)
  • Gmail watch pagination keeps the original intent (ae251d2: The adapter extraction carried a single history request forward; its extraction is not proof of introduction, and fetching all pages restores the processor's complete-history cursor assumption.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit f1d355b adds internal/cmd/calendar_recurrence_scope.go:15 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: f1d355bfa7e4; files: internal/cmd/calendar_recurrence_scope.go)
  • salmonumbrella: Raw commit f8b83e5 adds internal/cmd/calendar_team.go:19 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: f8b83e560933; files: internal/cmd/calendar_team.go)
  • Sebastien Tardif: Raw commit 91b66c9 adds internal/cmd/paging_guard.go:11 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 91b66c9ea170; files: internal/cmd/paging_guard.go)

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add P2: The PR repairs concrete command-level correctness defects across bounded workflows without evidence of an urgent runtime outage.
  • add merge-risk: 🚨 compatibility: An existing autoreply invocation now stops when send-as discovery fails, and empty Tasks status is rejected; these deliberate behavior changes are explicitly accepted by the maintainer-authored PR and documented.
  • 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.

Label justifications:

  • P2: The PR repairs concrete command-level correctness defects across bounded workflows without evidence of an urgent runtime outage.
  • merge-risk: 🚨 compatibility: An existing autoreply invocation now stops when send-as discovery fails, and empty Tasks status is rejected; these deliberate behavior changes are explicitly accepted by the maintainer-authored PR and documented.
  • 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.

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.

Reviewed November 13, 2026, 9:55 PM ET / November 14, 2026, 02:55 UTC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. P2 Normal priority bug or improvement with limited blast radius. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant