Skip to content

docs(designs): Add OSS/EE convergence assessment and schema parity plan#4669

Open
jp-agenta wants to merge 9 commits into
mainfrom
docs/oss-ee-convergence-design
Open

docs(designs): Add OSS/EE convergence assessment and schema parity plan#4669
jp-agenta wants to merge 9 commits into
mainfrom
docs/oss-ee-convergence-design

Conversation

@jp-agenta

@jp-agenta jp-agenta commented Jun 12, 2026

Copy link
Copy Markdown
Member

Context

OSS today is hard single-org and ignores the four AGENTA_ACCESS_* env vars it already parses. We want OSS to support multiple organizations with the same access-control semantics as EE (goal A), and the OSS schema to become a strict subset of the EE schema (goal B). Before changing code, this assessment maps the full blast radius.

Changes

Design docs only, no code:

  • assessment-a-oss-multi-org.md: the assessment. Current single-org mechanisms, the five changes needed, a file-level inventory (EE to OSS moves, OSS and EE modifications, web gate relaxations), the two-step schema parity plan (drift fixes on kept tables, then dropping 20 dead legacy tables), documentation impact, and sequencing.
  • oss_core.txt, ee_core.txt, oss_tracing.txt, ee_tracing.txt: live schema dumps of both editions' databases, with diff_core.txt and diff_tracing.txt. The tracing delta is zero; the core delta backs the parity plan.
  • dump_pg_schema.sh: the script that produced the dumps.
  • pr-plan.md: execution plan. The work ships as this PR plus five implementation PRs, one per sequencing step.

Notes

  • The implementation PRs reference this folder; review the assessment first.

🤖 Generated with Claude Code

@dosubot dosubot Bot added the size:XXL This PR changes 1000+ lines, ignoring generated files. label Jun 12, 2026
@vercel

vercel Bot commented Jun 12, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
agenta-documentation Ready Ready Preview, Comment Jun 14, 2026 6:33pm

Request Review

@dosubot dosubot Bot added the documentation Improvements or additions to documentation label Jun 12, 2026
@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds a multi-org convergence assessment, deterministic Postgres schema-dump script, EE/OSS schema dumps and diffs, and a six-PR execution plan to migrate membership models, add OSS org-creation/signup parity, enforce AGENTA_ACCESS_* in OSS, and achieve schema parity.

Changes

OSS/EE Convergence: Multi-Org & Schema Parity Design

Layer / File(s) Summary
Assessment and convergence design
docs/designs/oss-ee-convergence/assessment-a-oss-multi-org.md
Defines current OSS single-org constraints, enumerates EE-gated enforcement gaps for AGENTA_ACCESS_*, and prescribes five workstreams: membership table migration/backfill, OSS org-creation endpoint parity, signup flow convergence, enforcing access env vars in OSS, and singleton/front-end gate cleanup.
PR execution topology and checklist
docs/designs/oss-ee-convergence/pr-plan.md
Six-PR GitButler topology and per-PR worklogs (PR0–PR5), lane/branch sequencing and merge-order constraints, final-phase docs/checklist, and a test-phase itemization for post-merge verification.
Schema dump utility script
docs/designs/oss-ee-convergence/dump_pg_schema.sh
Bash CLI producing deterministic, diff-friendly Postgres schema dumps with connection options, optional exact per-table row counts, and labeled sections for server, extensions, enums, sequences, columns/order, constraints, indexes, triggers, views, and Alembic version.
Core database schema evolution
docs/designs/oss-ee-convergence/diff_core.txt, docs/designs/oss-ee-convergence/oss_core.txt
Schema diffs and full OSS core dump showing tenant-scoping columns (organization_id/workspace_id), new multi-tenant tables (memberships, domains, providers, subscriptions, meters, evaluations, environments, testsets, deployments), meters_type enum, NOT NULL api_keys changes, reordered COLUMN-ORDER, updated FK/PK/constraints, and added indexes.
Tracing database schema evolution
docs/designs/oss-ee-convergence/diff_tracing.txt, docs/designs/oss-ee-convergence/ee_tracing.txt, docs/designs/oss-ee-convergence/oss_tracing.txt
Tracing schema header rename and full schema dumps for EE and OSS tracing databases with alembic_version, events/spans tables, column ordering, PKs, and JSONB/GIN/FTS indexes.

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 60.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and concisely summarizes the main change: adding design documentation for OSS/EE convergence assessment and schema parity planning.
Description check ✅ Passed The description is clearly related to the changeset, explaining the context (OSS single-org limitations), the changes (design docs with schema dumps and execution plan), and the objectives (multi-org support with EE semantics and schema parity).
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/oss-ee-convergence-design

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@jp-agenta jp-agenta changed the title docs(designs): OSS/EE convergence assessment — multi-org OSS + schema parity docs(designs): Add OSS/EE convergence assessment and schema parity plan Jun 12, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 5


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 66ad328a-1574-45a9-9be8-8cf26723decd

