docs: fix BU subtree attribution in two docstrings (#8098) - #8168
Conversation
#7807 (PR #8097, 9b51981) narrowed the business_unit sharing-rule recipient to expand exactly one unit's members; unit_and_subordinates kept the subtree walk. These two docstrings never got the memo and still attributed the subtree expansion to business_unit. Correct the Drives: attribution in both. Fixes #8098
Measured: IBusinessUnitGraphService (packages/spec) and SysBusinessUnit (packages/platform-objects) docstrings both reach built dist/**/*.d.ts hover surfaces, so patch changesets are needed for both packages.
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
📓 Docs Drift CheckThis PR changes 2 package(s): 106 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
⛔ 7 release-owned page(s) also reference the affected code. These are read-only:
|
Fixes #8098
What changed
Two docstrings still attributed the BU subtree expansion to the
business_unitsharing-rule recipient, after #7807 (PR #8097,9b519815)narrowed
business_unitto expand exactly one unit's members and moved thesubtree walk onto
unit_and_subordinates. BothDrives:bullets arecorrected to name
unit_and_subordinatesas the subtree consumer, andbusiness_unitas the narrow (single-unit) one — mirroring the vocabularybusiness-unit-graph.ts:47-52already uses for this exact split:packages/spec/src/contracts/sharing-service.ts— theIBusinessUnitGraphServicedocstring. The walk description above theDrives:bullet stays as-is: it correctly describes whatexpandUsers(the contract member) does. Only the attribution — whichrecipient that walk drives — was wrong.
packages/platform-objects/src/identity/sys-business-unit.object.ts— thesame
Drives:bullet on thesys_business_unitobject docstring.Why (the #7807 split)
#7807 found that
business_unitandunit_and_subordinatessharing-rulerecipients were both resolving through the same subtree walk
(
BusinessUnitGraphService.expandUsers), so a rule anchored at a divisionsilently reached every department and office beneath it — an over-grant.
PR #8097 split the two:
business_unitnow resolves through the newexpandUnitMembers(exactly one unit's members), whileunit_and_subordinateskeepsexpandUsers(the subtree walk). The spec'sauthoring declaration (
ShareRecipientType) and the lint red-line table werealready correct throughout and were explicitly out of scope for #8097; these
two docstrings are prose on the graph-service contract and the object
definition that never got updated to match.
Acceptance-invariance evidence
Every changed line is a comment line inside a JSDoc block — no non-comment
line changes, so the acceptance/validation face is byte-identical before and
after:
Changeset — MEASURED, not assumed
The two triage comments disagreed (docs-only ⇒
skip-changesetvs. patch). Decidedby this lane's criterion: does the prose reach a consumer (reference page,
dist/**/*.d.tshover, or a parse-reachable error string)?Reference pages: the docs generator walks
.zod.tsfiles only(
build-docs.ts:186). Neithersharing-service.ts(a plain.tscontractfile) nor
sys-business-unit.object.tsis a.zod.tsfile, so neitherfeeds a reference page.
packages/specbuilt.d.tshover —IBusinessUnitGraphServiceisexported, so built:
Result — hit:
packages/spec/package.jsonshipsdistin itsfilesfield, so thisreaches a real consumer's editor hover. ⇒ patch for
@objectstack/spec.packages/platform-objectsbuilt.d.tshover —SysBusinessUnitisexported from the package root:
Result — hit:
packages/platform-objects/package.jsonshipsdistin itsfilesfield too, and
SysBusinessUnitis re-exported fromdist/index.d.ts.⇒ patch for
@objectstack/platform-objects.Conclusion: both hit ⇒
.changeset/bu-subtree-docstring-attribution.mdadded with
"@objectstack/spec": patchand"@objectstack/platform-objects": patch. Noskip-changesetlabel applied.Tests / local gates
All run from a fresh worktree at
origin/main@a0151e98, build-closure-first,under the shared verification lock:
No non-comment line changed in either touched file (see the diff above), so no
new/updated behavioural tests were needed; the
plugin-sharingsuite pins theruntime behaviour these docstrings now describe correctly.
Generated by Claude Code