Repository navigation
docs(spec): the security-service contract describes an empty optional controlled_by_parent master reference - #31126
Conversation
… controlled_by_parent master reference The master_chain leg, the master_reference_missing reason, the allow outcome and checkControlledByParentWrite's own description now say what the write gate does since ADR-0055 §3 as amended 2026-11-07: a record whose optional master reference is empty is written by its owner or by Modify All on its object, and a master above it whose optional master is empty ends the chain under that row's owner rule. JSDoc only. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ihL2etQ7BmrJuMddPx75W
… name the optional-master owner rule Applies the independent review's findings: a principal with no permission sets answers on master_chain, not object_permission, for a record whose optional master reference is empty; the owner rule is part of the master check's answer; a row with no owner, or of an object without owner_id, is Modify All's alone. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ihL2etQ7BmrJuMddPx75W
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ihL2etQ7BmrJuMddPx75W
|
domain:spec#4 · marchtian · session_017ihL2etQ7BmrJuMddPx75W Independent full review (Fable) · 2026-11-07T13:27ZReviewer: a fresh Fable subagent, given the diff, the card body and the ruling, and pointed at the code of record ( Round 1, head 4540692: PASS, 0 must-fix, 1 should-fix, 3 nits. Verified against the gate: the record's own empty optional master (owner rule, refused on
Round 2 (delta), head e6e69d5: PASS, 1 nit (a 122-column line from the edit), applied in 6e4fd17 as a rewrap only. The ⛔ lines at the end of the member docblock are intact; the changeset's level and declarations are correct. Verdict on 6e4fd17: PASS, no open must-fix or should-fix. |
📓 Docs Drift CheckThis PR changes 1 package(s): 3 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 5 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 171 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 8ca346d4e26b5cf2c7b97d0e0d0393707c622c7a && git checkout 8ca346d4e26b5cf2c7b97d0e0d0393707c622c7a
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 5f0037449256ccb0855e258ffc4fd4bff84d1a67 6e4fd170aca9868b5b662999597e6ce24945e613 && git checkout -B drift-repro 5f0037449256ccb0855e258ffc4fd4bff84d1a67 && git merge --no-ff 6e4fd170aca9868b5b662999597e6ce24945e613
node scripts/docs-audit/affected-docs.mjs --json 5f0037449256ccb0855e258ffc4fd4bff84d1a67
|
|
domain:spec#4 · marchtian · session_017ihL2eHDXrsKgGAUHq956U Contract reviewServed-tier: ① Derived judgmentsAccept set and public surface: unchanged. A comment-stripped diff of Every changed sentence, against
Nothing in the diff moves a type, a union member, an export, a ② Semver levelConsistent: ③ Boundary flags
④ Design judgment
Implemented-by: VERDICT: PASS |
|
domain:spec#4 · marchtian · session_017ihL2eHDXrsKgGAUHq956U 维护者速读
席位意见:ACCEPT。逐句对照写门代码均成立;同文件另有一处早已存在的遗漏(未提 席位核对
|
Requested by 田騏 · project thread
Fixes #31094
Clause-②: no
Metadata-protocol: none
维护者速读
packages/spec里安全服务契约的注释(JSDoc):master_chain拒绝、master_reference_missing原因、allow结果和checkControlledByParentWrite自身说明,现在都写明「可选主表为空」的行按属主规则判:属主或该对象「修改全部」可写,其他人在master_chain上被拒;链上某一跳的可选主表为空时,链在那一跳按同一规则结束。必填主表为空仍是原来的答案。packages/spec/src/contracts/security-service.ts里ControlledByParentWriteDenialLeg的master_chain一条。git diff origin/main -- packages/spec/src/contracts/security-service.ts,预期只有注释行变化。What changes
JSDoc only, in
packages/spec/src/contracts/security-service.ts, plus an'@objectstack/spec': patchchangeset. Each sentence was checked against the write gate (packages/plugins/plugin-security/src/security-plugin-cbp-write-gate.ts) and PR #31082's tests (controlled-by-parent-optional-master.test.ts), under ADR-0055 §3 as amended 2026-11-07 (maintainer ruling 「A」 on #30905 / #30906):ControlledByParentWriteDenialLeg: the intro andmaster_chainnow cover the record whose own optional master reference is empty (refused to a principal who neither owns it nor holds Modify All on its object; a row with no owner, or of an object withoutowner_id, is Modify All's alone), and a master above whose optional master is empty (the three legs run on it, then that row's owner rule ends the chain). Only a required master's empty reference above the record is the chain-walk refusal the old text described.ControlledByParentWriteUnresolvedReason:master_reference_missingis a stored required master reference left empty; an empty optional one answersallowordenyonmaster_chain.ISecurityService.checkControlledByParentWrite: "requires EDIT access to its master, or, where its optional master reference is empty, ownership of the record or Modify All on its object".Beyond the card's three items, the same file's sentences that the ruling also made false were corrected in place (same defect class, same file): the
allowbullet ofControlledByParentWriteOutcome, the "answers the master check alone" sentence, and the empty-permission-set bullet (such a principal answers onmaster_chain, neverobject_permission, for a record whose optional master is empty). The ⛔ lines at the end of the member's docblock are untouched.Tests
No behaviour change, so no test is added. The behaviour the text describes is pinned by
packages/plugins/plugin-security/src/controlled-by-parent-optional-master.test.ts(ISecurityService.checkControlledByParentWrite answers as the write path does, including the required-mastermaster_reference_missingcontrol).Acceptance notes
content/docs/references/**has no hit for these names, andapi-surface/contracts.json/export-origins/contracts.jsonlist the type names only, so nothing is regenerated.allowbullet does not mention thesharing.controlledByParent.ownerMayEditopt-in leg (ADR-0055 §3 amendment of 2026-10-26), through which a by-id update by the row's owner with READ on the master also resolvesallow. Handed to the seat for a separate card.Verification
Local gates on the final head are listed in the card's
os-dev-report; CI runs the full set.Generated by Claude Code
🤖 Generated with Claude Code