Skip to content

[release] v0.104.0#4717

Merged
junaway merged 89 commits into
mainfrom
release/v0.104.0
Jun 18, 2026
Merged

[release] v0.104.0#4717
junaway merged 89 commits into
mainfrom
release/v0.104.0

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

New version v0.104.0 in

  • web
    • web/oss
    • web/ee
  • services
  • api
  • sdks
    • sdks/python
  • clients
    • clients/python
    • clients/typescript
  • kubernetes
    • kubernetes/helm

jp-agenta and others added 30 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.
is_auth_info_blocked() early-returned False outside EE, so the four
AGENTA_ACCESS_* env vars were parsed but never enforced in OSS. Deleting
the gate activates the shared blocklist/allowlist logic in both editions.
is_auth_info_blocked no longer reads is_ee, so patching it raised
AttributeError; the tests now exercise the path both editions share.
Moves OrganizationMemberDB/WorkspaceMemberDB/ProjectMemberDB from EE to the
shared OSS models (EE re-exports), creates the three tables in the OSS chain
with the exact EE shapes, backfills membership rows from owners and used
invitations, and aligns api_keys/projects with the shared model in both
chains. get_user_organizations now uses the membership join in both editions.
…atabases

Fresh replays seed a default project (911e6034d05e) before any organization
can exist, so the parity migrations' NULL-scope guard killed the chain on
new deployments. Delete NULL-scope projects when the database has no users
(the fresh-replay signature); real deployments keep failing loudly.

The OSS org backfill now prefers the legacy singleton (slug oss-default,
NULLS LAST so unslugged orgs sort after) before falling back to the oldest
org, making adoption deterministic with 0, 1, or N orgs and NULL or set
slugs.
Lifecycle actor columns carry no FKs by convention (settled in the phase-2
review). The parity direction reverses for this column: instead of EE gaining
the OSS FK, OSS drops its legacy FK in the cleanup migration. Only the
nullable-ification stays here. Editing the unshipped migration avoids
shipping an FK that the next PR would immediately drop.
…the chain

The v0.103.5 merge dropped b3c4d5e6f7a9 (repair_workflow_revision_versions),
the head of the v0.103.5 core chain, and re-rooted the membership/parity
migrations onto its parent a2b3c4d5e6f8. Any database that ran v0.103.5 is
stamped at b3c4d5e6f7a9, so upgrading it into the stack failed with
'Can't locate revision b3c4d5e6f7a9'. Restore the migration (OSS + EE) and its
shared data_migration verbatim, and re-root 0a1b2c3d4e5f / 2c3d4e5f6a7b onto
b3c4d5e6f7a9 so the chain is a2b3c4d5e6f8 -> b3c4d5e6f7a9 -> membership.
The 911e6034d05e boot seed creates an empty default project before any org
exists. On a populated DB the app already made a real default project per
workspace at signup, so adopting the seed left two is_default projects in one
workspace and the members view (which reads the default project) showed only
the seed's lone member. Drop the unscoped empty seed when a scoped default
already exists; the org keeps exactly one default.
Default workspace resolution becomes membership-based in both editions
(get_default_workspace_id moves OSS-ward; the OSS oldest-workspace fallback
and get_oss_organization are gone). Organization and workspace listings are
scoped to the requesting user's memberships. The admin singleton org/workspace
delete guards and the admin_create_organization ON CONFLICT branch are
removed. Web: org switcher, New Organization, and owner submenu are enabled
in OSS.
…d-trip

