Skip to content

feat(projects): add project identity and lifecycle foundation - #8580

Draft
mzxchandra wants to merge 9 commits into
stagingfrom
feat/project-entity-foundation
Draft

mzxchandra wants to merge 9 commits into
stagingfrom
feat/project-entity-foundation

Conversation

@mzxchandra

@mzxchandra mzxchandra commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add Project identity and environment membership, session APIs for create/list/detail/lookup/rename/archive, and shared authorization operations.
  • Create a Project and its named initial environment, admin permissions, and starter workflow in one transaction. Reuse workspace eligibility, billing, and permission-group rules; preserve existing workspace creation callers.
  • Guard workflow restore with a transactional workspace share lock so it cannot reactivate a workflow during Project/workspace archive. This protection ships before PR2 and does not serialize writes across a Project.
  • Keep Projects consistent through workspace creation, forks, disconnects, archive, organization transfers, and account deletion. Add permission-group restrictions for Project Issues when a teammate has partial environment access.
  • Add the additive SQL schema migration 0394_project_foundation, after staging’s fork-sync migration 0393. The SQL data backfill and database enforcement ship together in stacked PR feat(projects): backfill and enforce membership in SQL #8590 after this compatible release is fully deployed.

New workspace creation assigns a Project automatically; there is no writer feature flag or separate backfill CLI. Existing workspace lifecycle code tolerates legacy environments without membership and maintains assigned Projects. Shared per-environment advisory locks coordinate those decisions with PR2's SQL backfill without blocking unrelated environments. Project APIs remain unavailable until PROJECT_API_ENABLED is enabled after backfill and enforcement.

Deploy this release and drain all pre-foundation servers and relevant workers before running PR2's migration. Project navigation and Issues CRUD remain separate work.

Creation usage and examples: apps/sim/lib/projects/README.md. The guide distinguishes new Project onboarding from existing workspace creation, including required names, explicit scope, and response shapes.

Follow-up

  • Add Project-scoped files in a separate PR: nullable projectId ownership on the existing file model, valid-scope constraints, authorization, version history/collaboration, lifecycle handling, and Mothership tools/VFS support. Keep environment files restricted unless explicitly published to the Project. A designated Project brief can reference a stable document ID.
  • Omit a separate Project description field. Project names provide identification; Project-owned files will carry shared purpose, goals, and operating guidance.

Type of Change

  • New feature

Testing

  • Fresh hosted test/build validation is running at 552ce688c3. The preceding staging-merge head passed all five jobs. All 25 PR1 foundation integration checks pass with the restore race fix; the new race regression fails without its guard.
  • After merging staging, all 45 Project and fork-sync integration checks passed against disposable PostgreSQL/Redis using the full migration chain. Search fixture checks also passed before the merge. Both membership-locking regressions fail when the shared backfill guard is removed.
  • Application/database type-checks, lint, all 58 repository audits, and migration safety passed.
  • Browser rehearsal and hosted migration execution have not been performed.

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 2, 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 3, 2026 1:22am UTC

Request Review

This branch was previously deployed

1 inactive deployment
Preview — 552ce688 Deployed Oct 3, 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