Skip to content

Commit efac8e8

Browse files
os-zhuangclaude
andcommitted
chore(changeset): usr_system is removed, not lazily provisioned
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent bbaa560 commit efac8e8

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

.changeset/seed-ownership-handoff.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,14 @@ author-written objects silently shipped with no working ownership at all.
2929
not the author — performs the handoff, so there is nothing to remember or
3030
mistype.
3131

32-
- **`usr_system` is now provisioned lazily (runtime)** — only when a seed
33-
dataset actually embeds `cel`os.user.id``. Because the default model leaves
34-
`owner_id` NULL and relies on the handoff above, a typical bundle never
35-
references `os.user`, so the non-loginable `usr_system` placeholder is never
36-
created. It survives purely as a backward-compatible fallback; `os.org` is
37-
unaffected (derived from `organizationId` in the loader).
32+
- **`usr_system` is never minted (runtime + objectql).** The seed loader binds
33+
`os.user` to a NULL identity, so `cel`os.user.id`` resolves to NULL at seed
34+
time (the owning admin does not exist yet) and the row seeds NULL-owned — then
35+
the handoff above fills it. The runtime's `ensureSeedIdentity` (the only code
36+
that inserted a `usr_system` row) is removed. `SystemUserId.SYSTEM` survives
37+
only as a reserved id so legacy DBs' exclusion guards / ownership handoff still
38+
recognize a pre-existing row. `os.org` is unaffected (derived from
39+
`organizationId`).
3840

3941
Also hardens `bootstrapPlatformAdmin` against a latent dts typecheck error
4042
(defensive read of the untyped `description` on seed permission sets).

0 commit comments

Comments
 (0)