Repository navigation
test(dogfood): a walled leg of the sign-up organization census - #25241
Conversation
Claude-Session: https://claude.ai/code/session_01UQVH1PSsJbZT4VvCZqEiRu Co-authored-by: Claude <noreply@anthropic.com>
…lared set Claude-Session: https://claude.ai/code/session_01UQVH1PSsJbZT4VvCZqEiRu Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckNothing in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 0 changed package(s)), so this run has no opinion about the docs. What this run could not see
Coarse fallback — 0 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): |
Contract reviewServed-tier: Face: test-only card, ① Derived judgments
② Semver levelNone. The diff publishes nothing (private package, test file only), so no changeset is owed. ③ Boundary flags
Check-runs on the head at posting: 47 in total. 33 Implemented-by: VERDICT: PASS |
席位核对ACCEPT ·
|
|
Landing note · Head moved to Generated by Claude Code |
Requested by Bill · project thread
Fixes #25207
Part of #24343 (its ceremony half, the
advisorycount, is not addressed here; #24343 remains open).Clause-②: no
What
A walled leg of the sign-up organization census, as a sibling file beside the
singleone:packages/qa/dogfood/test/signup-organization-census-walled.dogfood.test.ts. Test-only; nothing outsidepackages/qa/dogfood/moves, and thesinglefile is untouched.One boot per posture (
group,isolated),multiTenant: 'posture-only'withOS_TENANCY_POSTUREselecting the posture, and the audit and email plugins composed together. The journey:open, declared setmember_default);Then a census of the STORE, not the registry: every sqlite table carrying an
organization_idcolumn is read fromsqlite_masterplusPRAGMA table_infoat run time (39 tables on this boot, the date-namedsys_activityshard included), so a new table joins the census on its own.group/isolated, not degraded, isolation active; both users' only membership is the journey's organization; the census reaches the writers' tablesorganization_idon every tenant-column table (boot rows included)sys_member2,sys_user_permission_set2,sys_email1,sys_invitation1,sys_team1)member_defaultgrant, owned by the organization; the invitee, admitted by its invitation, holds nonesys_userrecordssys_identity_email, no column), none insys_emailWhy the existence legs matter
Measured on this boot: 38 of the 39 tenant columns are NOT NULL in the store (
sys_sso_provideris the one nullable column), and a stamp-less system write on a walled posture is refused by the engine (ADR-0131 D9) before it reaches the column. So "0 NULL rows" alone holds even when a writer loses its stamp: the row is refused, not written NULL. The census therefore also requires each writer's own row to exist and to name the organization, and that is the leg the ablation turns red.Tests
At head
70551508, throughos-verify-lock.sh:pnpm --filter @objectstack/dogfood exec vitest run --maxWorkers=2 test/signup-organization-census-walled.dogfood.test.ts test/signup-organization-census.dogfood.test.ts:Test Files 2 passed (2),Tests 15 passed (15)(walled 12/12 across both postures; thesinglecontrol 3/3). Lock VERDICT command-exit 0.pnpm --filter @objectstack/dogfood typecheck: exit 0;tsc --listFilesincludes the new file.eslint --no-inline-configon the new file: exit 0.Ablation (one-shot, never landed)
The grant writer's stamp: in
packages/plugins/plugin-auth/src/auth-manager.tslandSelfRegistrationGrant, the anchorsetName, organization_id: organizationId }replaced bysetName, organization_id: (globalThis as any).ABLATION_25207 }(undefined at run time), throughscripts/ablation-replace.mjs(anchor 1 to 0, blobab76fa3c90e8to4db63fdf74d3), thenpnpm --filter @objectstack/plugin-auth buildandablation-dist-preflight.mjs @objectstack/plugin-auth ABLATION_25207: marker present in 2 built files.Tests 4 failed | 11 passed (15). Red, in both postures: the grant writer leg (the declared grant: expected [] to deeply equal [ orgId ]) and the activity writer leg (the registrant's grants: expected [ 'organization_admin' ] to include 'member_default'). The auth log names the cause:Insert on 'sys_user_permission_set' was REFUSED: a system-context write on a tenant-scoped object must carry an organization, and this install runs the 'group' (resp. 'isolated') tenancy posture. Thesinglecontrol stayed green (the Default Organization is derived there).ab76fa3c90e8(equal to HEAD,git diff HEADempty), rebuilt, preflight--absent(marker absent from all 20 built files, tree clean), thenTests 15 passed (15).void "ABLATION_25207", which the bundler folds tovoid 0; the preflight read the marker ABSENT fromdist/, so that leg's run was void and is not counted.Gates
dispatch-gates.mjs --commandsderived 56 families for this diff; all run locally at70551508and reconciled with--ran: 55 exit 0, 1 NOT MEASURED (check:dual-build-cjs-loads, exit 3: needs every package built; CI reads it).check:query-options-erasureandcheck:type-check-debtwere re-run without the per-command 300 s cap after a first timed-out pass;check-plugin-teardown-shape --self-testafter deepening the shallow clone.Changeset
None:
packages/qa/dogfoodis private and the diff is a test file; nothing published moves (skip-changeset).Acceptance notes
Duration 33.90s(import 25.10 s, tests 8.50 s), above the 10 s report line. That line is report-only and none of the declared budget classes fits a real-stack boot, so no budget is declared.decideAudienceAdmission), so it is owed no declared set by design; the file pins that reading instead of expecting a second grant.Generated by Claude Code