📥 Commits

Reviewing files that changed from the base of the PR and between a2e9150 and 3c545d9.

📒 Files selected for processing (9)
  • docs/designs/oss-ee-convergence/assessment-a-oss-multi-org.md
  • docs/designs/oss-ee-convergence/diff_core.txt
  • docs/designs/oss-ee-convergence/diff_tracing.txt
  • docs/designs/oss-ee-convergence/dump_pg_schema.sh
  • docs/designs/oss-ee-convergence/ee_core.txt
  • docs/designs/oss-ee-convergence/ee_tracing.txt
  • docs/designs/oss-ee-convergence/oss_core.txt
  • docs/designs/oss-ee-convergence/oss_tracing.txt
  • docs/designs/oss-ee-convergence/pr-plan.md

Comment thread docs/designs/oss-ee-convergence/assessment-a-oss-multi-org.md
Comment thread docs/designs/oss-ee-convergence/assessment-a-oss-multi-org.md Outdated
Comment thread docs/designs/oss-ee-convergence/assessment-a-oss-multi-org.md
Comment thread docs/designs/oss-ee-convergence/diff_core.txt Outdated
Comment thread docs/designs/oss-ee-convergence/oss_core.txt Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: da0c7d2c-a16d-4b70-8519-bbfd3d16660d

📥 Commits

Reviewing files that changed from the base of the PR and between 3c545d9 and b58fc10.

📒 Files selected for processing (9)
  • docs/designs/oss-ee-convergence/assessment-a-oss-multi-org.md
  • docs/designs/oss-ee-convergence/diff_core.txt
  • docs/designs/oss-ee-convergence/diff_tracing.txt
  • docs/designs/oss-ee-convergence/dump_pg_schema.sh
  • docs/designs/oss-ee-convergence/ee_core.txt
  • docs/designs/oss-ee-convergence/ee_tracing.txt
  • docs/designs/oss-ee-convergence/oss_core.txt
  • docs/designs/oss-ee-convergence/oss_tracing.txt
  • docs/designs/oss-ee-convergence/pr-plan.md
✅ Files skipped from review due to trivial changes (5)
  • docs/designs/oss-ee-convergence/diff_tracing.txt
  • docs/designs/oss-ee-convergence/oss_tracing.txt
  • docs/designs/oss-ee-convergence/ee_tracing.txt
  • docs/designs/oss-ee-convergence/oss_core.txt
  • docs/designs/oss-ee-convergence/pr-plan.md
🚧 Files skipped from review as they are similar to previous changes (2)
  • docs/designs/oss-ee-convergence/dump_pg_schema.sh
  • docs/designs/oss-ee-convergence/diff_core.txt

Comment thread docs/designs/oss-ee-convergence/assessment-a-oss-multi-org.md

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