The workspace-resolution unit tests move to the OSS suite (the function moved
OSS-ward; patching db_manager_ee's engine no longer reaches it). The admin
org create/delete round-trip returns to the OSS acceptance suite now that the
singleton slug-collapse and delete guard are gone.
OSS no longer needs the owner-signup + invite + re-login dance: any user can
sign up directly and gets their own organization, same as EE. global-setup
drops the license fork and inviteOssUser; AGENTA_TEST_OSS_OWNER_EMAIL stays
as an optional fixed-account login for persistent CI deployments.
Moves the org-creation core (org + owner membership + default workspace/
project + seeded defaults) into shared OSS code (oss commoners + db_manager);
EE commoners slims to subscription/entitlement wrappers over it. OSS signup
converges on the EE flow: personal org per allowed user, no first-user
bootstrap, no invite-only gate. Mounts create/update/delete/transfer
organization endpoints in OSS, lifts the admin-API multi-org block, and
writes membership rows on invitation accept.
The api-key auth path sets request.state.user_id to the user's DB id
(api_key.created_by_id), but get_user only matched UserDB.id when is_ee().
In OSS the new user-facing POST /organizations/ resolved the api-key user
via get_user and 404'd. Apply the id fallback in both editions, guarded so
a non-UUID SuperTokens uid still matches on uid only.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The data migration imported live ORM models, so a later model change could
break replaying revision 1b2c3d4e5f6a on a fresh or delayed upgrade. Use
local sa.table()/sa.column() definitions pinned to the schema at this
revision instead. Backfill logic is unchanged.
Adds acceptance tests for the OSS create/rename/transfer/delete organization
endpoints and unit tests for can_create_organization. Lifts the leftover
is_ee gates on the simple membership-create endpoints — they wrap the graph
path, which already creates memberships in both editions.
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'.
Rewrites the restrict-organization-creation guide for both editions around
the canonical AGENTA_ACCESS_* vars, adds a migration page for OSS operators
(open-signup posture flip, membership backfill, legacy-table drop), updates
quick-start/upgrading/configuration/dynamic-access-controls/opensource/
organizations pages, and documents the GitButler workflow in AGENTS.md.
Record what bit us during the v0.103.5 propagation: series need linear history
(merge-connected stacks collapse on unapply/apply), 'but pull' rebases on main
not the branch's own upstream, stage-then-commit --only to target a mid-stack
branch, and 'but oplog restore' to recover a collapsed stack.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Covers the in-place edition switch for both Docker Compose and Kubernetes:
stop the stack, point EE at the existing agenta_oss_* databases (via
POSTGRES_DB_PREFIX or explicit POSTGRES_URI_*), reuse the same env file so
the Compose project name and volume are kept, then start EE. The EE migration
creates the EE-only tables and backfills on first run.
Drops the 20 dead pre-project tables (apps/variants/bases, deployments,
docker_images, templates, old environments, old testsets, old auto/human
evaluations, ids_mapping) in both chains, deletes the 15 dead model classes,
the unimported models/db/models.py shim and models/converters.py, and the
dead create_deployment in db_manager_ee. The drop is the schema-parity fix
for the legacy organization_id/workspace_id columns EE carried on these
tables. deprecated_models scaffolding stays (historical migrations import it).
Alembic loads every version script at startup, and several historical
migrations still imported the model classes deleted with the legacy table
drop (create_free_plans imported AppDB, the evaluators/environments/
applications_workflow/projects data migrations imported the others). This
broke the migration runner on boot.

Freeze the final pre-drop shapes of the nine queried tables in
deprecated_models.py on a dedicated DroppedBase (a separate base so
extend_existing does not merge columns into the older partial shapes) and
point the migrations at them. Verified all 175 version scripts across both
chains now import cleanly.
The frozen classes keep their ForeignKey declarations, but projects/users/
folders are not in DroppedBase's metadata, so the ORM could not resolve FK
targets when a data migration flushes an insert (55bdd2e9a465 adds a testset
row). Stub tables with just the id column satisfy resolution; selects never
needed it, which is why the import sweep passed.
junaway and others added 2 commits June 17, 2026 11:08
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
[fix] Clean up `workflow` `uri`<>`type` mapping
…OSTGRES_PORT

POSTGRES_PORT only remaps the host-published port (compose
"${POSTGRES_PORT:-5432}:5432"); the bundled Postgres always listens on 5432
inside the Docker network. Deriving the in-network URIs from POSTGRES_PORT
made every service dial postgres:<host-port> and fail on a fresh start
whenever POSTGRES_PORT was customized. Use 5432 for the derived URIs and
drop the now-unused port attribute; external databases on non-default ports
still set explicit POSTGRES_URI_*.
@junaway junaway merged commit a97e608 into main Jun 18, 2026
29 of 32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants