Skip to content

fix(google): centralize Workspace support on Cloud Connect - #4627

Merged
reachjalil merged 7 commits into
devfrom
fix/google-replies-and-upload-discovery
Sep 10, 2026
Merged

reachjalil merged 7 commits into
devfrom
fix/google-replies-and-upload-discovery

Conversation

@reachjalil

@reachjalil reachjalil commented Sep 8, 2026 •

Copy link
Copy Markdown
Member

Summary

Make OpenWork Cloud Connect the single supported Google Workspace integration, while retaining authorized workspace-file uploads through the Cloud backend.

  • Remove the local Google API implementation, local OAuth flow, action registration, and credential-dependent exceptions. Retired action IDs always refuse with Cloud guidance; saved local configuration cannot re-enable them.
  • Keep the existing Drive upload and Gmail attachment bridge. Files stay outside model context and travel through the member's Cloud authorization, never local Google tokens.
  • Centralize Google guidance and point upload discovery to the host bridge when available instead of treating an empty Cloud search as unsupported functionality.
  • Stop seeding the obsolete local Google extension; render historical records as inert Cloud-only setup guidance without modifying stored records or grants.
  • Remove obsolete local setup diagnostics, documentation, and runtime flags.
  • Render quoted Gmail history as escaped structured HTML with a plaintext alternative, including HTML-only originals. Report the thread ID actually returned by Gmail.

Latest enhancement reconciliation

