Skip to content

feat: multi-tenant managed MVP foundation#27

Open
dianfishekqi wants to merge 3 commits into
mainfrom
feature/managed-mvp
Open

feat: multi-tenant managed MVP foundation#27
dianfishekqi wants to merge 3 commits into
mainfrom
feature/managed-mvp

Conversation

@dianfishekqi

Copy link
Copy Markdown
Contributor

Summary

  • Introduce workspace-scoped multi-tenancy (D1 migration, branded WorkspaceId, scoped store/KV/DO keys, queue envelope, and isolation ESLint rules)
  • Add official GitHub App install/repo lifecycle, OAuth control plane APIs, and shadow-first setup/dashboard site routes
  • Add public-safety audit log, tenant/global safety ceilings, workspace offboarding, and defer managed Slack until tenant-safe OAuth

Test plan

  • pnpm --filter @aipm/worker test (54 tests)
  • Configure managed env: PUBLIC_BASE_URL, SITE_ORIGIN, GITHUB_OAUTH_CLIENT_SECRET, GITHUB_APP_SLUG, NEXT_PUBLIC_API_BASE
  • Staging smoke: GitHub login → App install → enable repos → shadow preview
  • Confirm suspended/deleted installations stop processing
  • Confirm two workspaces with identical repo/thread IDs stay isolated

Add workspace-scoped persistence, GitHub App lifecycle, OAuth control plane,
isolation lint rules, and shadow-first public-safety controls so ai/pm can run
as a shared managed service with Slack deferred until tenant-safe OAuth.
Keep implementation details private and remove unreferenced wrappers so the repository's Knip gate reflects only shipped entry points.
Replace client-readable base64url OAuth state with a random token backed by
DELIVERY_DEDUPE so returnTo lives server-side and can only be consumed once.
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