Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions docs/qa/platform-checklist/areas/access-security.json
Original file line number Diff line number Diff line change
Expand Up @@ -2602,22 +2602,22 @@
"title": "A session with no active organization is a LEGAL state with fail-closed semantics: tenant-scoped reads resolve to nothing, tenant-scoped writes are refused loudly naming the missing org, and nothing is ever NULL-stamped",
"since": "v17",
"status": "active",
"revision": 11,
"revision": 12,
"priority": "P0",
"surface": "api",
"personas": [
"a user holding NO membership (producer (1) of fixtures.knownGaps[0]) — since #25626 no measured HTTP door mints one on a walled boot (knownGaps[0]); the operator's POST /api/v1/auth/admin/create-user now yields a MEMBER of the operator's active organization, which serves the persona below",
"a user holding NO membership (producer (1) of fixtures.knownGaps[0]): the operator's POST /api/v1/auth/admin/create-user yields a MEMBER of the operator's active organization, the operator removes that membership, and the user signs in afresh; `node scripts/qa/qa-fixture.mjs walled-boot --member-less` mints one on the walled boot (knownGaps[0])",
"an organization member whose session has cleared its active organization (producer (2) of fixtures.knownGaps[0]): POST /api/v1/auth/organization/set-active {\"organizationId\": null}. Minted by the operator with POST /api/v1/auth/admin/create-user after the operator has created an organization and set it active — the new user joins it as member",
"seeded admin (control — has an active organization)"
],
"fixtures": {
"app": "showcase",
"requires": [
"a tenancy-walled deployment (ADR-0095 Layer 0 active on at least one tenant-scoped object) — confirm the posture before scoring, since on an unwalled deployment every clause here is vacuous",
"the durable producer fixtures.knownGaps[0] still names a door for, on that walled boot: producer (2), a member who sends POST /api/v1/auth/organization/set-active {\"organizationId\": null}, minted by the operator's POST /api/v1/auth/admin/create-user once the operator has created an organization and set it active (since #25626 the new user joins the operator's active organization as member, invite-only included; with no active organization the call answers 400 NO_ACTIVE_ORGANIZATION and creates nothing). A member-less user (producer (1)) has no measured walled producer since #25626, so the legs scored on it record blocked(fixture)"
"the durable producer fixtures.knownGaps[0] still names a door for, on that walled boot: producer (2), a member who sends POST /api/v1/auth/organization/set-active {\"organizationId\": null}, minted by the operator's POST /api/v1/auth/admin/create-user once the operator has created an organization and set it active (since #25626 the new user joins the operator's active organization as member, invite-only included; with no active organization the call answers 400 NO_ACTIVE_ORGANIZATION and creates nothing). A member-less user (producer (1)) is minted by removing such a member's membership: `node scripts/qa/qa-fixture.mjs walled-boot --member-less` mints one on the walled boot (knownGaps[0])"
],
"knownGaps": [
"The state needs a producer. QA run #24783 measured two durable, non-racy ones on the walled boot (knownGaps[2]), on `isolated` and `group`; since #25626 only (2) has a door. (1) NO membership: at #24783 a user minted by POST /api/v1/auth/admin/create-user under OS_AUTH_MEMBERSHIP_POLICY=invite-only answered membershipCreated:false and held no sys_member row. #25626 retired that recipe: in multi-org mode create-user joins the new user to the operator's ACTIVE organization as member, invite-only included, and with no active organization answers 400 NO_ACTIVE_ORGANIZATION and creates no user (packages/plugins/plugin-auth/src/admin-user-endpoints.ts, the ADR-0093 D3 amendment; packages/qa/dogfood/test/create-user-organization-join.dogfood.test.ts, J1 and J2). The reconciler still answers `policy-skip` under invite-only for automatic binding (packages/plugins/plugin-auth/src/reconcile-membership.ts#reconcileMembership), but no HTTP door that mints a member-less user on a walled boot has been measured since, so a clause or leg scored on producer (1) records blocked(fixture) naming this line until a run measures one. (An explicitly declared `auto` binds nobody under a wall either, ADR-0093 D1 `no-target-org`; no run has measured that boot.) (2) A member who CLEARS its active organization: POST /api/v1/auth/organization/set-active {\"organizationId\": null}, after which GET /api/v1/auth/get-session reads null. The two differ under `group`, where the scope is the membership set (acceptance[0]), so record WHICH producer each clause was scored on. Two former producers no longer yield the state. The signup race is gone: the session seam settles a newly created user's membership before its first session resolves an organization (ADR-0123 D3; packages/plugins/plugin-auth/src/auth-manager.ts#composeDatabaseHooks, its defaultActiveOrg hook), so only a policy that binds nobody leaves that session without one. The removed-member path ends the session's claim instead: removing a user's last membership revokes each live session that named that organization, and a user still holding another membership has such a session re-pointed to it (packages/plugins/plugin-auth/src/membership-ended-session.ts#endSessionClaimsForEndedMembership); QA run #24783 measured the removed member's token answering 401 UNAUTHENTICATED",
"The state needs a producer. QA run #24783 measured two durable, non-racy ones on the walled boot (knownGaps[2]), on `isolated` and `group`; since #25626 only (2) has a door. (1) NO membership: at #24783 a user minted by POST /api/v1/auth/admin/create-user under OS_AUTH_MEMBERSHIP_POLICY=invite-only answered membershipCreated:false and held no sys_member row. #25626 retired that recipe: in multi-org mode create-user joins the new user to the operator's ACTIVE organization as member, invite-only included, and with no active organization answers 400 NO_ACTIVE_ORGANIZATION and creates no user (packages/plugins/plugin-auth/src/admin-user-endpoints.ts, the ADR-0093 D3 amendment; packages/qa/dogfood/test/create-user-organization-join.dogfood.test.ts, J1 and J2). The reconciler still answers `policy-skip` under invite-only for automatic binding (packages/plugins/plugin-auth/src/reconcile-membership.ts#reconcileMembership), and a removed member is never bound again by signing in (ADR-0093 D7; packages/qa/dogfood/test/membership-decided-at-creation.dogfood.test.ts), which is producer (1)'s door since #25626: the operator mints the user with create-user, removes its membership with POST /api/v1/auth/organization/remove-member, and the user clears the forced password change create-user stamps (POST /api/v1/auth/change-password; until then every data read answers 403 PASSWORD_RESET_REQUIRED) and signs in afresh. `node scripts/qa/qa-fixture.mjs walled-boot --member-less` replays those calls and proves the state: GET /api/v1/auth/get-session reads activeOrganizationId null and GET /api/v1/auth/organization/list answers an empty list. Measured on #33351 round 2 on isolated and group invite-only boots, where that user's first GET /api/v1/data/showcase_task answered 200 with zero rows. (An explicitly declared `auto` binds nobody under a wall either, ADR-0093 D1 `no-target-org`; no run has measured that boot.) (2) A member who CLEARS its active organization: POST /api/v1/auth/organization/set-active {\"organizationId\": null}, after which GET /api/v1/auth/get-session reads null. The two differ under `group`, where the scope is the membership set (acceptance[0]), so record WHICH producer each clause was scored on. Two former producers no longer yield the state. The signup race is gone: the session seam settles a newly created user's membership before its first session resolves an organization (ADR-0123 D3; packages/plugins/plugin-auth/src/auth-manager.ts#composeDatabaseHooks, its defaultActiveOrg hook), so only a policy that binds nobody leaves that session without one. The removed-member path ends the session's claim instead: removing a user's last membership revokes each live session that named that organization, and a user still holding another membership has such a session re-pointed to it (packages/plugins/plugin-auth/src/membership-ended-session.ts#endSessionClaimsForEndedMembership); QA run #24783 measured the removed member's token answering 401 UNAUTHENTICATED",
"`invite-only` is no longer a fixture gap: the walled boot must declare a membership policy anyway (RUNNER.md 'A walled boot is a fixture of its own', prerequisite 3), and declaring `invite-only` gives knownGaps[0]'s producer (1). SSO-JIT-pending still has no stock fixture: that producer is blocked(fixture) unless the run configures SSO.",
"requires[0]'s tenancy-walled deployment is a walled boot. On 18.0.0 os serve — and os dev / os start, which boot through it — boots OS_TENANCY_POSTURE=group|isolated (and the legacy OS_MULTI_ORG_ENABLED=true): 18.x step 4 (#24580) deleted the walled boot refusal (serve.ts walledPostureRefusal) before 18.0.0, and of the published prereleases only 18.0.0-next.5 carries it. The walled boot is provisioned per RUNNER.md's environment-facts entry 'A walled boot is a fixture of its own': the multi-org runtime declared by the app (examples/app-showcase declares it), OS_PLATFORM_OWNER_EMAIL, and a declared OS_AUTH_MEMBERSHIP_POLICY; each one absent refuses an os dev boot naming itself, while a bare os serve in production mode judges none of them until OS_AUTH_SECRET is set (that entry). Every clause is a walled leg, and the walled boot runs from the tree with the three variables exported: QA run #32102 (ff04ad81) booted the stock showcase under group and isolated that way and served every leg, so the item carries no blocked marker (#9334, lifted by #32111). A run that does not provision the walled boot records each walled leg blocked(fixture) naming that entry; its pin (automated.ref) boots the posture in-process.",
"acceptance[4] carries an open question: may a login/logout row produced by a session with no organization scope carry a NULL organization attribution, and must it? Two producers give such rows. (1) A user who holds NO membership at all (producer (1) of knownGaps[0]): its login/logout rows in sys_audit_log carry tenant_id null, because no organization exists to stamp and ADR-0123 D3's ordering fix 'must not manufacture a membership that policy says must not exist'. QA run #24783 read those rows only as the platform operator (GET /api/v1/data/sys_audit_log filtered by user_id answered 200), while the user itself gets 403 on sys_audit_log, on both postures. (2) A member who CLEARED its active organization (producer (2) of knownGaps[0]): QA run #32102 (ff04ad81, repro rule R-1), on walled group and isolated boots, read the member's rows as login A, login A, a logout with tenant_id NULL (sent while the session had no active organization), login A; the operator reads that logout row (200) and the member gets 403 (object permission). The mechanism: packages/plugins/plugin-auth/src/auth-session-audit.ts#logoutEventFor takes the session's activeOrganizationId, and packages/plugins/plugin-audit/src/auth-event-audit.ts writes tenant_id from the event's organizationId, null when it has none. ADR-0131 D7 settles the read path, and acceptance[4] and acceptance[6] read the ledger that way since revision 10: sys_audit_log is a deployment-level ledger with no organization column, its tenant_id is an attribution field the tenant-field resolver does not claim, 'never the tenancy anchor', such objects are 'governed by object permission, not by the wall', and D7's 2026-10-22 note keeps tenant_id's NULL arm by design; ADR-0131 D9 scopes the no-NULL rule to tenant-column objects ('column ⇒ in scope'). The clause's former 'invisible to RLS readers' premise was written for #8245, when the ledger was walled. Neither ADR states whether a row from either producer must carry an organization attribution. ADR-0123 D3 pays the ledger by ordering, which binds nobody under invite-only (producer (1)) and does not reach a session that cleared its organization (producer (2)). If the answer is 'must be attributed', producer (2)'s logout row is a product defect in logoutEventFor. The implementation: packages/plugins/plugin-audit/src/objects/sys-audit-log.object.ts, whose tenant_id docblock says NULL means a deployment-level action and whose defaultRowScope sys_audit_log_org reads tenant_id == current_user.organization_id, which a NULL row matches for no organization reader. Until the question is ruled (QA run #24783's finding F3 for wave anchor #24579 raised it for producer (1); #32111 carries it to the maintainer for both producers), score acceptance[4] from what is measured (the raw rows, their tenant_id and the readers that see them) and name this question and the producer beside the verdict"
Expand Down Expand Up @@ -2772,7 +2772,8 @@
"date": "2026-11-14",
"change": "steps[8] and acceptance[4].verify re-pointed (card #33332; QA runs #32953 comment 6840054712, #33025 comment 6844741021, #33087 comment 6850382730, #33092 comment 6850793622). steps[8] had the member create a showcase_account and a showcase_project, but showcase_member_default grants neither create (examples/app-showcase/src/security/permission-sets.ts), so the member met the generic 403 PERMISSION_DENIED first, mistakable for the org refusal; the operator now creates the parent project, and the member's create is the showcase_task (project required, task.object.ts) or a showcase_private_note. The step adds that a fresh sign-in restores an active organization, so the clear is per session. acceptance[4]'s raw-row read now names the telemetry datasource sys_audit_log lives in (audit-writers.ts). No clause sentence changed. Read from source at base fca5f89c",
"ref": "#33332"
}
},
{ "revision": 12, "date": "2026-11-14", "change": "producer (1) has a door again (ledger row 208 of #32908): personas[0], fixtures.requires[1] and knownGaps[0] mint the member-less user by removing a create-user member's membership and signing it in afresh (ADR-0093 D7), replayed by the new `walled-boot --member-less` flag of scripts/qa/qa-fixture.mjs and measured live on isolated and group invite-only boots. Those legs no longer record blocked(fixture)", "ref": "#33351" }
]
},
{
Expand Down
10 changes: 8 additions & 2 deletions docs/qa/platform-checklist/areas/approvals.json
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@
"title": "M-of-N quorum approves at the threshold; one rejection vetoes",
"since": "v16",
"status": "active",
"revision": 11,
"revision": 12,
"priority": "P1",
"surface": "browser",
"personas": ["three DISTINCT users each holding one of the approver positions"],
Expand All @@ -203,7 +203,7 @@
],
"knownGaps": [
"the FLOW half of the fixture is real and seeded — showcase_committee_quorum (2-of-3 quorum over positions manager/finance/legal, examples/app-showcase/src/automation/flows/index.ts) is launched on EXP-DEMO by seed-approval-demo.ts. What still collapses the slate is POSITION ASSIGNMENT, not a missing flow or a pending design call: the admin holds all three committee positions (ADMIN_APPROVAL_POSITIONS = manager/finance/legal/exec, seed-approval-demo.ts) and Ada Auditor deliberately holds ONLY auditor, so all three slots resolve to one person and the runtime clamps 2-of-3 to 1-of-1",
"CLOSED for runs by the runtime fixture in requires (#21845) — the seed gap itself remains and is why the fixture exists: the remaining unblock is a SEED LINE: assign Ada 'showcase_finance' (or 'showcase_legal') in seed-approval-demo.ts. She has been a real credential login on a stock boot since #9308, and the per-group demo is untouched by the grant — its finance GROUP routes position 'showcase_auditor' (flows/index.ts), not position 'showcase_finance'. That one line yields a two-distinct-holder slate (admin + Ada), turning minApprovals 2 into a real 2-of-2: the threshold tally, actor distinctness and the one-rejection veto all become demonstrable. Only the 'third approver's pending task is closed by finalization' clause needs more — a THIRD distinct holder (e.g. a legal-holding persona), an equally mechanical seed addition. Landing those seed lines (and an amount ceiling on the per-group flow) retires the runtime fixture; until then a run states that its verdict rests on the runtime fixture, and the seeded EXP-DEMO request stays the clamp contrast because its slate was fixed when it opened at seed time"
"BY DESIGN, not a seed gap: the runtime fixture in requires (#21845) is how a run gets distinct committee holders, and it stays. Seeding Ada into a committee position was weighed and ruled out (maintainer ruling 2026-11-14 on #33351, row 135, option B): 'showcase_finance' and 'showcase_legal' are also the two approver positions of the seeded invoice dual sign-off, showcase_invoice_signoff, whose behavior is 'unanimous' (examples/app-showcase/src/automation/flows/index.ts), and a unanimous request needs EVERY resolved approver (packages/plugins/plugin-approvals/src/approval-service.ts, isApprovalSatisfied). So Ada holding either position would make her a required approver of every invoice the stock demo routes; 'showcase_manager' distributes its own permission set and four other approval nodes route it. Other approvals items read the stock boot as 'Ada holds only showcase_auditor' too. A run binds the holders over the admin API as requires[1] describes and states that its verdict rests on that runtime fixture; the seeded EXP-DEMO request stays the 1-of-1 clamp contrast, because its slate was fixed when it opened at seed time"
]
},
"steps": [
Expand Down Expand Up @@ -311,6 +311,12 @@
"date": "2026-11-14",
"change": "fixtures.requires[1] step (4) re-pointed (stale spec, card #33332; QA run #33048 comment 6846028996). The step said only 'add one showcase_expense_line of 6000'; the run met a 400 on a line status 'pending' and a report submitted at total 0 that opened nothing. The step now names what the line needs from source (expense_report, merchant and amount required; category optional; status one of submitted, approved, rejected, default submitted) and that the line goes in before the submit. The seed gap in knownGaps[1] (Ada holds only showcase_auditor) is unchanged and stays. No clause changed. Read from source at base fca5f89c",
"ref": "#33332"
},
{
"revision": 12,
"date": "2026-11-14",
"change": "fixtures.knownGaps[1]: the runtime fixture is by design and the 'one seed line retires it' wording is dropped (maintainer ruling 2026-11-14 on #33351, row 135, option B). Seeding Ada into finance or legal would also make her a required approver of the unanimous invoice dual sign-off. Read at base ba35dfd78: flows/index.ts (showcase_invoice_signoff approvers finance + legal, behavior unanimous), approval-service.ts (isApprovalSatisfied, unanimous = every resolved approver approved). No clause changed",
"ref": "#33351"
}
]
},
Expand Down
Loading
Loading