Rebased onto canonical dev at fc8c9852bb3f21691597a470e6692d097b74c094. The PR deliberately leaves all .devcontainer/** files unchanged; its remaining Google implementation changes are preserved.

Boundaries and compatibility

  • No credential deletion, migration, Google revocation, or change to existing Cloud connections. Regression tests assert seeded legacy vault files remain byte-identical.
  • Unrelated connectors remain registered and unchanged.
  • The file bridge retains its 4 MiB limit and authorized-root checks. It uses the member's default Google connection and cannot select another named connection; discovery explicitly warns against silently substituting another account.
  • Local-only Google Chat and Drive content-update actions are retired, not recreated as a second provider stack. URL-based attachments and automatic message-target/reply-all resolution from the old extension are not introduced into the Cloud contract.

Verification — Incomplete

Current head: 76d543c363f8313ae9d316ae1c69799a92e5881f.

Review fixes

  • Both HTML negative assertions are case-insensitive and now exercise uppercase/mixed-case SCRIPT/IMG fixtures.
  • JSON and multipart draft routes normalize headers instead of newly rejecting older desktop input. Tests cover successful normalized drafts, exact header counts, no injection, unchanged body/attachments, and unchanged length limits.
  • Regenerated the SDK from current schemas. pnpm sdk:check passes locally and in CI.
  • All three original review threads are addressed and resolved. The subsequent Calendar compatibility thread is also addressed: the optional refinement is removed and regression coverage asserts unchanged range forwarding/provider errors.

Passed

Check Result
pnpm evals:pr specs/desktop-calendar-read.test.ts 2 passed, 0 failed, 0 skipped; cold-start host-boundary journey
Server retirement, upload, diagnostics, and guidance modules 144 passed
Gmail MIME and Google extraction modules 45 passed
Cloud Google route suite 56 passed
Marketplace seeding / full plugin bundle modules 1 / 8 passed
App diagnostics, taxonomy, connection UI/lifecycle, and provider icons 52 passed before review-only native changes; unchanged by those edits

The two host-boundary journey tests reran on the current head. The .devcontainer exclusion also passed shell syntax validation and a zero-diff comparison against current dev. The 45 MIME/extraction tests, 65 DB-backed/bundle tests, and SDK check passed at 7f0d56590bd1c0f44a2ed8acac27921330993a9f; the 144 server tests and server typecheck passed at ffd3520b7c37d3b69cc3c968cd89abb549f3c97e. These earlier results are retained as historical validation, not new-head runs. CI validates the current head separately.

Journey placement: placement: local (PR lane resolved by testkit).

The journey checks 24 retired/lifecycle/unknown actions with Connect absent/off/on, no direct Google access, unchanged legacy vault bytes, unrelated OpenAI availability, and both upload actions reaching a Cloud witness with exact file bytes and synthetic member authorization. It does not validate the Gmail UI.

DB-backed suites used a fresh exclusively owned current-schema local test database, synthetic settings, and loopback-only provider traffic. The final review-fix run recorded 173 loopback fetches and zero external attempts. The owned database was removed and its absence verified; existing databases and volumes were not migrated or reset.

Server typecheck, outbound-access validation, SDK freshness/typecheck, and diff checks passed.

Remaining proof

  • The updated library-add-connector-discovery UI journey has not run; it retains the old enabled flag to verify that local Google setup cannot return. Preflight selected Daytona; runtime resources were not provisioned for this run.
  • Cloud quote construction has module and route coverage but no complete testkit UI/provider journey. No real Gmail draft, Drive upload, or Google connection mutation was performed.
  • Exploratory repository channel/boundary ratchets previously reported violations outside the changed journeys; no clean-control classification or unrelated repairs are claimed.

The host-boundary assertion evidence is attached separately. Passing those two tests does not make the unrun journeys passed.

Reproduction

pnpm --dir apps/server test src/extensions-connect-gating.test.ts src/extensions/cloud-uploads.test.ts src/connect-state.test.ts src/agent-context-diagnostics.test.ts src/opencode-plugins/openwork-extensions-preview-connect-steering.test.ts src/opencode-plugins/openwork-extensions-preview.test.ts src/opencode-plugins/system-prompt-composition.test.ts src/opencode-plugins/agent-instruction-compose.test.ts
pnpm --filter @openwork-ee/den-api exec bun --conditions=development test test/gmail-draft.test.ts test/google-workspace-api.test.ts
pnpm --filter @openwork-ee/den-api exec bun --conditions=development test test/google-workspace-capabilities.test.ts
pnpm --filter @openwork-ee/den-api exec bun --conditions=development test test/plugin-system-marketplace-seeding-db.test.ts
pnpm --filter @openwork-ee/den-api exec bun --conditions=development test test/plugin-system-create-bundle.test.ts
pnpm --filter @openwork/app exec bun test --isolate tests/agent-context-diagnostics-report.test.tsx tests/extension-taxonomy.test.ts tests/library-connector-cues.test.ts tests/connect-view.test.ts tests/connector-tool-identity.test.ts tests/connector-tool-call-ui.test.tsx src/react-app/domains/connections/native-provider-connections.test.ts src/react-app/design-system/provider-icon.test.tsx
pnpm --filter openwork-server typecheck
pnpm sdk:check
pnpm check:outbound-access
pnpm evals:pr specs/desktop-calendar-read.test.ts

Run DB-backed tests only against an isolated current-schema test database with synthetic credentials and loopback provider endpoints. Initialize an exclusively owned empty database using the repository's db:bootstrap path; do not migrate an existing database just to run these tests.

@vercel

vercel Bot commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
openwork-app Ready Ready Preview Sep 10, 2026 12:37am UTC
openwork-den Ready Ready Preview Sep 10, 2026 12:37am UTC
openwork-diagnostics Ready Ready Preview Sep 10, 2026 12:37am UTC
openwork-landing Ready Ready Preview, v0 Sep 10, 2026 12:37am UTC

@mintlify

mintlify Bot commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
differentai 🟢 Ready View Preview Sep 8, 2026, 6:42 PM

💡 Tip: Enable Automations to automatically generate PRs for you.

@reachjalil
reachjalil force-pushed the fix/google-replies-and-upload-discovery branch from 09f3b13 to 7f0d565 Compare September 8, 2026 19:40
@reachjalil

reachjalil commented Sep 8, 2026 •

Copy link
Copy Markdown
Member Author

Passed · 3/3 tests · 4/4 assertions · 2 images

Commit 1a7801ddb299510737ce6fa38ff1d4c42fcc52b5 · selected evidence

Open review report

@reachjalil

Copy link
Copy Markdown
Member Author

Test evidence — desktop-retires-every-local-google-action-without-using-or-changing-legacy-oauth — ✅ passed

SHA 76d543c · engine v1

✅ passed · 1 expectations passed · 0 failed · 0 pending

screenshots not attached (gh < 2.99; run brew upgrade gh)

verdict passed · 0 user observations · 0 probes · steps 0/0

ℹ️ ASSERTION — 1. Legacy Google cannot be discovered, executed, or reused for uploads

With Connect absent, off, and on, all 24 retired/unknown actions refuse with use_openwork_cloud, including status and lifecycle/config calls. Both Cloud uploads require member auth; OpenAI status still executes. Zero external requests or uploads; all three seeded OAuth files remain byte-identical.

  • ✅ PASS Legacy Google cannot be discovered, executed, or reused for uploads — With Connect absent, off, and on, all 24 retired/unknown actions refuse with use_openwork_cloud, including status and lifecycle/config calls. Both Cloud uploads require member auth; OpenAI status still executes. Zero external requests or uploads; all three seeded OAuth files remain byte-identical.

Test run created 2026-09-08T19:57:54.031Z · Source: evals/results/test-runs/2026-09-08T19-57-54-031Z-desktop-retires-every-local-google-action-without-using-or-changing-legacy-oauth/test-run.json · Repro: pnpm --dir evals artifacts:publish -- --pr 4627 --test-run 2026-09-08T19-57-54-031Z-desktop-retires-every-local-google-action-without-using-or-changing-legacy-oauth

@github-actions

Copy link
Copy Markdown
Contributor

Warden review summary — Clear

Native findings: 0. Blocking policy matches before consolidation: 0. Full finding text remains in Warden's native checks and review threads. This comment retains only native IDs, severity, skill attribution, and safe locations. Analysis run

Reported trigger coverage (not proof of complete repository or context coverage): diff-security-review (474446 ms), confidentiality-review (116972 ms), spec-provenance-review (194673 ms), desktop-den-sync-review (337764 ms).

Blockers

  • None.

Advisories

  • None.

Needs recheck

  • None.

Observed review-thread metrics

  • Unique observed run attempts in retained window: 1
  • Distinct heads in retained window: 1
  • Current unresolved Warden threads: 0 of 3 observed
  • Observed resolved/unresolved transitions in retained snapshots: 0 / 0
  • First observed resolved/unresolved (state at first collection, not event time): 3 / 0
  • Precision: unavailable (no adjudications; no TP/FP values are inferred)
  • Observation window: 1/20 run attempts retained; truncated: false
  • Transition snapshot: 3/3 current attributed threads retained (limit 500); truncated: false

Thread states are read-only collection snapshots. These metrics are neither lifetime totals nor exact resolution times, and this summary is not clearance authority.

@diff-warden diff-warden Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (1a7801ddb299510737ce6fa38ff1d4c42fcc52b5). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run

@reachjalil
reachjalil merged commit c744e2d into dev Sep 10, 2026
37 checks passed

This branch was successfully deployed

5 active deployments
Preview – openwork-den — 1a7801dd Deployed Sep 10, 2026 by vercel[bot]
staging - packages/docs — 1a7801dd Deployed Sep 10, 2026 by mintlify[bot]
Preview – openwork-landing — 1a7801dd Deployed Sep 10, 2026 by vercel[bot]
Preview – openwork-app — 1a7801dd Deployed Sep 10, 2026 by vercel[bot]
Preview – openwork-diagnostics — 1a7801dd Deployed Sep 10, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants