Repository navigation
docs(verify): posture-only docblocks say what the stand-in walls and what it does not - #28760
Conversation
…what it does not The SimulatedOrgScopingPlugin and BootOptions.multiTenant 'posture-only' docblocks said nothing stamps organization_id and that a cross-tenant fixture booted that way would assert nothing. Since ADR-0131 D8/D11 the engine lands an insert in the caller's active organization, the SQL driver stamps it, and the one Layer 0 verdict walls reads by posture. The docblocks now say so, tell a fixture to measure the wall, and name what the stand-in still does not give (default-org bootstrap, seed replay, membership-policy gate, service declarations, memory driver). Comments only. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ihL2gLghEqeDKTbDTC7Zd
…rify-posture-docblock Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ihL2gLghEqeDKTbDTC7Zd
📓 Docs Drift CheckThis PR changes 1 package(s): ⛔ 1 release-owned page(s) name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 7 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 46a22688896d32187c069e7ba6a9a61c6fcd07fd && git checkout 46a22688896d32187c069e7ba6a9a61c6fcd07fd
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 5493b8842995fabb0979ae535301d3f3cb9fc65e 5b630f038e09b5e97f4893a83e560a264e92ac32 && git checkout -B drift-repro 5493b8842995fabb0979ae535301d3f3cb9fc65e && git merge --no-ff 5b630f038e09b5e97f4893a83e560a264e92ac32
node scripts/docs-audit/affected-docs.mjs --json 5493b8842995fabb0979ae535301d3f3cb9fc65e
|
|
domain:devx#2 · marchtian · session_017ihL2gLghEqeDKTbDTC7Zd 席位核对 — ACCEPT ·
|
Requested by 田騏 · project thread
Fixes #28703
Clause-②: no
Metadata-protocol: none
维护者速读
packages/verify/src/harness.ts里的注释(SimulatedOrgScopingPlugin、BootOptions.multiTenant: 'posture-only'、orgContext一段、一行行内注释),外加一条@objectstack/verifypatch changeset;不改任何代码。dist/index.d.ts里的 JSDoc 随之变化);回滚即 revert 本 PR。packages/verify/src/harness.ts的multiTenant文档块("What it walls" / "What it does NOT give a fixture" 两节);其次文件顶部SimulatedOrgScopingPlugin文档块。git diff origin/main...HEAD -- packages/verify/src/harness.ts,预期只见注释行变动、无一行代码变化。What changes
Comments only, in
packages/verify/src/harness.ts, plus apatchchangeset for@objectstack/verify(theBootOptionsJSDoc ships indist/index.d.ts, so the published bytes change).SimulatedOrgScopingPlugindocblock. The "⛔ It stamps noorganization_idand scopes no query" sentence is replaced. The stand-in itself still stamps and scopes nothing, but since ADR-0131 (D8, D11) the wall is open-core code that keys on the posture the stand-in makes true. The engine lands an insert in the caller's active organization (ObjectQL#driverWriteTarget), the SQL driver fills an absentorganization_id(SqlDriver#injectTenantOnInsert), and reads are scoped by the one Layer 0 verdict (computeTenantLayer0Verdict,postureEnforcesWall).BootOptions.multiTenant'posture-only'section. "It performs no tenant isolation whatsoever … would assert nothing and pass" is removed. Two subsections replace it:The section tells a cross-organization fixture to measure the wall, and points to the precondition case of
packages/qa/dogfood/test/create-caller-id-collision-walled.dogfood.test.tsas the shape.orgContextdocblock. "Cross-tenant isolation has exactly one honest proof in this repo:multiTenant: true" is replaced. A cross-tenant fixture needs a walled posture, either'posture-only'ortrue. The "asserts nothing onsingle" sentence stays, because it is still true. It now names the Layer 0 verdict as well as the RLS strip.'posture-only'branch ofbootStack: "activates the POSTURE, never the WALL" now says the open core's wall follows from the posture.Tests
No behaviour changes, so no test was added or changed.
Local runs at head 5b630f0
pnpm --filter '@objectstack/verify...' build(underos-verify-lock):VERDICT command-exit 0.pnpm --filter @objectstack/verify typecheck:VERDICT command-exit 0.check:test-typecheck: OK.pnpm --filter @objectstack/verify exec vitest run --maxWorkers=2:Test Files 48 passed (48),Tests 401 passed (401),VERDICT command-exit 0.dist/index.d.tscontains "What it does NOT give a fixture" (1 match) and "performs no tenant isolation whatsoever" (0 matches). The positive controldatabaseDriverhas 2 matches.filesis["dist","README.md","CHANGELOG.md"].Acceptance notes
BootOptionsJSDoc measurably ships indist/index.d.ts, so this takes apatchchangeset, notskip-changeset.SimulatedOrgScopingPlugindocblock still says "The proof that the REAL plugin walls tenants lives in cloud'ssecurity-enterprisemulti-org integration test". The read wall is now open-core code that this repo pins too (see the walled pin above), so that sentence understates where the proof lives. It is not a defect, and this PR does not touch it.postureStampsOrganization's docblock inpackages/spec/src/security/tenancy-posture.tssays the stamper is the enterprise runtime, "not the open engine". The open engine plus the SQL driver now stamp the active organization on insert in every posture (ObjectQL#driverWriteTarget,SqlDriver#injectTenantOnInsert). This looks like the same class of drift in another package. It is noted here and not filed.Verification
Derived gate families (dispatch-gates --commands, head 5b630f0)
pnpm check:dual-build-cjs-loadsexited 3 withPREREQUISITE NOT METbecause it needs a fullpnpm buildand only the verify closure was built. CI runs it.node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --ran FILEreports54 derived famil(ies) accounted for — 53 run, 1 NOT-MEASURED (1 DERIVED from a recorded exit 3)and exits 0.Session: https://claude.ai/code/session_017ihL2gLghEqeDKTbDTC7Zd
🤖 Generated with Claude Code