Commit ab47816
revert(plugin-sharing): drop the NULL-inclusive business-unit screen before 17.3; keep the strict member screen (#15078)
* revert(plugin-sharing): drop the NULL-inclusive business-unit screen before 17.3
Restore `BusinessUnitGraphService.orgScope` to the strict
`organization_id = <rule org>` equality 17.2.0 ships, byte-identical to its
form before e560b4d (#14949), and delete the docblock that argued for the
NULL-inclusive shape. Maintainer ruling, ADR-0131 D8: that shape re-implements
the predicate `SqlDriver.applyTenantScope` already owns, a second time in a
second place, which is the duplication ADR-0131 exists to retire (#10103
cause 1) — and it had not shipped, so reverting costs nothing while releasing
it would owe v18 a breaking change and a migration.
KEPT, untouched: `memberScope` (byte-identical to origin/main) and
`SharingRuleService.warnOnEmptyUnitExpansion`. Both member reads previously
carried no organization predicate at all; a strict unit screen narrows which
units are reachable but does not close that, because other organizations'
member rows sit on org-stamped units too.
#14547 therefore remains open and behaves as in 17.2.0. It is fixed
structurally on the v18 line by ADR-0131 C1.
Tests: the cases that pinned the NULL-inclusive unit screen now pin the
restored behaviour and name #14547 as the open defect they reproduce. The
member-screen pins are re-anchored from a seeded (org-less) unit onto an
org-stamped one — with the unit screen strict, an org-less unit is invisible to
an org-stamped rule, so those assertions would otherwise pass with
`memberScope` deleted. See the PR body.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AUF1NoViznQK32gqpK8wS8
* docs(plugin-sharing): state #14547's tracker status accurately in the reverted screens
#14547 is CLOSED as completed — closed by #14949, whose unit half this branch
reverts — so calling it "the OPEN defect" in the pins would have been wrong on
a checkable fact. The tests name #14547 as the defect they reproduce and say
plainly that its tracker state no longer matches the 17.x runtime, leaving the
reopen decision to the maintainer rather than asserting it.
Comment-only; no assertion, fixture or method body moves.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AUF1NoViznQK32gqpK8wS8
* docs(changeset): correct #14949's unreleased entry to describe only what 17.3 ships
`.changeset/bu-tenant-screen-relanding.md` is still on main and unconsumed, and
it announces as shipped fact the half this branch reverts: "orgScope now applies
the platform's null-inclusive screen", under a headline claiming the seed-data
under-grant is fixed. Both changesets compile into the same 17.3 notes, so
leaving it would ship two contradictory patch entries for one package and tell
users a tenancy fix landed that did not.
Corrected surgically: the headline and the orgScope paragraph now state that the
unit half was reverted and that the seed-data symptom remains as in 17.2.0,
fixed structurally in v18 by ADR-0131 C1. The member-screen and warn paragraphs
are kept — those DO ship — with one sentence rewritten, since the leak they
close does not depend on the unit screen having been widened.
⛔ No code from #14949 outside this card's scope is touched: sharing-rule-service.ts
and sharing-rule.test.ts are untouched, and this is not `git revert e560b4d`.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AUF1NoViznQK32gqpK8wS8
* docs: carry the v18 decision citation as PR #14976, not as an ADR-0131 anchor
`check-adr-anchors` is red on the previous head: this branch cited `ADR-0131`
22 times and `docs/adr/0131-*.md` does not exist — ADR files stop at 0130 and
PR #14976 (which would author it) is open and draft. The gate treats an
unresolvable ADR id as a citation squat: whoever later writes a real ADR-0131
would retroactively falsify every one of those citations at once (#6634).
No legitimate forward-reference form exists. The gate's only citation exemption
is CROSS_REPO_QUALIFIERS (objectui / object-ui / cloud), so a repo qualifier is
skipped but `ADR-0131 (PR #14976)` is not — the qualifier must be a sibling
repo, not a PR. Its allowlist is shrink-only and documented to stay empty.
⛔ Deliberately NOT done: no allowlist entry, and no `docs/adr/0131-*.md`
created here — that file belongs to PR #14976 and `docs/adr/**` is governed.
Every citation now reads "the v18 org-ownership decision (PR #14976)", keeping
the decision letters (D8 / C1) that carry the actual meaning. Issue and PR
references (#14547, #14949, #10103, #13564) are untouched — they resolve.
Substance is unchanged; the ADR id can be restored once #14976 lands.
check-adr-anchors now exits 0: "OK (53 anchored file(s) … 31871 citation(s)
across 4202 file(s) resolve)".
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AUF1NoViznQK32gqpK8wS8
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 6665c5c commit ab47816
5 files changed
Lines changed: 328 additions & 177 deletions
File tree
- .changeset
- packages/plugins/plugin-sharing/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
0 commit comments