Skip to content

feat(shopify): add app installation and privacy request handling - #8841

Open
waleedlatif1 wants to merge 4 commits into
stagingfrom
codex/shopify-app-store-readiness
Open

waleedlatif1 wants to merge 4 commits into
stagingfrom
codex/shopify-app-store-readiness

Conversation

@waleedlatif1

@waleedlatif1 waleedlatif1 commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Complete Shopify-initiated OAuth before Sim login, then attach the browser-bound installation to an authorized workspace while preserving credential identities and rotating tokens.
  • Record signed mandatory privacy webhooks with atomic outbox delivery, ownership history, deadline escalation, and administrator review with encrypted evidence and audit history.
  • Add three tables and bounded cleanup for expired installation handoffs. Existing service-account and manual OAuth paths remain supported.
  • Preserve independent privacy obligations, atomically save credential ownership history, restore shop-scoped refresh, and offer only writable workspace destinations.

Privacy fulfillment remains operator-driven: receiving a webhook does not export or erase customer data. The runbook documents deployment, subscription registration, ownership backfill, and retention prerequisites.

Type of Change

  • Bug fix
  • New feature

Testing

  • 70 real PostgreSQL/Redis/HTTP integration cases passed using the migration provisioning path, including 44 OAuth and 26 privacy cases.
  • Demonstrated failures before fixes for stale installation tokens, refresh recovery, ownership-history persistence across pages and provider isolation, account recovery across workspaces, duplicate launch parameters and delivery obligations, expired bans, and maintenance failure isolation; all pass after the fixes.
  • 53 focused review-fix tests, 58 audits, 26 workspace type checks, lint, migration safety and schema synchronization, docs manifest, block registry, and pinned actionlint passed.
  • Full repository tests passed on the final branch: 409 script tests and 39,209 workspace tests.
  • Revalidated 28 Shopify operations against the official API schema, including 349 request scenarios, output metadata, and block input wiring.
  • Live installation and workflow execution still require verification after deployment.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Oct 9, 2026 7:21am UTC

Request Review

@cubic-dev-ai cubic-dev-ai 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.

All reported issues were addressed across 44 files

Turn on auto-fix | Re-trigger cubic

Comment thread apps/sim/lib/shopify/privacy/requests.ts Outdated
Comment thread apps/sim/lib/core/outbox/processor.ts Outdated
Comment thread apps/sim/lib/shopify/privacy/application/authorization.ts Outdated
Comment thread apps/sim/lib/credentials/application/complete-shopify-install.ts Outdated
Comment thread packages/db/migrations/0404_early_harpoon.sql Outdated
@greptile-apps

greptile-apps Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Critical impact] The PR appears safe to merge; no new blocking issue was found.

Summary

Adds Shopify installation before Sim login, browser-bound workspace connection, and signed privacy requests with administrator review.

  • The latest changes restore connector schedules when a claim creates another credential for an existing account.
  • Ownership-history capture now commits all pages together or rolls them all back.
  • The three earlier review threads are fixed: the picker offers writable workspaces, credential saves retain ownership history, and the deadline index matches its query.
  • No new actionable issues were found. Privacy exports and erasure remain operator-driven.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Signed Shopify launch] --> B[Shopify OAuth]
  B --> C[Browser-bound handoff]
  C --> D[Sim login]
  D --> E[Authorized workspace claim]
  E --> F[Save credential and ownership history]
  F --> G[Restore affected connector schedules]
  H[Signed privacy webhook] --> I[Save encrypted request and outbox event together]
  I --> J[Administrator review]
  J --> K[Record fulfillment evidence]
  K --> L[Complete request]
Loading

Reviews (3) · Last reviewed commit: "fix(shopify): recover accounts and captu..." · Reviewed by Greptile

Comment thread apps/sim/app/oauth/shopify/connect/connection-form.tsx
Comment thread apps/sim/lib/oauth/shopify.ts Outdated
Comment thread apps/sim/lib/shopify/privacy/outbox.ts
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai 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.

All reported issues were addressed across 48 files

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

Comment thread apps/sim/lib/oauth/shopify.integration.ts Outdated
Comment thread apps/sim/lib/credentials/application/complete-shopify-install.ts Outdated
Comment thread apps/sim/lib/oauth/shopify.ts
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai 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.

All reported issues were addressed across 48 files

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

Comment thread apps/sim/lib/shopify/privacy/installation-scopes.ts

This branch was previously deployed

1 inactive deployment
Preview — 27d9bc35 Deployed Oct 9, 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.

1 participant