Repository navigation
fix(plugin-sharing): the declared-rule organization walk ends on the rows read; ADR-0131 small carriers retire the NULL-means-global texts - #25266
Conversation
…on the rows read, and a row with no readable id answers unknown Claude-Session: https://claude.ai/code/session_01M7Q2xAsaBG8KpAYgUxtSdU Co-authored-by: Claude <noreply@anthropic.com>
…, the ceremony and semantic-entry wording, and stale citations Claude-Session: https://claude.ai/code/session_01M7Q2xAsaBG8KpAYgUxtSdU Co-authored-by: Claude <noreply@anthropic.com>
… retired Claude-Session: https://claude.ai/code/session_01M7Q2xAsaBG8KpAYgUxtSdU Co-authored-by: Claude <noreply@anthropic.com>
…-security translation bundles; changeset Claude-Session: https://claude.ai/code/session_01M7Q2xAsaBG8KpAYgUxtSdU Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 5 package(s): 17 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: ⛔ 12 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails. What this run could not see
Coarse fallback — 154 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 453e82eaa8b378effbaada2d4b0cb905492c8082 && git checkout 453e82eaa8b378effbaada2d4b0cb905492c8082
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 0f1eeeeeb754fc7bbfe64d89e2a305048a75ac7c 0a71e50d7229d1b13564c89da4dcbb8a3c65b347 && git checkout -B drift-repro 0f1eeeeeb754fc7bbfe64d89e2a305048a75ac7c && git merge --no-ff 0a71e50d7229d1b13564c89da4dcbb8a3c65b347
node scripts/docs-audit/affected-docs.mjs --json 0f1eeeeeb754fc7bbfe64d89e2a305048a75ac7c
|
Contract reviewServed-tier: Inputs read: card #25203 (body, seat notes 6339857021 / 6342226941 / 6345275520, claim 6346494581, dev report 6347774192); plan amendment 6254164222 on #15212 for item 1's rule only; PR #25266 body, file list (20 files, +96/−50) and the net diff against merge base ① Derived judgmentsItem 1 — the one behaviour change,
Item 3 — the retired NULL-means-global texts.
Item 2 — wording.
Item 6 — Item 7 — Item 8 — Tracker numbers in shipped text. A sweep of every added line in the net diff finds one, ② Semver level
③ Boundary flagsDev deviations (report 6347774192), each disposed:
Out-of-scope items, named and disposed: item 4 landed with #25210 (seat note 6339857021); item 5 is a Gates the dev left to CI, read on the head: Check-runs on Observations for the seat (not verdict-bearing):
Implemented-by: VERDICT: PASS Generated by Claude Code |
席位核对ACCEPT ·
|
Requested by Bill · project thread
Part of #25203
Part of #15212
Clause-②: no
Metadata-protocol: none
Claim 6346494581 (
domain:engineseat 2, card threadsession_01M7Q2xAsaBG8KpAYgUxtSdU). Items 1, 2, 3, 6, 7 and 8 of the card. Item 4 landed with #25210. Item 5 is a governed.claude/**line and goes to the skills lane. Items 9 and 10 (comment 6345275520) wait on #25246 and are not in this claim. So this PR isPart of #25203, notFixes: the card stays open for items 5, 9 and 10 (seat correction after the contract review).What changed
Item 1, the one behaviour change:
resolveDeclaredRuleScopes(packages/plugins/plugin-sharing/src/sharing-plugin.ts).sys_organizationfiltered each page to string ids, then tested the FILTERED page for "short page, stop". A full page of 500 rows holding one row with no readableidread as short, so the walk ended there and answered a partial list. The boot sweep then revoked the declared-rule grants of every organization past that page.idthe walk cannot read answers unknown (null), with a warning that names the cause, as the epic's plan amendment 6254164222 prescribes ("treat a filtered-out id as a failed read"). The caller already treatsnullas UNKNOWN: no declared rule is served, and no declared rule's grant is revoked.sys_organization.idis a text field, so no shipped install produces such a row.sharing-rule.test.ts, "a FULL page holding a row with no readable id answers unknown (null) …". 1201 organizations, row 10 of the first page loses its id.Item 2, wording.
18.sharing-rule-declared-mirror-retired.tsreason: the D13 paraphrase. ADR-0131 D13 asks an ADR-0087 entry of every retirement of an authorable shape. The text now says this entry is registered by choice, because the seeder is not one. (The reconciliation's suggested text named a card number; the repo's runtime-string rule keeps tracker numbers out of shipped text, so the sentence carries the reason instead.)18.driver-read-scope-follows-tenant-wall.tssurface: names update and delete "by id or by predicate".packages/cli/src/commands/migrate/organization-ownership.ts: the printed warning "(but on a table whose column is not the tenancy anchor): assign …" now reads ", except on a table whose column is not the tenancy anchor. Assign …". The same idiom is fixed in the comment aboveunattributableHeldand in theheldUnattributabledocblock (organization-ownership-apply.ts).Item 3, texts of the retired NULL-means-global reading.
sys-user-position.object.ts: the docblock and the Organization help. An assignment applies only while its organization is the active one, and an organization-less row applies nowhere (grantAppliesInTenant,packages/core/src/security/resolve-authz-context.ts).sys-user-permission-set.object.ts: the Organization help ("Optional organization scope. NULL = applies in every org context." → "The organization this grant belongs to.").plugin-security'senbundle was regenerated withnode scripts/check-i18n-bundles.mjs --write. Thezh-CN,ja-JPandes-ESvalues are hand-written and were updated to match, because merge mode keeps translated values.packages/spec/src/contracts/email-service.ts(theIEmailServiceorganizationIdTSDoc), not inplugin-email. It now says the engine stamps the organization it can derive or refuses the insert (ADR-0131 D9), and leaves the row unstamped only in a composition with no organization object.packages/verify/src/harness.ts,inviteForAudienceGate: the dedicated organization id hides these invitations from fixtures under a wall only. Onsinglean organization owner's read returns them too.packages/spec/scripts/liveness/empty-state-registry.mtsloses itssys_user_permission_set.organization_idrow. That row classified the "NULL = applies in every org context" statement this card removes, andcheck:empty-stateredsSTALE — registered, but the statement is gonewithout the removal (measured).Item 6.
schedule-organization.zod.tscited the deletedobjectql/src/tenancy/platform-object-tenancy.tsledger. It now citesservice-automation/src/suspended-run-store.ts, where the store stamps a run's row.content/docs/references/automation/schedule-organization.mdxwas regenerated (check:generated --fix, then re-checked green).Item 7.
content/docs/permissions/tenant-audit-census.mdx, the gate order's second item: the engine setsbypassTenantAuditon anisSystemwrite only where the object's schema puts it out of scope (no tenant field, or federated), asbuildDriverOptionsdoes today.Item 8.
delivery-claim-tenant-audit.integration.test.ts: the docblock quoted the driver's old warning tail. It now quotes the opening and says the prescription after the dash has been reworded. The assertions are unchanged.Tests
At head
0a71e50d7:plugin-sharingpnpm test: 53 files, 1201 tests passed.plugin-securitypnpm test: 208 files, 4274 passed, 45 skipped.cliunit tier,organization-ownershipfiles: 8 files, 76 passed.specsrc/migrations+scripts/liveness: 17 files, 579 passed.typecheck: plugin-sharing, plugin-security, cli, verify, service-messaging, spec, all exit 0.scripts/ablation-replace.mjs, the old filtered-page block put back): the new pin went red (1 failed, 5 passed), every otherresolveDeclaredRuleScopestest stayed green. Restore verified: blob equal toHEAD,git diff HEADempty. The suite imports./sharing-plugin.jsfromsrc, so nodistleg applies.Gates
node scripts/pm/dispatch-gates.mjs --commandsat0a71e50d7derived 124 families.--ranreconciliation: 122 run, all exit 0; 2 NOT MEASURED (exit 3, prerequisite not met on this checkout), left to CI:check:dual-build-cjs-loads(needs a whole-workspace build) andcheck:i18n-coverage(one of 14 configs could not lint here).check-plugin-teardown-shape --self-testandcheck:skill-examplesfirst exited 3 on missing prerequisites (a pinned fixture commit, the client builds) and exited 0 once those were fetched and built.Acceptance notes
Published text, per item:
@objectstack/plugin-sharingbehaviour and a new warning string. Published.@objectstack/spec's upgrade guide and registry. Published. No check reads their wording, andcheck:upgrade-guide/check:spec-changesare green. The cli warning is a runtime string in@objectstack/cli. Published. The two cli comments are not.descriptions and the four locale bundles ship in@objectstack/plugin-security. Published. TheIEmailServiceTSDoc ships in@objectstack/spec's.d.ts. Published. The position docblock and theverifycomment are not published.*.zod.ts, which@objectstack/specships verbatim (filesincludessrc/**/*.zod.ts). Published. The reference page is docs.patchchangeset covers the four published packages (Metadata-protocol: none).Not changed here (no drive-by): the
sys-user-permission-set.object.tsdocblock still calls an organization-less grant "platform-wide" when it explains the unique index's NULL-safety;tenant-audit-census.mdxkeeps its historical narrative about the old mute further down. Neither is named by the card.Cross-lane declarations (not claims):
domain:clion #22648 (6346689477),domain:devxon #20163 (6346705267, forcontent/docs, which the lane table assigns to devx),domain:specon #18549 (6346927889),domain:serviceson #21118 (6346947858,plugin-sharing,plugin-security,service-messaging).Generated by Claude Code