♻️ Duplicate comments (1)
docs/designs/oss-ee-convergence/assessment-a-oss-multi-org.md (1)

72-75: ⚠️ Potential issue | 🟠 Major | 🏗️ Heavy lift

Clarify the backfill mapping before freezing the plan.

Both spots still rely on an underspecified “backfill or delete” / “member of the oss-default org/workspace/project” rule. That can collapse scope and assign the wrong org/workspace membership when more than one candidate exists. Please pin a deterministic source-of-truth for each row before the migration sequence is finalized.

Also applies to: 275-301


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: d5632826-1536-4737-9bc4-99d020b71878

📥 Commits

Reviewing files that changed from the base of the PR and between b58fc10 and 5b43a1c.

📒 Files selected for processing (9)
  • docs/designs/oss-ee-convergence/assessment-a-oss-multi-org.md
  • docs/designs/oss-ee-convergence/diff_core.txt
  • docs/designs/oss-ee-convergence/diff_tracing.txt
  • docs/designs/oss-ee-convergence/dump_pg_schema.sh
  • docs/designs/oss-ee-convergence/ee_core.txt
  • docs/designs/oss-ee-convergence/ee_tracing.txt
  • docs/designs/oss-ee-convergence/oss_core.txt
  • docs/designs/oss-ee-convergence/oss_tracing.txt
  • docs/designs/oss-ee-convergence/pr-plan.md
✅ Files skipped from review due to trivial changes (4)
  • docs/designs/oss-ee-convergence/diff_tracing.txt
  • docs/designs/oss-ee-convergence/oss_core.txt
  • docs/designs/oss-ee-convergence/ee_tracing.txt
  • docs/designs/oss-ee-convergence/pr-plan.md
🚧 Files skipped from review as they are similar to previous changes (3)
  • docs/designs/oss-ee-convergence/oss_tracing.txt
  • docs/designs/oss-ee-convergence/dump_pg_schema.sh
  • docs/designs/oss-ee-convergence/diff_core.txt

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 4


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 28ddac35-a9f7-488d-aa9d-4fd7c7e0c956

📥 Commits

Reviewing files that changed from the base of the PR and between 5b43a1c and 6fafd77.

📒 Files selected for processing (9)
  • docs/designs/oss-ee-convergence/assessment-a-oss-multi-org.md
  • docs/designs/oss-ee-convergence/diff_core.txt
  • docs/designs/oss-ee-convergence/diff_tracing.txt
  • docs/designs/oss-ee-convergence/dump_pg_schema.sh
  • docs/designs/oss-ee-convergence/ee_core.txt
  • docs/designs/oss-ee-convergence/ee_tracing.txt
  • docs/designs/oss-ee-convergence/oss_core.txt
  • docs/designs/oss-ee-convergence/oss_tracing.txt
  • docs/designs/oss-ee-convergence/pr-plan.md
✅ Files skipped from review due to trivial changes (4)
  • docs/designs/oss-ee-convergence/diff_tracing.txt
  • docs/designs/oss-ee-convergence/oss_core.txt
  • docs/designs/oss-ee-convergence/oss_tracing.txt
  • docs/designs/oss-ee-convergence/pr-plan.md
🚧 Files skipped from review as they are similar to previous changes (2)
  • docs/designs/oss-ee-convergence/ee_tracing.txt
  • docs/designs/oss-ee-convergence/dump_pg_schema.sh

Comment thread docs/designs/oss-ee-convergence/assessment-a-oss-multi-org.md
Comment thread docs/designs/oss-ee-convergence/assessment-a-oss-multi-org.md
Comment thread docs/designs/oss-ee-convergence/assessment-a-oss-multi-org.md
Comment thread docs/designs/oss-ee-convergence/diff_core.txt Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

♻️ Duplicate comments (3)
docs/designs/oss-ee-convergence/assessment-a-oss-multi-org.md (3)

87-89: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Define a slug-collision retry rule before removing the singleton branch.

