Repository navigation
docs(skills): the data skill says where Modify All lifts the delete floor, and that hiding a field keeps the object read - #39140
Conversation
…loor, and where it does not `skills/objectstack-data/rules/security.md`, the Three axes list. The delete bullet now says that `writeScope: 'org'` or `modifyAllRecords` widens `allowDelete` only on a `private` or `public_read` object with `ownership: 'user'`, that on `public_read_write` neither does (403 on rows others created, Modify All included), and that an authored `delete` row policy does on any object, with one example for each shape. The gloss on `viewAllRecords` / `modifyAllRecords` drops "super-user" and names the exception. Read from `SharingService.writeVerdicts` (plugin-sharing): a public write default or an object with no owner field answers `abstain` before ownership and before the Modify All probe, and the security plugin drops the platform's `owner_only_deletes` floor only on `allow`. The skills token ratchet row for the file moves 4823 -> 4902, at the measurement, under the standing ruling of record 6513306068. Claude-Session: https://claude.ai/code/session_01Utp6CYDwDNvMX7Fd86mSTF Co-authored-by: Claude <noreply@anthropic.com>
…the object read `skills/objectstack-data/rules/security.md`, § Field visibility, the Position-dependent bullet: hiding one field keeps the object's `allowRead` and adds a `readable: false` row for the field; the object is never left out of the set, which would hide every record of it from the role. The section taught the `fields` row and did not say the object grant stays. One fresh scratch build of the requisition card on this text (workspace packages, haiku at medium effort) kept the read and wrote the row; two builds of an earlier round left the object out. The clause states the half that was implied. The skills token ratchet row for the file moves 4902 -> 4950, at the measurement. The changeset covers both bullets of this branch. Claude-Session: https://claude.ai/code/session_01Utp6CYDwDNvMX7Fd86mSTF Co-authored-by: Claude <noreply@anthropic.com>
…e-word gate refuses `pnpm check:role-word` (ADR-0090 D3) refused the clause the previous commit added to `skills/objectstack-data/rules/security.md`. It now ends "which hides every department with it". The ratchet row follows the file to its measurement, 4950 -> 4949 tokens (19799 -> 19793 bytes). Claude-Session: https://claude.ai/code/session_01Utp6CYDwDNvMX7Fd86mSTF Co-authored-by: Claude <noreply@anthropic.com>
…te bullet (#38963) A scratch `leave_balances` build that followed the new bullet gave the HR set an authored `delete` row policy on the `public_read_write` request object, and the delete was still refused 403. Measured on a `bootStack` probe with the real SecurityPlugin: the engine authorizes each `cascade` child as the caller, so a child object without `allowDelete`, or a `public_read_write` child without its own `delete` policy, refuses the parent's delete; a `controlled_by_parent` child needs only `allowDelete`. One sentence in `skills/objectstack-data/rules/security.md` says so, paid for in part by shorter wording in the same bullet and in the field-hiding clause. The ratchet row follows the file to its measurement, 4949 -> 4959 tokens (19793 -> 19834 bytes). Claude-Session: https://claude.ai/code/session_01Utp6CYDwDNvMX7Fd86mSTF Co-authored-by: Claude <noreply@anthropic.com>
…aster, not allowDelete alone (#38963) The cascade sentence of the previous commit said a `controlled_by_parent` child needs "`allowDelete` only". The next scratch `leave_balances` build followed it (delete policies and `allowDelete` on both children) and its HR delete was still refused: "delete on 'demoleave_leave_day' requires edit access to its master record". A second `bootStack` probe measures it on a `private` and on a `public_read_write` parent: the child's cascade delete needs edit access to the master row (Modify All, or `allowEdit` with a row the caller may edit), as `rules/relationships.md` already says of every write under `controlled_by_parent`. The sentence now reads "Each `cascade` child needs its own `allowDelete` and row rule too (`controlled_by_parent`: edit on the master row)." The ratchet row follows the file to its measurement, 4959 -> 4967 tokens (19834 -> 19868 bytes). Claude-Session: https://claude.ai/code/session_01Utp6CYDwDNvMX7Fd86mSTF Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack@os-bill · os-bill · session_01Utp6CaQsbKBMQtm6Tpsamd Contract review brief — PR #39140 @
|
|
repo:objectstack@os-bill · os-bill · session_01Utp6CaQsbKBMQtm6Tpsamd Contract reviewServed-tier: ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgment
No sentence was found that contradicts
Findings: 0 must-fix, 4 should-fix (one on the text, three for the seat), 2 nits. Implemented-by: VERDICT: PASS |
|
repo:objectstack@os-bill · os-bill · session_01Utp6CaQsbKBMQtm6Tpsamd 速读 — 数据 skill 的 security.md 讲清: 席位核对Verdict: ACCEPT at head
|
|
repo:objectstack@os-bill · os-bill · session_01Utp6CaQsbKBMQtm6Tpsamd 席位核对 — ACCEPT · head
|
|
repo:objectstack@os-bill · os-bill · session_01Utp6CaQsbKBMQtm6Tpsamd Contract reviewServed-tier: ① Derived judgments
② Semver levelUnchanged: ③ Boundary flags
④ Design judgment
No must-fix, no should-fix. Implemented-by: VERDICT: PASS |
|
repo:objectstack@os-bill · os-bill · session_01Utp6CaQsbKBMQtm6Tpsamd 维护者速读
Review requested · 2026-12-02T15:24Z · Tier H ( |
Requested by Bill · project thread
Fixes #38963
Fixes #38964
维护者速读
What changes
One file of the published
objectstack-dataskill,skills/objectstack-data/rules/security.md, two bullets. No platform behaviour changes.1. Deletes (the Three axes list). The gloss on⚠️ not a
viewAllRecords/modifyAllRecordsread "super-user, bypass sharing". It now reads "bypass sharing;public_read_writedelete, below". The delete bullet becomes:2. Hiding one field (§ Field visibility, the Position-dependent bullet). Added:
3. The skills token ratchet row for the file, in
scripts/check-skills-token-ratchet.mjs, moves 4823 to 4967 tokens, at the measurement (19290 to 19868 bytes, +578 bytes, +144 tokens: 79 for the delete text, 47 for the field clause, 18 for the cascade sentence after the shorter wording that pays for part of it). Authority, both quoted verbatim and untranslated:What is deleted in the same file: the old delete bullet's clauses on the
privatecase and "elsewhere", and the gloss's "super-user", all replaced. No other sentence in the file restates either teaching, so there was nothing more to cut; the rest of the raise is the measured remainder.Size readings (lines first, then tokens as the ratchet counts them):
f6b008e8)697ba474)rules/security.md, linesrules/security.md, bytes / tokensSKILL.mdin the pack, lines / bytesThe dispatch gave a net budget of +15 lines; the file takes +7.
The reading this teaches, and its source (#38963)
The card asks the PR to say which reading of the platform it teaches. It teaches the platform as
f6b008e8runs it:packages/plugins/plugin-sharing/src/sharing-service.ts:290-291:public_readmaps to thereadmodel;public_read_write(andcontrolled_by_parent) topublic.sharing-service.ts:1400-1401, inwriteVerdicts, the one implementation behindcheckDelete(:1311): a public write default answersabstain, and so does an object with no owner field. Both are decided once, before any row is read, before ownership and before the Modify All probe, which is asked last (:1489).packages/plugins/plugin-security/src/security-plugin-sharing-verdicts.ts:304:resolvePreImageFloorDropreturnsverdict === 'allow'. An abstain keeps the platform's ownership floor.packages/plugins/plugin-security/src/platform-ownership-policies.ts:280-281:owdOpenWritesCoversOperationisupdateonly, sopublic_read_writeopens cross-creator updates andowner_only_deletesstays.packages/plugins/plugin-security/src/objects/default-permission-sets.ts:1017-1022: the floor itself,owner_only_deletes, object*, operationdelete,created_by == current_user.id, bound toorg_member.deletepolicy admits a row the caller neither created nor owns:packages/plugins/plugin-security/src/explain-enforce-parity.test.ts:1391(by id, on a private object) andpredicate-write-floor-deferral.test.ts:975onward (predicate writes, "r3 and r4 by the policy alone").Probe: the delete verdict of SharingService.checkDelete for a caller who owns nothing, per sharing model
A scratch vitest file in
packages/plugins/plugin-sharing/src(the suite's own fake engine and schemas; not committed), run atf6b008e8: 4 passed.writeScope: 'org'private,owner_idpublic_read,owner_idpublic_read_write,owner_idprivate, noowner_idSo "bypass sharing" was true only where record sharing enforces writes, and the old bullet's "On a
privateobject" left outpublic_read, where both wideners work as well.The card's platform question is already ruled, and not yet built. The card asks whether "the more open object is the harder one to delete from" is intended, and lists #38517 as a different 403. Ruling 7288570890 on #38517 (2026-11-30, option C, 「删除统一跟着负责人走」) answers it: on a
public_read_writeobject with an owner column, delete will follow the record's owner as it does onprivate/public_read, a Modify All holder included, andowner_only_deletesstops deciding delete there. That runtime change has not landed (#38517 is open with no pull request; set 5 of the cascade probe below still measures the refusal on this branch's base). The ruling's execution list already names a skills follow-up for this bullet. So this PR teachesmainas it runs today, and the sentence "Onpublic_read_writeneither does" has to be rewritten by that follow-up when the runtime lands. Whether to land this text now or hold it for #38517 is the seat's call; it is raised in the report on the card.The
leave_balancesre-runs, and the cascade sentence (#38963)run-scenarios --only leave_balances --modes scratch --packages workspace --author-model haiku --author-effort medium --ask-model haiku --no-iterate-run.Run at
ca78d632(the delete bullet without the cascade sentence). Build 134/134, iterate Build 149/149, Run operations 4/7.demoleave_leave_requestispublic_read_write, anddemoleave_hr_officerholdsallowDeletewith no Modify All and the authored policy{ name: 'hr_deletes_closed_requests', object: 'demoleave_leave_request', operation: 'delete', using: "status == 'withdrawn' || status == 'rejected'" }.persona-grant:hr_officer:demoleave_leave_request:deleteis no longer a fail. The scorer reports it NOT MEASURED ("only row policy hr_deletes_closed_requests could admit it, which depends on the row"); by its design it never passes a grant that rests on an authored policy (deleteFloorReading,packages/qa/scenarios/src/score/scenario-tags.ts).delete_withdrawn_requestashr_officerwas still refused: 403PERMISSION_DENIED, "You do not have permission to perform this action", rowlr_100present. The seed giveslr_100twoleave_dayrows and oneapproval_steprow, bothcascadechildren; the build's HR set has noallowDeleteondemoleave_approval_step, apublic_read_writeobject.Cause, measured.
cascadeDeleteRelationsauthorizes every child row as the caller (packages/plugins/plugin-security/src/security-plugin-authz-middleware.ts:223-225and:1296-1299: the cascade arm "keeps the operator's own delete authority").Probe: DELETE of a public_read_write parent row the caller did not create, by the caller's set and the row's cascade children
A scratch dogfood test (
bootStack, the real SecurityPlugin,orgContext: true, RESTDELETE /data/pq_req/ID; not committed), run on this branch: every row created by the admin, statuswithdrawn. Unless said, the set holdsallowDeleteon the parent, the authored policy above, and areadable: falserow on one parent field.controlled_by_parentcascade childpublic_read_writecascade childallowDeleteon stepowner_only_deleteson the child)deletepolicy on stepallowDeleteon both childrenallowDeleteon dayA row the policy does not admit (status
approved) is refused 403 for every set.So the authored policy does admit the parent row (rows 1 to 4, "no child"), a hidden field does not block the delete (1 against 2), and what refused the build's delete is the cascade leg. Commit
0069878fadded a cascade sentence that ended "(controlled_by_parent:allowDeleteonly)".Run at
0069878f(with that sentence). Build 128/128, iterate Build 141/141, Run operations 6/7.allowDeleteand an authoreddeletepolicy on the request and on both cascade children. This build made the requestprivate, and gave HR read and delete on it, noallowEdit.delete_withdrawn_requestwas refused again, for a different reason: 403, "delete on 'demoleave_leave_day' requires edit access to its master record (no edit permission on master 'demoleave_leave_request')". The parenthesis "allowDeleteonly" was wrong: probe 1 always heldallowEditon apublic_read_writeparent, so it never met this gate.Probe 2: DELETE of a parent row the caller did not create, with a controlled_by_parent cascade child
Same harness, not committed. Every set holds read with View All and
allowDeleteon parent and child; the delete policy and the update policy admit the row.private: no child / with childpublic_read_write: no child / with childallowEditallowEditallowEdit, an authoredupdatepolicyallowEditallowEditThe skill already says it of every write under
controlled_by_parent(skills/objectstack-data/rules/relationships.md, § Writes undercontrolled_by_parent: "every write needs edit on the master"). Commit697ba474corrects the sentence to "Eachcascadechild needs its ownallowDeleteand row rule too (controlled_by_parent: edit on the master row)."Run at
697ba474(the final text). Build 125/125, iterate Build 139/139, Run operations 6/7.persona-grant:hr_officer:demoleave_leave_request:deletepasses ("demoleave_hr_officer grants it"), anddelete_withdrawn_requestashr_officeris applied:lr_100is gone, with its day lines and its approval step.demoleave_leave_requestanddemoleave_approval_stepareprivate,demoleave_leave_dayiscontrolled_by_parent; the HR set holds read, create, edit and delete with View All and Modify All on all three, and an authoreddeletepolicy on the request and on the approval step.manager_approves_step_one(the agent attempted no write), outside both cards.One build per text. The three losses and the pass are each a single author's choice of sharing model and grants, so this shows the final text is enough for one build, not a rate.
The cause, from one scratch build (#38964)
run-scenarios --only requisition_to_receipt --modes scratch --packages workspace --author-model haiku --author-effort medium, the configuration of the round that filed the card. The scaffold's.claude/skills/objectstack-data/rules/security.mdwas byte-equal tof6b008e8's (the working tree held this branch's delete bullet uncommitted when the run started; it was not packed).persona-grant:requester:demopurchase_department:read,persona-grant:buyer:demopurchase_department:readandpersona-grant:dept_manager:demopurchase_department:readpass. Author turn: success, 89 of 300 turns, servedclaude-haiku-5-5.demopurchase_requesteranddemopurchase_buyer:demopurchase_department: { allowRead: true }inobjects, and'demopurchase_department.budget': { readable: false, editable: false }infields. That is the shape the card wants. The recording shows the author readrules/security.mdwhole.travel_expense(docs/qa/scenarios/builds/travel_expense.json, another author) has the same correct shape.What that names:
personaGrantNeedsasks forreadondepartmentbecause the personas hide a field of it, not the object; a set that keeps the read passes. The cards say only the budget is private.fieldsrow in the sets that differ".departmentout ofobjectsor wroteallowRead: falsestays unmeasured. The clause added here states the missing half next to the rule.Whether the clause lowers the rate at which a build drops the object is NOT MEASURED: one build passed before the change, so one more passing after it would show nothing. That takes an eval round with repeats.
Why
privatecase.departmentobject from the roles.Tests
No package source, test or fixture changes; no ablation (documentation and a ratchet row). Local gates from
dispatch-gates.mjs --commands: see Verification.Acceptance notes
#38963
owner_only_deletes, and names the two shapes that do, each with a short example.leave_balancesscratch re-run showspersona-grant:hr_officer:demoleave_leave_request:deleteanddelete_withdrawn_requestpassing: at697ba474, the third re-run. The two before it, on earlier wording of this PR, did not, and each named a gap the next commit closed (section above).#38964
requisition_to_receiptpassed the three checks before the change, so a pass after it would not be evidence for the change;travel_expensewas not built.Noted, not changed here:
evals/hooks-security-seeds-datasources.json) covers theprivatedelete case and no pin of it moves. No eval covers thepublic_read_writecase; the file surface of this card did not include a new one.po_lineand the requester a create ongoods_receipt;nav-coverswas red on one intermediate artifact) are in the report on the card.Verification
Read first:
skills/objectstack-data/rules/security.md(the two hunks; the risks are the sentence "only onprivate/public_readwithownership: 'user'" and the cascade sentence, each backed by a probe table above), then the four comment blocks above thesecurity.mdrow inscripts/check-skills-token-ratchet.mjs.Two-minute check:
node scripts/check-skills-token-ratchet.mjsprintsskills/objectstack-data/rules/security.md is 4967 tokens (ceiling 4967; headroom 0)and exits 0. By hand:wc -c skills/objectstack-data/rules/security.mdprints 19868, and 19868 / 4 rounds up to 4967.Local gates. The list is
node scripts/pm/dispatch-gates.mjs --commandson the committed diff: 67 commands (36 pnpm, 31 node), exit codes captured before any pipe.ca78d632: 66 exit 0.pnpm check:role-wordexit 1:skills/objectstack-data/rules/security.md: NEW use of the reserved word "role" (1 occurrence(s)), in the field clause. Commite40d32b7rewords the clause and re-pins the ratchet row (4950 to 4949).e40d32b7: the whole list re-run, 67 exit 0. Commands 51 to 67 of the list (thepm-*checks and theskill-*checks among them) finished after the0069878fedit was in the working tree, so they read the final text.0069878fand again on the tree of697ba474: the commands of the list that read a changed file re-run, 17 exit 0 on the final tree (check-changeset-no-major,check-comment-mask-corpus,check-doc-route-spelling --advisory,check-empty-changeset,check-self-test-wired,check-skills-token-ratchetand its--self-test,check:doc-formula-expressions,check:closed-ceremony-text,check:corpus-claim-drift,check:doc-authoring,check:nul-bytes,check:role-word,check:skill-compatibility,check:skill-frame-sync,check:skill-identifier-liveness,check:skill-links). The ratchet prints61 authored bundle file(s) within their ceilings.pnpm lint,test:repo, every package suite (no package source in the diff).Clause-②: no
Metadata-protocol: none
Human Minimum
packages/specholds no runtime logic. (not touched)pnpm lintpasses. (no formatter ran; the repo-wide lint is CI's run)main, one pull request. (two cards folded by the seat's claim: same file, text only; one commit each, then one for the reserved-word gate and two for the cascade sentence)packages/spectouched: its generated artifacts are regenerated and committed. (not touched)content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.Generated by Claude Code