* feat: introduce User-backed workspace identities Replaces workspace core.Agent subjects with identities stored as Django Users, so permissions, execution and attribution use the same record. - User.objects and WorkspaceUser.objects are human-only; permission and identity code opts in through objects_and_identities. is_human and is_identity classify a user at runtime. - Login, tokens, seats, notification recipients, personal views and last-admin checks stay human-only. Roles, teams and field grants work for identities unchanged. - Agent applications run as an identity, never as a person. Every shared tool rechecks the identity's authority on each call, and MCP refuses a tool that skips that boundary. - Migrations add the profile metadata and index, remove the Agent model and delete or clear legacy Agent data: trash entries, role assignments, team memberships, integration authorizations and run-as bindings. - Rename the management API, UI, events and feature flag to identity. Squashed and rebased onto develop; the previous history is kept on backup/6556-before-develop-rebase. * refactor: remove generic subject options endpoint * refactor: simplify identity selection and Agent run-as options * feat: distinguish identity notification senders * fix: restrict identity bindings to identity managers * docs: record users and identities verification * fix: restore snapshots as the person restoring A restore checked the snapshot creator's permission and used the creator to decide whether an Agent keeps its identity binding. It now checks the person restoring, passed to the import as `restored_by`. `copied_by` stays unset on restore, so credential checks keyed on it behave as on develop. Restoring a snapshot whose creator was deleted works again. The copy rule for identity bindings covers Agent run-as only; a copied Local Baserow integration keeps its authorized subject. * fix: leave settings pages the user may not open A settings route without a permitted tab rendered an empty page, as the Identities page did with its feature flag off. It now opens the first page the user may see. * fix: renumber the legacy Agent cleanup migrations Develop added agent 0016 and integrations 0043, so the migrations that clear legacy Agent run-as bindings and integration authorizations move to agent 0017 and integrations 0044. * test(agent): run the trigger self-event test as an identity The test added on develop created a `core.Agent`, which this branch removes. It now uses an identity user as the Agent's run-as subject. * perf: load user types once per batched permission check * refactor: state the stored subjects in each subject type * fix: give every user a profile * fix: keep identity attribution on rows copied in their workspace * refactor: give people and identities their own subject type UserSubjectType stays the type both are registered and stored under. It forwards what differs to HumanSubjectType and IdentitySubjectType, so get_specific_type is the only place in subject code that inspects the user type. The registry returns the specific type on request and get_by_model keeps returning the stored type, which never reads the profile. An identity's membership is checked in one query instead of two. * fix: keep the roles of identities when a database is duplicated The role import read subjects through the model's default manager, which only returns people, so duplicating or restoring a database failed when an identity held a role on it. It now resolves the subject through the subject registry. A subject that no longer exists is skipped instead of failing the whole duplicate or restore. * refactor: look up a subject type from its content type in one place * fix: reload a cached token whose profile is incomplete A token cached by the previous release has a profile without the user type, which reads as not a person, so its requests were refused until the entry expired. The token cache now treats it as a miss, with the check the user cache already used. * refactor: check the user type once where the check was repeated The MCP endpoint loader, the personal view permission manager and the identity trash type each asked the same question several times. The rule that an identity is never selected by email moves from the team handler to the identity subject type. * refactor: leave trashed workspaces out of the identity membership manager WorkspaceUser.objects_and_identities was named after objects but also returned memberships of trashed workspaces, so callers filtered them by hand. It now follows the existing pair: it leaves trashed workspaces out, and objects_and_identities_and_trash includes them, as objects_and_trash does for people. * test: state the behaviour of every user type The table fails when a user type is added and says what has to be decided first. An unknown type is checked to be denied. * refactor: refuse to say whether a stored user subject is interactive The answer differs between a person and an identity, so reading it from the stored type would be wrong for one of them. It now raises and points to the specific type. * refactor: lock the person in membership writes instead of checking the type Leaving a workspace, removing a member and adding a user lock the user through the people manager, which refuses an identity or an unknown type in the same query. Nothing adds an identity through add_user_to_workspace, so its branch for identities goes. The last admin check compares the membership with the people who are admin, which needs no type check. * test: leave no rows behind in the legacy authorization migration test The test left an integration that pointed at a user that didn't exist and a workspace, in the database the migration tests share. Tests that ran after it then failed on the foreign key or on the workspace id. It now uses a real user and empties the two tables. * docs: describe the subject types and compare the Subject table alternative ADR 013 is shorter and states that people and identities each have a specific subject type under the stored auth.User type. It compares shared User storage with a Subject table that users and identities would both point to. * chore: run the legacy run-as cleanup after the agent actions migration Develop added agent migration 0017, so the cleanup becomes 0018 and depends on it. * test: leave no rows behind in the legacy agent migration tests Like the legacy authorization test, these left a workspace in the database the migration tests share, which a later test that creates workspaces with fixed ids collides with. * fix: write and read the workspace role of an identity in one place The role assignment API wrote the role of an identity through the membership update of people, which told every member of the workspace about it and stored Builder as MEMBER, while the identities API stored BUILDER and returned the stored value. Both now write through the identity handler, which stores the role like the role of a person, and the role is read with the resolver the workspace members use. * fix: take no row lock in the membership writes of a person Leaving a workspace locked the user before the membership while removing or updating a member locks the membership first, so the two could deadlock. The user type never changes and these operations refuse an identity, so the lock protected nothing: they now only check that the user is a person. Leaving no longer locks the admin memberships and removing a member no longer checks for the last admin, as before identities. * fix: find an identity by its name only in the subject options The search also matched the email and username, which for an identity hold an internal key, so searching a part of that key returned every identity. * chore: run the identity migrations after the new ones on develop Develop added core 0138, integrations 0044 and enterprise 0073, so the identity migrations become core 0139 and 0140, integrations 0045 and enterprise 0074 and depend on them. * fix: keep the identity of a copied integration only for identity managers A duplicated application or a restored snapshot kept the identity its Local Baserow integration acts as, without checking the person who made the copy. Restoring a snapshot could so bring back a binding an admin had removed. The copy now keeps the identity only when that person may bind identities, as the Agent application already did, and is otherwise authorized as that person. * docs: follow the renumbered migrations and the copy rule in the test plan The test plan named the identity migrations and their tests by their old numbers and still said a copied integration keeps its subject. * test(agent): run the row trigger tests as an identity The row trigger tests added on develop created a `core.Agent`, which this branch removes. They now use an identity user as the Agent's run-as subject, and the e2e fixture creates it through the identities endpoint.
42 KiB
Users and identities: verification and acceptance plan
This plan covers the User-backed identity foundation and terminology changes on
docs/agent-backing-users-adr. Starting revision: 0a8a5f1287.
Verification date: 9 November 2026. Full backend/frontend runs, focused checks and browser verification are complete.
No unresolved identity-feature defect was found after the revocation fix. Full-run
exceptions and remaining verification limits are explicitly recorded below. Comparison base:
d0571201ad16dc38d7d997eba335f17a906bc043. The source includes the revocation
fix and additional regressions made during this verification.
The purpose is to establish both sides of every boundary: a human still works, and an identity works only where nonhuman execution is supported. A passing identity creation screen alone does not establish that distinction.
Scope and terminology
- User means a human.
User.objectsselects humans. - Identity means a workspace-owned nonhuman record stored in Django's User
table.
User.objects_and_identitiesselects both. There is no separate class or type for an identity;is_identitytells the two kinds apart at runtime. - AnonymousUser is a separate caller accepted only by specified public paths.
Noneis not an authorization bypass. - Agent application is the AI application. Its lifecycle is separate from an identity's lifecycle. Existing application names remain Agent.
- Actor/Subject retain the broader permission meanings, including tokens and teams; this change does not redefine them as the User/Identity union.
The ADR describes the eventual design as well as this foundation. The following are explicitly not implemented by this branch and must not be marked passed:
| Future capability | Current expected behavior / acceptance boundary |
|---|---|
| Assign identities to collaborator fields or mention them | This foundation still rejects identity collaborator values. Existing human assignment/mention behavior must remain working. |
| Human/identity kind snapshots in every historical display after deletion | Retained User foreign keys and ordinary actor IDs/names are in scope. A distinct persisted kind/badge across every history is a later layer. |
| Bind an Agent application to its execution identity | Application configuration and identity management remain separate; direct shared-tool tests do not prove this future binding. |
| Authenticate machines with dedicated identity MCP/OAuth credentials | Current human credentials must reject identities. The machine-credential mechanism is a later layer. |
Convert legacy core.Agent records automatically |
Production has no legacy Agents. Disposable Agent rows are deleted without converting IDs or references; the empty table stays for one release for old processes. |
How to read results
PASS — browser means the actual Nuxt UI called the actual Django API against
isolated PostgreSQL; identity endpoint responses were not replaced with HTTP
fixtures. PASS — API means the real DRF endpoint and database were exercised.
PASS — domain means real handlers/actions/tools and stored results were exercised.
PASS — unit is a narrower component/helper check, possibly with mocks.
PENDING, FAIL, and DEFERRED are not passes. An automated pass is separate
from your acceptance checkbox.
The November 6 review is historical evidence. Fresh commands, outcomes, node IDs,
logs, screenshots and browser traces for this pass are recorded under
/private/tmp/identity-verification-20261109/. The final evidence index below will
link each group to concrete tests. Totals from overlapping test runs must not be
added together.
Test population
Use two separate workspaces, A and B, with ordinary tables and rows. In A prepare an admin, a second human, an identity with schema-edit permissions, a read-only identity and a no-access identity. B has its own admin, identity and data. With RBAC enabled also prepare a team and scoped database/table grants. Keep one private personal view, one collaborative view, a public form, a template app, a Local Baserow integration, and an automation with a configured row mutation. Automation configuration tests do not imply a live automation/provider execution.
Exercise these actor states where the operation accepts that actor:
| Caller | Allowed control | Denied / changed-state cases |
|---|---|---|
| Human admin/member | Normal login, reads and permitted writes | Other workspace, lower role, inactive, pending deletion, revoked permission |
| Identity | Permitted internal/tool/integration work in its single workspace | Other workspace, no access, unavailable role, inactive, trashed, trashed workspace, removed membership, permanent deletion |
| AnonymousUser | Existing template reads and public form submissions | Identity management, private workspace data, ordinary mutations |
| Missing/unknown/stale metadata | No implicit human classification | Fail closed; a missing profile or unknown type must not become human |
| Cached caller or already-used ToolContext | Repeated allowed operations | Disable/trash/revoke through a separately loaded instance, then reuse the context; assert no forbidden read/write |
Run basic permission mode and enterprise RBAC mode. Human-only instance settings, notifications, member administration, seats and personal ownership are not made available merely because an identity is an instance of Django User.
Acceptance checklist
The checkbox is for reviewer sign-off. The execution column records fresh observed results. Evidence keys refer to the source map below; they are independent of your acceptance checkbox.
| Accept | ID | Scenario and required observable result | Execution |
|---|---|---|---|
| [ ] | TYPE-01 | Concrete User/Identity annotations cover only the 58 tool-reachable parameters plus ToolContext; nine read/form signatures retain explicit AnonymousUser. Tool schemas still generate correctly. | PASS — source inventory + tool/MCP suites; execution/annotation-inventory.md; no nominal type-enforcement claim |
| [ ] | MODEL-01 | Human/inactive-human, active/trashed identity, missing profile and unknown type classify correctly. Default manager excludes identities; inclusive/base managers and foreign keys retain them. | PASS — domain; B-MODEL |
| [ ] | MODEL-02 | User creation creates a human profile; its transaction is code-inspected. Identity creation creates one User, Profile and workspace membership, with unusable password and no staff/superuser status. | PASS — domain + transaction inspection; B-MODEL |
| [ ] | AUTH-01 | Human password/JWT/session login still works; identity password/JWT attempts fail even with a fabricated usable password/token. | PASS — API/browser; B-AUTH, UI-01 |
| [ ] | AUTH-02 | Cached JWT/websocket authentication, current database tokens, MCP endpoint/OAuth and SSO paths keep the human-only boundary. No identity HTTP mutation succeeds with human credentials. | PASS — API/domain; B-AUTH, B-SSO (verified provider result boundary only) |
| [ ] | AUTH-03 | Missing, unknown and stale cached profile metadata fail closed; ordinary human controls remain usable. | PASS — domain/API; B-AUTH |
| [ ] | AUTH-04 | Anonymous and lower-role callers cannot manage identities or access another workspace's identities; denial leaves stored state unchanged. | PASS — API/browser; B-LIFE, UI-07 |
| [ ] | LIFE-01 | Create/list/search/edit/delete identities through UI and API; reload shows persisted state and correct identity avatar/name. | PASS — API/browser; B-LIFE, UI-01–09 |
| [ ] | LIFE-02 | Names at the 150-character boundary, duplicate names, pagination ties, page-size limits and sort/search preserve exact records. | PASS — API; B-LIFE |
| [ ] | LIFE-03 | Failed creation/update with invalid or foreign teams is atomic, including memberships; no partial identity or lost original team/name. | PASS — transactional API; B-TEAM |
| [ ] | LIFE-04 | Trash blocks execution and hides current choices while retaining IDs, membership, grants and historical foreign keys. Restore keeps the same ID and independent disabled state. | PASS — domain/browser; B-MODEL, B-TEAM, UI-08/14/15 |
| [ ] | LIFE-05 | Restore a workspace containing identities; human realtime recipients work and identity membership is preserved. Permanent identity/workspace deletion removes owned records and grants. | PASS — domain; B-MODEL, B-EVENT |
| [ ] | LIFE-06 | Enforce one workspace through supported membership APIs; serialize concurrent team replacement; standalone reassignment/removal is rejected. Corrupt extra memberships fail closed. Raw concurrent ORM membership insertion is not claimed. | PASS — domain; B-MEMBER, B-TEAM; concurrency limited as stated |
| [ ] | PERM-01 | Basic and RBAC defaults, direct roles, scoped roles, team inheritance and direct-role precedence authorize exactly the intended operations. | PASS — domain/API; B-ROLE |
| [ ] | PERM-02 | Cross-workspace teams/scopes and unavailable roles after license changes cannot increase authority; unrelated name edits retain stored role. | PASS — domain/API; B-ROLE, B-TEAM |
| [ ] | PERM-03 | An identity ADMIN never counts as the last human administrator. Human departure, scheduled deletion and workspace cleanup preserve the invariant. | PASS — domain; B-MEMBER |
| [ ] | PERM-04 | Existing context observes disabled/trashed/revoked/deleted actors before the next effect, including prefetched membership paths. No new table/row/field is persisted on denial. | PASS — domain + live integration; E-REVOKE, UI-12/14 |
| [ ] | PERM-05 | Personal views remain human-only through create, adoption, read/edit/publish and import; ordinary human ownership still works. | PASS — domain; B-PERSONAL |
| [ ] | PERM-06 | User/identity/team field-permission choices preserve kind metadata and grant the intended access; no permission data leaks to lower-role callers. | PASS — API/domain + frontend units; B-FIELD; manual selector walkthrough not run |
| [ ] | PERM-07 | Only identity managers bind an Agent application or Local Baserow integration to an identity. A duplicated or restored application keeps its binding only for them: otherwise an Agent loses its run-as and an integration is authorized as the person copying. Application editors keep or clear an existing binding and see no identity choices. | PASS — domain/API + frontend unit; B-BIND |
| [ ] | BILL-01 | Member/admin user lists, seat/free-user counts and license-user assignment exclude identities; team subject counts intentionally include eligible identities. | PASS — API/domain/browser; B-BILL, UI-06; combined UI totals are not seat counts |
| [ ] | BILL-02 | Username/email uniqueness spans humans and identities while human administration targets only humans; collisions return the domain/API error, not a database error. | PASS — API/domain; B-UNIQUE |
| [ ] | EXEC-01 | Paired human/identity tools list apps/tables/schema and create tables with real generated models and persisted schema. Row data is covered separately below. | PASS — domain; E-TOOLS |
| [ ] | EXEC-02 | Paired tool field create/update/delete and linked-field dependency checks persist the right schema and deny unauthorized linked resources. | PASS — domain; E-TOOLS |
| [ ] | EXEC-03 | Paired direct action row create/update/trash/import effects preserve values and actual acting User attribution. | PASS — action/domain; E-ROWS (no row-import ToolContext API exists) |
| [ ] | EXEC-04 | Paired view creation, filters and field/form options persist and read back correctly. | PASS — domain; E-TOOLS |
| [ ] | EXEC-05 | Paired automation workflow/node list/create/update/delete configuration paths work, retain persisted graph edges and enforce workspace scope. No provider/automation run is inferred. | PASS — domain configuration; E-TOOLS |
| [ ] | EXEC-06 | Local Baserow integration run-as resolves an identity, performs the real permitted read/write, and does not fall back to a human after denial/deletion. | PASS — browser/domain; B-INTEGRATION, UI-10–17 |
| [ ] | EXEC-07 | Queued jobs resolve retained identities and recheck current authority after role/membership/disabled/trash changes. | PASS — persisted queued-job execution and four revocations; B-JOB |
| [ ] | ATTR-01 | Created/last-modified User foreign keys and supported action/row-history actor IDs/names identify the actual identity, including after trash. | PASS — domain/browser; E-ROWS, E-HISTORY, UI-17 |
| [ ] | ATTR-02 | Identity work produces required audit/action signals without interactive undo or human analytics; human undo/redo still works. | PASS — domain; E-TOOLS, E-HISTORY, B-EVENT |
| [ ] | ANON-01 | Anonymous template app/table/view/node reads remain allowed only where intended; private equivalents are denied. | PASS — API/domain; E-ANON |
| [ ] | ANON-02 | Anonymous public-form submission works through actual action registration; it does not require an identity or give private-workspace access. | PASS — API/action; E-ANON |
| [ ] | EVENT-01 | Allowed human sessions see identity create/update/delete/team changes; lower roles/outsiders and identities are not human websocket/notification recipients. | PASS — recipient/domain + live browser delivery; B-EVENT, UI-02/04/05/08/09 |
| [ ] | EVENT-02 | Permission-aware broadcasts and AI-provider/group broadcasts target human recipients and avoid per-member profile queries. | PASS — domain + bounded queries; B-EVENT |
| [ ] | IMPORT-01 | Integration publication/import preserves or reauthorizes the supported subject explicitly, trashed identity authorization is denied, and legacy core.Agent authorization is rejected. Personal-view import cannot assign identity ownership. | PASS — domain, scoped contracts; B-INTEGRATION, B-PERSONAL |
| [ ] | MIG-01 | Real migration upgrades existing humans with correct database defaults; rollback refuses while identities exist. Disposable legacy Agent rows are deleted without converting references, and old processes can still query the empty table. | PASS — 2 updated real migration cases (2026-11-12) + drift check; B-MIGRATION |
| [ ] | FLAG-01 | Empty/legacy flags deny creation without writes; identities flag enables it; wildcard behavior is explicit. Existing records remain protected when creation is disabled. | PASS — creation states + existing-record lifecycle with flag disabled; B-FLAG |
| [ ] | SCALE-01 | Identity listing, broadcasts, team bulk membership and custom field grants have bounded query growth; pagination has no duplicates/omissions at tied names. | PASS — bounded query assertions; B-SCALE; opt-in benchmarks not run |
| [ ] | UI-01 | Full identity CRUD/search flows use real API persistence; success/error/permission states and identity visuals survive reload. No uncaught page errors. | PASS — live Chromium; UI-01–09/18 |
| [ ] | UI-02 | Real Members management and integration run-as UI distinguish humans/identities; application creation still calls the AI application Agent. | PASS — live Members/run-as UI; UI-06/10; Agent application naming source/unit checked |
| [ ] | UI-03 | Two admin sessions and a member receive permitted changes through real realtime transport; domain recipient tests exclude callers lacking list permission. | PASS — live delivery + recipient domain tests; UI-09, B-EVENT |
| [ ] | REG-01 | Existing core/premium/enterprise suites, migrations and changed-file lint pass or every exception has explicit attribution and a targeted resolution. | Full runs completed with exceptions; targeted resolutions recorded below |
Manual browser procedures
Use a disposable workspace or the isolated verification stack. Do not modify a shared developer/production database to execute these checks.
M1 — Human account and identity management
- Sign in as human admin A. Open Members, then Identities. Record the human table/API membership rows and identity count separately. The existing Members heading/sidebar total intentionally combines humans and identities; it is not a human-seat count.
- Create an identity named
Verification runner, give it an appropriate role, search for it, rename it, and reload the page. - Confirm the same ID, saved name/role, identity icon, and unchanged human membership rows and seat counts. Open a second admin session and check the visible update.
- Repeat as a lower-role user and workspace B's admin. Inspect the actual network denial for attempted writes; do not rely on a hidden button alone.
M2 — Team, role and field permissions
- With RBAC enabled, put an identity in a team and give the team a scoped role. Use the same operation as a human control and as that identity through run-as.
- Change direct and inherited roles in turn. Confirm direct-role precedence, no-access denial, and that a foreign team is rejected without losing the original assignment.
- Open a custom field-permission selector. Confirm identity and human choices are visibly distinguishable before selection, after save and after reload.
M3 — Real execution and revocation
- Configure a Local Baserow integration to run as the identity. Execute a read and a write through an existing supported service/action. Query/reload the actual target row and inspect supported attribution fields/history.
- Repeat with a human run-as user, then a no-access identity and another workspace's object. Denials must not create or change any row.
- Reuse an already-started execution context after another session disables, trashes, deletes or revokes the identity. The next effect must be denied. This timing is reproduced in automated tests when no user-facing long-running identity binding exists yet; a fresh-context test is not a substitute.
M4 — Trash, restore and retained history
- Record the identity's User ID and an attributed row. Delete the identity from settings, confirm it disappears from the live list, and confirm execution fails.
- Restore it from Trash. Confirm the same ID, role/team membership and row credit.
- Repeat with an independently disabled identity; restore must not enable it.
- Trash/restore its workspace, then use a separate disposable workspace to verify permanent deletion cleans owned User/Profile/membership/grant records.
M5 — Human-only and anonymous boundaries
- Confirm an identity ADMIN does not permit the last human admin to leave. Verify seats, member administration and human notifications exclude identities.
- Confirm an identity cannot adopt another user's personal view or become its owner through import. Confirm a human owner still can use that view.
- In an incognito session, open the configured template/public form and perform permitted reads/submission. Attempt the private equivalent and identity settings; both must be denied. Inspect the resulting row rather than only a success toast.
- Attempt identity login with all currently human-only credentials through the automated negative cases. Do not issue or expect unsupported machine credentials.
M6 — Release gate
- Before deployment, keep
FEATURE_FLAGSfree ofagents,identitiesand*on backend/frontend; prevent scripts/internal services from creating identities. - Drain every old backend and worker before enabling identity creation. Existing identities require avoiding old/new overlap; flag removal does not make rollback safe. This gate was explicitly approved after reproducing the old last-admin bug.
- If this database already ran an earlier version of branch migration 0139, use a separately reviewed schema transition. Ordinary migrate will not rerun it.
Evidence and results index
All artifacts below are local under /private/tmp/identity-verification-20261109/.
The tracked regression tests and source map remain reproducible after the disposable
stack is removed. Counts overlap across runs and must not be summed.
| Run | Revision / environment | Result / artifact |
|---|---|---|
| Full backend suite | Frozen final production source; isolated PostgreSQL; 8 workers | 19,483 passed, 2 failed, 321 skipped in 19m08s — full-backend.xml; both exceptions detailed below |
| Foundation/auth/lifecycle/RBAC | Real Django/DRF and PostgreSQL | 817 passed, 6 skipped — backend/suite-final.xml; six explicit opt-in performance benchmarks skipped |
| Focused cache/performance checks | Same production snapshot | 88 passed — backend/boundary-final.xml; included in broader evidence |
| SSO identity/human boundary | SAML/Google/OIDC after verified provider UserInfo, no live IdP | 15 passed — backend/sso-boundaries.xml; includes 9 new cases |
| Queued execution / disabled feature flag | Successful row-containing duplication, four revocations, existing identity CRUD/restore and outsider denial | 27 passed — backend/queued-flag-boundaries-final.xml; includes normal human job controls |
| Shared tools/MCP/anonymous/history | Real effects; complete affected tool/MCP suites | 686 passed — execution/final-execution-mcp.xml |
| Additional paired row CRUD/retained attribution | Added after broad test collection; production unchanged | 2 passed — execution/final-row-attribution.xml |
| Real browser/API/realtime/integration | Dedicated Nuxt, ASGI, Redis/Celery, PostgreSQL; enterprise fixture license | 17 custom checks passed, zero page errors — browser/browser-verification.md, lifecycle/integration traces and persistence-results.json |
| Retained Playwright spec | Same dedicated stack, repository fixtures | 1 passed — browser/playwright-spec.log; identityManagement.spec.ts |
| Full frontend core | 491 files, 2 workers | 9,135 passed, 1 failed, 2 skipped — frontend-core.log; initial modal timer race described below |
| Full frontend premium | 36 files, 2 workers | 322 passed, 8 skipped — frontend-premium.log |
| Full frontend enterprise | 38 files, 2 workers | 217 passed — frontend-enterprise.log |
| Corrected OAuth modal test file | Actual modal removal awaited, original save assertions retained | 11 passed — frontend-oauth-final.log; not a second full frontend run |
| Isolated periodic-field task suite | Original deadline assertion unchanged; run after full suite stopped | 49 passed — field-tasks-isolated.log; full-run timing outlier not reproduced |
| Corrected import test | Persisted source ID, distinct import and unchanged source assertions | 5 passed — grouped-aggregate-import.log |
| Real migrations | Fast schema fixture disabled, real migration executor | 4 passed — migrations/results.xml; final makemigrations --check --dry-run: no changes detected |
Production snapshot is recorded by final-run-production-manifest.json (109
branch-related source files), plus focused/browser manifests. No production file
changed after the final backend run began. The two row tests, SSO/queued-job/flag tests and modal
test correction have separate final-source runs. The earlier interrupted backend
run (9,985 passed / 213 skipped) is retained as intermediate evidence and is not a
completed full-suite result.
The full backend skips are recorded in JUnit: 207 scheduled daily cases, 62 opt-in cases, 34 cases excluded by a daily-marker selection, and 18 documented feature/environment/known skips. Four identity migration cases ran separately. This is the default complete suite run, not a claim that every opt-in benchmark or external-runtime case was executed. The test-only corrections received focused reruns; neither complete suite was repeated afterward.
The browser spec passed before a final cleanup-only improvement that ensures all owned resources are released even if setup or teardown fails. That adjustment passed Playwright discovery and formatting; the browser flow itself was unchanged.
Automated source map
Use these keys with the acceptance table. Each link opens the actual assertions;
function names can be passed to pytest as path::function. All parameter variants
in the named focused runs were collected, including both human and identity cases.
The full exact node-ID inventories are in local backend/coverage-matrix.json
(172 mapped selectors) and execution/case-selectors.tsv; their IDs are local to
those reports and differ from this plan's acceptance IDs.
| Evidence key | Reusable tests / representative exact selector |
|---|---|
| B-MODEL | test_user_identity.py: test_user_predicates_distinguish_kind_independently_of_status (+4 related functions)test_identity_users.py: test_generated_user_foreign_keys_keep_retained_identity_credits (+5 related functions)test_identity_teams.py: test_identity_team_memberships_survive_trash_restore_and_team_edits (+1 related functions) |
| B-AUTH | test_identity_accounts.py: test_cached_identity_jwt_is_rejected_by_websockets (+6 related functions)test_user_handler.py: test_loaded_identity_cannot_use_human_password_and_email_flowstest_token_auth.py: test_token_auth (+2 related functions)test_user_views.py: test_token_error_if_user_deleted_or_disabledtest_users_admin_views.py: test_admin_user_endpoints_exclude_identity_accounts |
| B-LIFE | test_identity_views.py: test_admin_can_crud_search_and_soft_delete_identities (+7 related functions) |
| B-TEAM | test_identity_teams.py: test_identity_api_rolls_back_invalid_team_changes (+1 related functions)test_identity_concurrency.py: test_concurrent_identity_team_replacements_are_serializedtest_identity_team_permissions.py: test_identity_team_changes_require_membership_permissions |
| B-MEMBER | test_identity_subject.py: test_identity_admin_does_not_replace_last_human_admin (+3 related functions)test_user_handler.py: test_expired_last_human_admin_deletes_workspace_with_identity_admin |
| B-ROLE | test_identity_roles.py: test_identity_member_alias_is_valid_with_rbac (+7 related functions)test_subject_role_assignments_views.py: test_list_subject_role_assignments_of_teams_and_identities (+1 related functions)test_identity_teams.py: test_identity_direct_workspace_role_overrides_team_role (+3 related functions) |
| B-PERSONAL | test_identity_view_ownership.py: test_builder_identity_cannot_modify_or_publish_human_personal_view (+2 related functions) |
| B-FIELD | test_field_permissions_handler.py: test_custom_field_permission_update_has_bounded_subject_queries (+2 related functions) |
| B-BIND | test_integration_types.py: test_only_identity_managers_bind_an_integration_to_an_identitytest_import_export.py: test_a_copy_keeps_run_as_only_for_identity_managers, test_a_restored_snapshot_keeps_run_as_only_for_identity_managerstest_run_as_subject_options.py: test_application_builder_cannot_bind_an_identity |
| B-BILL | test_license_handler.py: test_identities_cannot_be_assigned_license_seatstest_enterprise_license.py: test_identity_roles_do_not_consume_seatstest_workspace_user_views.py: test_list_workspace_users_hides_identitiestest_workspaces_admin_views.py: test_admin_workspace_users_and_free_seats_exclude_identitiestest_workspace_views.py: test_list_workspaces_includes_identity_count |
| B-EVENT | test_ws_signals.py: test_identity_crud_events (+2 related functions)test_ws_tasks.py: test_permission_broadcast_queries_do_not_grow_with_workspace_members (+1 related functions)test_identity_ws.py: test_human_team_changes_do_not_broadcast_an_identity (+2 related functions)test_notifications_handler.py: test_identity_notification_recipients_are_ignoredtest_posthog.py: test_capture_event_action_done_ignores_non_interactive_subject |
| B-JOB | test_identity_stored_users.py: test_queued_identity_job_rechecks_current_authority |
| B-FLAG | test_identity_views.py: test_identity_creation_requires_current_feature_flag |
| B-SCALE | test_field_permissions_handler.py: test_custom_field_permission_update_has_bounded_subject_queries (+2 related functions)test_user_subject_type.py: test_user_subject_type_checks_members_missing_from_prefetch (+1 related functions)test_ws_tasks.py: test_permission_broadcast_queries_do_not_grow_with_workspace_memberstest_identity_teams.py: test_identity_list_loads_workspace_and_team_summaries_without_per_identity_queries |
| B-SSO | test_identity_auth_boundaries.py |
| B-UNIQUE | test_user_handler.py test_user_admin_handler.py |
| B-INTEGRATION | test_integration_types.py test_service_types.py |
| B-MIGRATION | test_core_migrations.py |
| E-TOOLS / E-REVOKE / E-ROWS | test_identity_tool_context.py test_identity_roles.py |
| E-HISTORY | test_row_history.py test_audit_log_handler.py |
| E-ANON | test_anonymous_template_execution.py test_form_view_actions.py test_application_views.py |
| UI-01–18 | identityManagement.spec.ts |
Important exact execution selectors in test_identity_tool_context.py:
test_tool_field_lifecycle_preserves_execution_attributiontest_tool_lookup_dependencies_preserve_execution_attributiontest_tool_view_filters_and_form_options_preserve_execution_attributiontest_tool_automation_lifecycle_preserves_execution_attributiontest_table_import_preserves_execution_attributiontest_row_actions_preserve_execution_attribution_after_identity_trashtest_identity_tools_recheck_a_previously_used_context(six states × plain/prefetched)test_user_tools_recheck_a_previously_used_context(two states × plain/prefetched)
The current real migration cases are test_0139_identity_upgrade_and_guarded_rollback
and test_0139_discards_legacy_agents_without_converting_references. They check old
Agent queries/workspace deletion during rollout, the rollback guard and the removal
of Agent trash entries. test_0074_deletes_rows_whose_subject_is_a_legacy_agent and
test_0045_clears_legacy_agent_authorization cover the enterprise and integrations
cleanup. The earlier
four-case results above predate the decision to discard disposable legacy data.
test_identity_indexes.py additionally interrupts the actual 0140 index build and
verifies that rerunning it recovers the invalid index.
The browser report maps UI-01–17 to specific screenshots, trace actions, HTTP
statuses and persisted row IDs. UI-18 is the retained repository spec.
Reproduction commands
Run against disposable PostgreSQL databases; never point these verification runs
at a developer or production database. The just b run recipe supplies the normal
core/premium/enterprise Python paths. This run used the installed environment with
UV_CACHE_DIR=/private/tmp/baserow-identity-rename-uv UV_NO_SYNC=1 UV_OFFLINE=1.
# Full backend, from the repository root (the recorded run adds a failure-report plugin).
just b run env -u DATABASE_URL DATABASE_NAME=identity_verify_runtime_20261109 \
python -m pytest -c pytest.ini --reuse-db --create-db -n 8 -q --tb=short
# Focused suites; use the complete path list recorded in the evidence directory.
just b run env -u DATABASE_URL DATABASE_NAME=identity_verify_backend_20261109 \
pytest -c pytest.ini @/private/tmp/identity-verification-20261109/backend/suite-paths.txt \
--reuse-db -n 2 -q
# A paired stale-context regression, or substitute any selector from the source map.
just b run env -u DATABASE_URL DATABASE_NAME=identity_verify_execution_20261109 \
pytest tests/baserow/core/tools/test_identity_tool_context.py --reuse-db -q
# Real migrations: explicitly disable the fast SQL/schema fixture.
just b run env -u DATABASE_URL DATABASE_NAME=identity_verify_migrations_20261109 \
BASEROW_TESTS_SETUP_DB_FIXTURE=off pytest tests/baserow/core/migrations/test_core_migrations.py \
-k 0139 --run-once-per-day-in-ci --reuse-db --create-db
just f yarn test:core --run --maxWorkers=2
just f yarn test:premium --run --maxWorkers=2
just f yarn test:enterprise --run --maxWorkers=2
just f yarn test:core --run test/unit/core/components/settings/mcpOAuthConnections.spec.js --maxWorkers=2
# Standard disposable Docker E2E stack, identities enabled and enterprise fixture license.
# Build this branch; the restored schema must include migrations 0139 and 0140.
just e2e build
just e2e up
just e2e test tests/identities/identityManagement.spec.ts
The observed browser run used an equivalent dedicated native stack at ports
39991/39992/39993, real migrations, repository Playwright 1.48.0 and Chromium.
Its exact local configuration/scripts remain in browser/; it did not run the
entire repository E2E suite. The reusable spec uses the normal E2E fixtures/config.
Findings discovered during this pass
V1 — resolved, authorization revocation. Reusing a successfully used ToolContext could retain authority after identity disable/trash/pending deletion or workspace role revocation; removed/deleted identities could still list private applications. Disabled/deletion-pending humans also retained cached authority. Current eligibility now comes from the existing batched database lookup. All 16 public shared tools create an invocation-local permission cache and isolate copies of the context/user/workspace while retaining request metadata. Paired stale-context and enterprise role regressions pass, including prefetched membership contexts.
Human-only request list prefetches keep their bounded-query optimization. Existing query-growth assertions caught an initial N+1 during the fix; the final selected suite passes those unchanged assertions. Graph tests reload the ORM workflow between separate calls and verify the same persisted edges. No graph persistence bug was found.
The guarantee is the next public shared-tool invocation, not cancellation of an operation already executing. Internal human-only Kuma helper compositions retain their caller cache lifetime. Shared-context concurrency was source-reviewed; parallel tool-write load testing was not performed.
V2 — resolved test synchronization, unchanged OAuth UI. The full frontend run
failed a slow save does not close the modal of another app before resolving the
mocked save: a deferred Modal.hide() timer could close the newly opened modal.
Both the test and production component were unchanged against the comparison base.
The test now clicks the visible close control and waits for the previous modal's
actual DOM removal before reopening. Its original assertions about the pending
save and second connection remain. The corrected 11-test file passes. No OAuth
production behavior was changed and no second complete frontend pass is claimed.
V3 — corrected test assumption, unchanged import code. The full backend run
exposed an unchanged grouped-aggregation import test that assumed a newly allocated
primary key could never equal the arbitrary serialized ID 999. PostgreSQL
legitimately allocated 999 in the full suite. The regression now imports using an
existing source record's ID and asserts a distinct new record and preserved source.
All three import variants and two related export tests pass: 5 passed in
grouped-aggregate-import.log. The import production code is unchanged; assertions now verify distinct records
and preserved source data.
V4 — full-suite timing outlier, not reproduced in isolation. The full backend
run observed 6.97s against the unchanged periodic-field cancellation test's <4.6s
wall-clock assertion. Both the test and relevant timeout/task implementation are
unchanged against the comparison base. The entire 49-test field-task file passed
in isolation after the full run stopped, including the original threshold. No
assertion or production code changed. Host/database contention is consistent with
the evidence, but the original failure was not profiled, so suite-state interference
cannot be ruled out conclusively. This remains a full-run exception, not a claim
that the original full suite was green.
Remaining boundaries and manual sign-off
- Browser evidence is Chromium on the local development stack, not Firefox/WebKit, mobile, production deployment, accessibility certification or production load.
- Custom field-permission selector visuals have frontend unit coverage; M2 is still available for a reviewer to perform the complete browser walkthrough.
- Browser realtime tests cover permitted human delivery. Negative recipient tests calculate real permission-filtered recipient IDs with transport mocked; no live unauthorized websocket observer was included.
- SSO tests begin after the external provider has returned verified identity data. External identity providers, email and other provider calls were not invoked.
- The queued-job checks load a real stored job and invoke its task synchronously; they do not certify broker delivery or worker retries.
- The import tests cover the enumerated current contracts. A full combinatorial cross-workspace export/import/duplicate migration rehearsal was not run.
- There is no identity-disable UI/API toggle. Inactive-state regressions deliberately modify persisted User.is_active and test denial.
- The approved rollout gate in M6 remains a deployment requirement. It is not replaced by a passing migration or feature-flag test.
Final validation and cleanup
Changed Python source/tests pass Ruff check and format (22 files). The changed
frontend test passes the repository just f lint recipe; the E2E spec passes
Prettier and Playwright discovery. git diff --check, all source links in this
plan, migration drift and the frozen production manifest are clean. The initial
frontend lint invocation used the wrong path relative to a Yarn script; the
repository's file-scoped lint recipe was then run successfully.
Owned Nuxt/ASGI/Celery/Redis services and the generated browser build directory
have been removed. All 18 task-owned databases were removed after checking for active connections,
as recorded in local cleaned-databases.json; developer databases and services
were not modified.
This plan, permanent regression tests, local logs, JSON/XML and browser traces
remain available. Browser traces contain disposable authenticated test sessions
and should remain local.
Completion criteria
- Every in-scope acceptance group has a concrete test/result mapping; gaps are named.
- A human control and applicable denied identity/anonymous case accompany each shared authority boundary. Denied writes prove absence of stored side effects.
- Tests added during the broad run and production fixes after collection receive final-source reruns; the report does not conflate old and final snapshots.
- Browser claims identify the real backend, transport, test-only settings and any mocked boundary. No live provider or production-load claim is inferred from them.
- Temporary databases, servers and generated files are removed; reusable tests and this plan remain available for review and reruns.