On Lines 87-89, “generate unique slugs” is still too vague for concurrent org creation. Please spell out the slug derivation and retry behavior so two creates can’t race into a duplicate-key failure.


297-301: ⚠️ Potential issue | 🟠 Major | 🏗️ Heavy lift

Spell out the EE backfill tie-breaker, not just “resolve via the project's members.”

On Lines 297-301, this still does not define how to choose a single org/workspace when multiple members qualify (or none do). Lock the exact selection rule before the NOT NULL/CASCADE migration, or the backfill can assign rows to the wrong tenant.


378-382: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Use the canonical allowlist name in the upgrade warning.

On Lines 378-382, ALLOWED_OWNER_EMAILS is still ambiguous; operators need the full AGENTA_ACCESS_ALLOWED_OWNER_EMAILS name (or an explicit legacy-alias list) to avoid misconfiguring the closed-signup path.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: be1f1353-9972-4ab7-8a58-380035216cb9

📥 Commits

Reviewing files that changed from the base of the PR and between 6fafd77 and 4791d6d.

📒 Files selected for processing (9)
  • docs/designs/oss-ee-convergence/assessment-a-oss-multi-org.md
  • docs/designs/oss-ee-convergence/diff_core.txt
  • docs/designs/oss-ee-convergence/diff_tracing.txt
  • docs/designs/oss-ee-convergence/dump_pg_schema.sh
  • docs/designs/oss-ee-convergence/ee_core.txt
  • docs/designs/oss-ee-convergence/ee_tracing.txt
  • docs/designs/oss-ee-convergence/oss_core.txt
  • docs/designs/oss-ee-convergence/oss_tracing.txt
  • docs/designs/oss-ee-convergence/pr-plan.md
✅ Files skipped from review due to trivial changes (5)
  • docs/designs/oss-ee-convergence/diff_tracing.txt
  • docs/designs/oss-ee-convergence/ee_tracing.txt
  • docs/designs/oss-ee-convergence/oss_tracing.txt
  • docs/designs/oss-ee-convergence/pr-plan.md
  • docs/designs/oss-ee-convergence/oss_core.txt
🚧 Files skipped from review as they are similar to previous changes (2)
  • docs/designs/oss-ee-convergence/dump_pg_schema.sh
  • docs/designs/oss-ee-convergence/diff_core.txt

jp-agenta and others added 8 commits June 14, 2026 19:05
… parity

Assessment for making OSS multi-organization with AGENTA_ACCESS_* enforcement,
plus the two-step schema parity plan (drift fixes on kept tables, legacy table
drop). Includes live schema dumps of both editions' core/tracing DBs, their
diffs, the dump script, and the PR execution plan.
…ble chain ids

Record the v0.103.5 propagation (b3c4d5e6f7a9 re-point, App-class collision in
_admin_detach_user_references, db_manager_ee import/symbol churn) and the
12-char park/oss/ee revision-id rename. Update checkpoint ids and the chain
layout diagram. Flag the committed schema dumps as stale (predate the
workflow_revisions repair).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Same scheme as core (no t-prefix); tracing has its own database so the version
tables (alembic_version_tracing_oss/_ee) and ids do not collide. tracing_ee is
root+proof only (no EE-only tracing tables to adopt on a switch). Update the
layout note and runner order.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…e core

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
dump_pg_schema.sh used ${vt^^} (bash 4+ uppercase expansion) which fails on
macOS system bash 3.2 with 'bad substitution'; replace with a portable tr.
Delete the committed schema dumps and diffs (oss/ee core+tracing, diff_*) —
they predate the v0.103.5 workflow_revisions repair and are regenerated from
replays, so the stale copies are misleading.
meters_type is an enum, not a table: call it five schema objects (one enum,
four tables). Specify how create_organization derives a unique slug (slugify
the name, numeric suffix on collision) instead of the vague 'generate unique
slugs'.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant