Skip to content

docs(skills): the data skill says where Modify All lifts the delete floor, and that hiding a field keeps the object read - #39140

Merged
os-zhuang merged 5 commits into
mainfrom
claude/project-thread-v23joj
Dec 2, 2026
Merged

os-zhuang merged 5 commits into
mainfrom
claude/project-thread-v23joj

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Bill · project thread

Fixes #38963
Fixes #38964

维护者速读

  • 用户能看到什么变化:照技能搭应用的 AI,给「要能删别人记录」的角色配权限时,知道在全员可读写的对象上光勾「修改全部」删不了别人的记录,要写一条删除策略,而且会被一起删掉的子表也要有删除授权;给「只藏一个字段」的角色配权限时,不再把整个对象的读权限一起拿掉。平台行为没有变。
  • 为什么做:上线前场景测试第 4 轮里,请假应用的 HR 专员删不掉别人的请假单(连续两轮被拒),采购和差旅应用把整个部门对象对申请人藏了起来,而卡片只要求藏预算。
  • 出错会怎样:改的只是技能文字,写错的后果是搭出来的应用权限配得不对;可以直接撤回。
  • 要你做什么:这是对外发布的技能文件,需要你批准后才能合并。

What changes

One file of the published objectstack-data skill, skills/objectstack-data/rules/security.md, two bullets. No platform behaviour changes.

1. Deletes (the Three axes list). The gloss on viewAllRecords / modifyAllRecords read "super-user, bypass sharing". It now reads "bypass sharing; ⚠️ not a public_read_write delete, below". The delete bullet becomes:

allowDelete removes only rows the caller created (owner_only_deletes); an edit share never widens it. { allowRead: true, allowDelete: true, writeScope: 'org' } (or modifyAllRecords: true) does, only on private / public_read with ownership: 'user'. ⚠️ On public_read_write neither does (403, Modify All included); an authored delete row policy does, on any object: { name: 'hr_deletes', object: 'leave_request', operation: 'delete', using: "status != 'approved'" }. Each cascade child needs its own allowDelete and row rule too (controlled_by_parent: edit on the master row).

2. Hiding one field (§ Field visibility, the Position-dependent bullet). Added:

Hiding one field keeps the object's allowRead and adds 'department.budget': { readable: false }; ⛔ leaving the object out of the set hides every department.

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:

  • the standing ruling the ratchet header recognises, 「A:先削重复,余额按实测提高」, ruling record 6513306068;
  • the maintainer's choice on the seat's decision card for this pair of cards, 2026-12-02T12:44Z, option 「按实测抬上限」.

What is deleted in the same file: the old delete bullet's clauses on the private case 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):

before (f6b008e8) after (697ba474)
rules/security.md, lines 388 395
rules/security.md, bytes / tokens 19290 / 4823 19868 / 4967
every SKILL.md in the pack, lines / bytes 2145 / 121250 2145 / 121250 (none in the diff)
ratcheted authored total, tokens 182270 182414
whole shipped tree, tokens 290866 291010

The 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 f6b008e8 runs it:

  • packages/plugins/plugin-sharing/src/sharing-service.ts:290-291: public_read maps to the read model; public_read_write (and controlled_by_parent) to public.
  • sharing-service.ts:1400-1401, in writeVerdicts, the one implementation behind checkDelete (:1311): a public write default answers abstain, 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: resolvePreImageFloorDrop returns verdict === 'allow'. An abstain keeps the platform's ownership floor.
  • packages/plugins/plugin-security/src/platform-ownership-policies.ts:280-281: owdOpenWritesCoversOperation is update only, so public_read_write opens cross-creator updates and owner_only_deletes stays.
  • packages/plugins/plugin-security/src/objects/default-permission-sets.ts:1017-1022: the floor itself, owner_only_deletes, object *, operation delete, created_by == current_user.id, bound to org_member.
  • An authored delete policy 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) and predicate-write-floor-deferral.test.ts:975 onward (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 at f6b008e8: 4 passed.

object Modify All writeScope: 'org' neither
private, owner_id allow allow deny
public_read, owner_id allow allow deny
public_read_write, owner_id abstain abstain abstain
private, no owner_id abstain abstain abstain

So "bypass sharing" was true only where record sharing enforces writes, and the old bullet's "On a private object" left out public_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_write object with an owner column, delete will follow the record's owner as it does on private / public_read, a Modify All holder included, and owner_only_deletes stops 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 teaches main as it runs today, and the sentence "On public_read_write neither 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_balances re-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.

  • The author followed the new text: demoleave_leave_request is public_read_write, and demoleave_hr_officer holds allowDelete with 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:delete is 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_request as hr_officer was still refused: 403 PERMISSION_DENIED, "You do not have permission to perform this action", row lr_100 present. The seed gives lr_100 two leave_day rows and one approval_step row, both cascade children; the build's HR set has no allowDelete on demoleave_approval_step, a public_read_write object.

Cause, measured. cascadeDeleteRelations authorizes every child row as the caller (packages/plugins/plugin-security/src/security-plugin-authz-middleware.ts:223-225 and :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, REST DELETE /data/pq_req/ID; not committed), run on this branch: every row created by the admin, status withdrawn. Unless said, the set holds allowDelete on the parent, the authored policy above, and a readable: false row on one parent field.

# the caller's set no child a controlled_by_parent cascade child a public_read_write cascade child
1 children: day read/create/edit/delete, step read/create/edit (the build's shape) 200 200 403, the child's object gate (the build's message)
2 as 1, without the hidden field 200 200 403, same
3 as 1, plus allowDelete on step 200 200 403, the child's row gate (owner_only_deletes on the child)
4 as 3, plus an authored delete policy on step 200 200 200
5 no policy; Modify All and View All on the parent, allowDelete on both children 403 403 403
6 as 1, without allowDelete on day 200 403, the child's object gate 403

A 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 0069878f added a cascade sentence that ended "(controlled_by_parent: allowDelete only)".

Run at 0069878f (with that sentence). Build 128/128, iterate Build 141/141, Run operations 6/7.

  • The author followed it: the HR set holds allowDelete and an authored delete policy on the request and on both cascade children. This build made the request private, and gave HR read and delete on it, no allowEdit.
  • delete_withdrawn_request was 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 "allowDelete only" was wrong: probe 1 always held allowEdit on a public_read_write parent, 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 allowDelete on parent and child; the delete policy and the update policy admit the row.

the caller's set on the parent parent private: no child / with child parent public_read_write: no child / with child
delete policy, no allowEdit 200 / 403 "no edit permission on master" 200 / 403, same
delete policy, allowEdit 200 / 403 "master not editable" 200 / 200
delete policy, allowEdit, an authored update policy 200 / 200 not run
Modify All, allowEdit 200 / 200 not run (probe 1, row 5: 403 without a child)
Modify All, no allowEdit 200 / 200 not run

The skill already says it of every write under controlled_by_parent (skills/objectstack-data/rules/relationships.md, § Writes under controlled_by_parent: "every write needs edit on the master"). Commit 697ba474 corrects the sentence to "Each cascade child needs its own allowDelete and 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:delete passes ("demoleave_hr_officer grants it"), and delete_withdrawn_request as hr_officer is applied: lr_100 is gone, with its day lines and its approval step.
  • The build: demoleave_leave_request and demoleave_approval_step are private, demoleave_leave_day is controlled_by_parent; the HR set holds read, create, edit and delete with View All and Modify All on all three, and an authored delete policy on the request and on the approval step.
  • The one operation lost in this run is 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.md was byte-equal to f6b008e8's (the working tree held this branch's delete bullet uncommitted when the run started; it was not packed).

  • Build 152/152, iterate Build 164/164. persona-grant:requester:demopurchase_department:read, persona-grant:buyer:demopurchase_department:read and persona-grant:dept_manager:demopurchase_department:read pass. Author turn: success, 89 of 300 turns, served claude-haiku-5-5.
  • The build wrote, for both demopurchase_requester and demopurchase_buyer: demopurchase_department: { allowRead: true } in objects, and 'demopurchase_department.budget': { readable: false, editable: false } in fields. That is the shape the card wants. The recording shows the author read rules/security.md whole.
  • So the loss did not reproduce on unchanged text. The committed gallery build of travel_expense (docs/qa/scenarios/builds/travel_expense.json, another author) has the same correct shape.

What that names:

  • Not the scorer. personaGrantNeeds asks for read on department because 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.
  • Not a wrong line. The section already taught "a fields row in the sets that differ".
  • A missing half. No sentence said the object grant stays when a field is hidden. The round's two builds are not available to read, so whether they left department out of objects or wrote allowRead: false stays 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

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

  • The rule says plainly that on a public org-wide default Modify All does not lift owner_only_deletes, and names the two shapes that do, each with a short example.
  • The "bypass sharing" gloss names the delete exception.
  • A leave_balances scratch re-run shows persona-grant:hr_officer:demoleave_leave_request:delete and delete_withdrawn_request passing: at 697ba474, 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

  • The cause is named: a missing line (above), with the evidence that the unchanged text was enough for one build.
  • A scratch re-run of both cards after the change: not run. requisition_to_receipt passed the three checks before the change, so a pass after it would not be evidence for the change; travel_expense was not built.

Noted, not changed here:

  • The data skill's eval 38 (evals/hooks-security-seeds-datasources.json) covers the private delete case and no pin of it moves. No eval covers the public_read_write case; the file surface of this card did not include a new one.
  • Scratch findings of the same build outside both cards (the build denies the buyer an update on po_line and the requester a create on goods_receipt; nav-covers was 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 on private / public_read with ownership: 'user'" and the cascade sentence, each backed by a probe table above), then the four comment blocks above the security.md row in scripts/check-skills-token-ratchet.mjs.

Two-minute check: node scripts/check-skills-token-ratchet.mjs prints skills/objectstack-data/rules/security.md is 4967 tokens (ceiling 4967; headroom 0) and exits 0. By hand: wc -c skills/objectstack-data/rules/security.md prints 19868, and 19868 / 4 rounds up to 4967.

Local gates. The list is node scripts/pm/dispatch-gates.mjs --commands on the committed diff: 67 commands (36 pnpm, 31 node), exit codes captured before any pipe.

  • At ca78d632: 66 exit 0. pnpm check:role-word exit 1: skills/objectstack-data/rules/security.md: NEW use of the reserved word "role" (1 occurrence(s)), in the field clause. Commit e40d32b7 rewords the clause and re-pins the ratchet row (4950 to 4949).
  • At e40d32b7: the whole list re-run, 67 exit 0. Commands 51 to 67 of the list (the pm-* checks and the skill-* checks among them) finished after the 0069878f edit was in the working tree, so they read the final text.
  • At 0069878f and again on the tree of 697ba474: 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-ratchet and 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 prints 61 authored bundle file(s) within their ceilings.
  • Not run locally, CI's: the repo-wide pnpm lint, test:repo, every package suite (no package source in the diff).

Clause-②: no
Metadata-protocol: none

Human Minimum

  • 1. Schemas start as Zod; packages/spec holds no runtime logic. (not touched)
  • 2. Every name I added uses the casing for its kind. (no name added)
  • 3. No formatter ran; pnpm lint passes. (no formatter ran; the repo-wide lint is CI's run)
  • 4. One issue, one branch off an up-to-date 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)
  • 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset.
  • 6. packages/spec touched: its generated artifacts are regenerated and committed. (not touched)
  • 7. No hand edits to content/docs/references/, packages/*/CHANGELOG.md or content/docs/releases/.
  • 8. Title, body and comments are in English. (the 维护者速读 block and the two quoted rulings are Chinese by rule)
  • The Before Submitting list in CONTRIBUTING.md is done.

Generated by Claude Code

…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>
@github-actions github-actions Bot added size/s documentation Improvements or additions to documentation tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Dec 2, 2026
…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>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-bill · os-bill · session_01Utp6CaQsbKBMQtm6Tpsamd

Contract review brief — PR #39140 @ 697ba474ff552c15e42464c98aa551aaf1814994 (card #38963)

You review at CONTRACT_REVIEW_TIER. Render ONE ## Contract review record on this head — its shape is
node scripts/pm/record-recognisers.mjs --template — with a PASS or FAIL verdict, and post it as ONE comment
on the PR or its card.

Inputs — these and nothing else:
· card #38963: its body and EVERY comment (rulings and earlier records included); its fold member #38964 the same
· PR #39140: its body, its file list, and the net diff against main at 697ba474ff552c15e42464c98aa551aaf1814994
· the check-runs on 697ba474ff552c15e42464c98aa551aaf1814994: their conclusions ARE the gate verdicts
· ruling comment 7288570890 on #38517
⛔ Not the dispatch order, ⛔ not the dispatching seat's own conclusions — this brief is adversarial by design.

Scope — the paths reviewFace returns as hits on this PR's file list: skills/objectstack-data/rules/security.md;
plus every file IN THIS DIFF that directly implements or enforces them — the gate that enforces a rule, the code
a jsdoc or schema line describes, the validator a skill teaches — reviewed for agreement with the contract.
Widen it freely, ⛔ never below hits; the record's Scope: line names the implementing files apart from hits.
The rest of the diff (tests, unrelated modules, lockfiles, generated output, changesets) is the lane seat's
ACCEPT at TIER_DEFAULT, exactly as a standalone PR of those files.
④ judges the hits files and those implementing files ONLY:
lockfiles, generated output, changesets and prose elsewhere in the PR are not reviewed;
code outside the diff is READ to judge them, never reviewed.

Security — if a hits path is under skills/** or ui/skills/** and the change teaches security, auth or permission
behaviour the path name doesn't show, the record says so and the seat adopting the record adds the security label.
The record says so on its Security-touching: line, and the arm lands on no alone: write no ONLY when no changed
hunk teaches permission, sharing, credential, token, authentication or other security behaviour, else yes.

Rule change — if a hits path is under .claude/**: the PR body declares Rule-change: and you verify it against the diff.
Write Rule-change-verified: none ONLY when no changed hunk alters what an agent may do without the maintainer
(merge, bypass a check, change repository settings), what gets done and in what order (grading, dispatch, scope), or
what must go to him (decisions, maintainer actions); process steps, scripts, wording, slimming and file moves are not rule
changes. Write ruled ONLY when every such hunk copies the ruling the PR body quotes on its Ruling-ref: line — check the
copy against the quoted words, do not re-rule it. Otherwise yes: the pull request then waits for the maintainer.

Seat note: the reviewer was an isolated sub-agent run at this tier; it returned the record and the seat posts it with the run's transcript as tier evidence.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-bill · os-bill · session_01Utp6CaQsbKBMQtm6Tpsamd

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 697ba474ff552c15e42464c98aa551aaf1814994
Local-runs: none
Scope: skills/objectstack-data/rules/security.md + scripts/check-skills-token-ratchet.mjs
Security-touching: yes
Rule-change-verified: none

① Derived judgments

  • Face: rules. skills/objectstack-data/rules/security.md is a governed path, so the tier is CONTRACT_REVIEW_TIER.
  • Diff: three files against main (merge-base f6b008e8): the skill file, the ratchet row, and the changeset. The changeset is the lane seat's ACCEPT at TIER_DEFAULT.
  • Drift: origin/main is now 0c45d66f. Between f6b008e8 and it, the skill file, the ratchet script and the non-test source of plugin-sharing and plugin-security are unchanged, so every citation below was read on 0c45d66f.
  • Security-touching: yes. Both hunks teach permission behaviour (delete authorization, Modify All, row policies, field-level hiding).
  • Rule change: none. No .claude/** path is in the diff, and no hunk alters what an agent may do, the order of work, or what goes to the maintainer.
  • Gates: the check-runs on this head read 31 success, 20 skipped, 0 failed, 0 pending. The PR is still a draft.

② Semver level

@objectstack/skills patch is right: published skill wording only, no schema, no runtime, no accepted-input change. Clause-②: no and Metadata-protocol: none appear in both the PR body and the changeset.

③ Boundary flags

④ Design judgment

skills/objectstack-data/rules/security.md, each added sentence against main:

  1. Gloss "bypass sharing; not a public_read_write delete": holds.
    • effectiveSharingModel maps public_read_write to public (sharing-service.ts:287-294).
    • writeVerdicts, the one implementation behind checkDelete (:1311-1318), sets abstain on a public write default at :1400, before the Modify All probe at :1489-1495.
    • resolvePreImageFloorDrop drops the floor only on allow (packages/plugins/plugin-security/src/security-plugin-sharing-verdicts.ts:304).
    • The floor is owner_only_deletes, created_by == current_user.id, bound to org_member (packages/plugins/plugin-security/src/objects/default-permission-sets.ts:1017-1022).
  2. "an edit share never widens it": holds. The checkDelete docblock says sharing widens rows, never verbs, and a share holder gets deny (sharing-service.ts:1300-1303).
  3. "writeScope: 'org' (or modifyAllRecords: true) does, only on private / public_read with ownership: 'user'": holds.
    • public_read maps to read, which is not the public branch at :1400.
    • An object with no owner_id abstains at :1401 (hasOwnerField, :391-393).
    • owner_id is injected under ownership: 'user' or when it is omitted (packages/spec/src/data/object.zod.ts:4413-4418).
    • Writing the two wideners as alternatives is right: the pair together is refused (packages/spec/src/security/permission.zod.ts:387).
  4. "an authored delete row policy does, on any object": holds for private, public_read and public_read_write.
    • Pinned at packages/plugins/plugin-security/src/explain-enforce-parity.test.ts:1391-1397 and predicate-write-floor-deferral.test.ts:975.
    • should-fix: "on any object" is too wide for a controlled_by_parent detail deleted directly. Its delete also asks edit on the master (packages/plugins/plugin-security/src/security-plugin-cbp-write-gate.ts:1192), and a policy on the detail alone is refused. The parenthesis in the next sentence covers only the cascade case. rules/relationships.md:64-65 already says it, so this is not a must-fix.
  5. Example policy: holds. { name, object, operation: 'delete', using } matches the rowLevelSecurity shape the same file teaches at its lines 91-102 and 153-157.
  6. Cascade sentence: holds.
    • cascadeDeleteRelations re-authorises every child independently (packages/plugins/plugin-security/src/security-plugin-authz-middleware.ts:223-225).
    • The cascade arm keeps the operator's own delete authority (:1296-1299).
    • The controlled_by_parent parenthesis matches the master-edit gate above and relationships.md:65.
    • nit: "row rule" is terse. It means the child's own floor or policy.
  7. Field clause: holds.
    • The 'object.field': { readable: false } key is the spec's shape (packages/spec/src/security/permission.test.ts:937; the skill's eval 258 uses the same).
    • An object no set grants is refused at the CRUD gate (deny baseline, security-plugin-authz-middleware.ts:1303 onward).
    • nit: "leaving the object out of the set hides every department" is true per set. Another set the caller holds can still grant it; the section's opening line says the most permissive answer wins.
  8. Acceptance of Data skill: builds give a role allowDelete plus Modify All on a public object, where Modify All does not lift the owner-only delete floor; leave_balances hr_officer is refused its delete in two rounds running #38963: lines 1 and 2 are met by the text. Line 3 rests on the dev's single reported build at this head; no CI run covers it.

No sentence was found that contradicts main.

scripts/check-skills-token-ratchet.mjs (implementing file): agrees with the contract.

  • Only the security.md row and its comment blocks move.
  • The file is 19868 bytes at this head and 19290 on main. Divided by four and rounded up, that is 4967 against 4823, a raise of 144, equal to the measured growth with zero headroom.
  • The four comment steps are each arithmetically right: 19607 to 4902, 19793 to 4949, 19834 to 4959, 19868 to 4967.
  • The row comment and the PR body both quote the standing ruling 「A:先削重复,余额按实测提高」 (record 6513306068), which the script header names as the recognised path (lines 162-175), and the maintainer's choice 「按实测抬上限」.
  • Deletion in the same file is shown: the old bullet's private and "elsewhere" clauses and "super-user" are replaced. I found no other restatement of either teaching in the file to cut.
  • The only gap is the unsourced choice quote graded under ③.

Findings: 0 must-fix, 4 should-fix (one on the text, three for the seat), 2 nits.

Implemented-by: claude/project-thread-v23joj
Reviewed-by: session_01Utp6CaQsbKBMQtm6Tpsamd

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-bill · os-bill · session_01Utp6CaQsbKBMQtm6Tpsamd

速读 — 数据 skill 的 security.md 讲清:public_read_write 对象上 Modify All / writeScope: 'org' 不放宽删除,要用 delete 行策略;级联子表各自要删除权;隐藏单个字段要保留对象读权。上限按实测 +144 token(维护者「按实测抬上限」)。
要你做什么 — 审批人批准 PR(Tier H:skills/** 且涉权限)。契约审核 PASS 评论 7349293235,Head-sha: 697ba474ff552c15e42464c98aa551aaf1814994。批准后席位自行落地(维护者授权「审批人批准后的 Tier H PR 你可以自主落地」)。
范围外 — #38517 选项 C 实现后,其 skills 后续接管本条与上限行(#38517 留言 7349345438)。
席位意见 — ACCEPT:文本与 main 运行时一致(fable L2 逐句对代码),两张卡的验收实测都过。

席位核对

Verdict: ACCEPT at head 697ba474ff552c15e42464c98aa551aaf1814994 · L1 by the seat (diff read; l1-face.mjs) + contract review at CONTRACT_REVIEW_TIER by an isolated sub-agent, record 7349293235 (brief 7349256197), PASS, 0 must-fix.

  1. Shape — draft, base main, first line Fixes #38963; Fixes #38964 also binds (the folded pair, both claimed by this seat: 7345165388, 7345181242), the only flag l1-face.mjs raised, and intended.
  2. Premise measured — every added sentence was checked against main's runtime by the L2 (sharing-service writeVerdicts, the owner_only_deletes floor, the cascade re-authorisation, the controlled_by_parent master-edit gate, the spec fields key shape), file:line in the record. Card acceptance: Data skill: builds give a role allowDelete plus Modify All on a public object, where Modify All does not lift the owner-only delete floor; leave_balances hr_officer is refused its delete in two rounds running #38963 by the thread's build at this head (hr delete grant and delete_withdrawn_request pass, report 7349111148); Builds withhold all read on department from roles whose card hides only the budget field (requisition_to_receipt requester and buyer, travel_expense employee) #38964 line 2 by the travel_expense build at this head, comment 7350109769 (build 142/142, iterate 150/150, no persona-grant fail, no leak).
  3. Gate check-runs — at this head: 32 success, 26 expected skip, 0 failed, 0 pending, mergeable_state clean (pr-state.mjs); Lint & Repo Gates and TypeScript Type Check success.
  4. Accepted deviations — the ratchet raise is +144 (4823 → 4967), above the ~130 the decision card estimated, because a measured cascade sentence was added after the maintainer chose 「按实测抬上限」 (2026-12-02T12:44Z, recorded on Data skill: builds give a role allowDelete plus Modify All on a public object, where Modify All does not lift the owner-only delete floor; leave_balances hr_officer is refused its delete in two rounds running #38963, comment 7349325361); the row sits at the measurement with zero headroom, both rulings quoted. Five commits, not one per card, each with its reason. Clause-②: no, Metadata-protocol: none.
  5. Out of scope — L2 should-fix "an authored delete row policy does, on any object" is too wide for a directly deleted controlled_by_parent detail → routed to Sharing: delete on an owned public_read_write object follows the record's owner (ruling C), not the creator floor #38517's skills follow-up (note 7349345438), since rules/relationships.md:64-65 already teaches it and ruling C rewrites this bullet; two nits accepted. Skills-docs: not owed.
  6. Landing — Tier H (check-governed-merges.mjs --pr 39140: skills/**, a security-named catalog path, the security label), 74 lines ≤ 3000. Handed to the approvers now; on approval at this head the seat lands it (ready + auto-merge) under the maintainer's authorization of 2026-12-02T12:07Z.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-bill · os-bill · session_01Utp6CaQsbKBMQtm6Tpsamd

席位核对 — ACCEPT · head 697ba474ff552c15e42464c98aa551aaf1814994 · repo:objectstack@os-bill

The seat record is comment 7350158816 above; its verdict line opened with Verdict:, which seat-record.mjs does not read, so this line restates the same verdict at the same head in the shape the hand-off reads. Nothing else changes.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-bill · os-bill · session_01Utp6CaQsbKBMQtm6Tpsamd

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 697ba474ff552c15e42464c98aa551aaf1814994
Local-runs: none
Scope: skills/objectstack-data/rules/security.md + scripts/check-skills-token-ratchet.mjs
Security-touching: yes
Rule-change-verified: none

① Derived judgments

② Semver level

Unchanged: @objectstack/skills patch, Clause-②: no, Metadata-protocol: none.

③ Boundary flags

④ Design judgment

  • S1: closed for this head, carried rather than edited. Moving the head is not required, for three reasons:
    • The gap fails closed. An author who follows "on any object" onto a controlled_by_parent detail deleted directly gets a 403 that names the cause (packages/plugins/plugin-security/src/security-plugin-cbp-write-gate.ts:1192). No access is widened.
    • The pack already teaches the rule. skills/objectstack-data/rules/relationships.md:64-65 says every write under controlled_by_parent needs edit on the master, and the next sentence of the same bullet names controlled_by_parent with "edit on the master row".
    • The carrier is on record. Comment 7349345438 on Sharing: delete on an owned public_read_write object follows the record's owner (ruling C), not the creator floor #38517 names this exact case, with the file and line, in the list the ruled skills follow-up owns.
    • One limit: the carrier acts when ruling C's runtime lands, not before, so the wide wording ships until then.
  • Nits, unchanged and not blocking: "row rule" is terse, and "leaving the object out of the set hides every department" is true per set.
  • Ratchet row: unchanged reading. 19868 bytes gives 4967 tokens at the measurement, and both quoted authorities now have a source on record (S2).

No must-fix, no should-fix.

Implemented-by: claude/project-thread-v23joj
Reviewed-by: session_01Utp6CaQsbKBMQtm6Tpsamd

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-bill · os-bill · session_01Utp6CaQsbKBMQtm6Tpsamd

维护者速读

Review requested · 2026-12-02T15:24Z · Tier H (skills/**, security-touching). Seat ACCEPT 7350158816 and contract review PASS 7349293235 (delta 7350248719 closes its findings) are both at Head-sha: 697ba474ff552c15e42464c98aa551aaf1814994. Please approve at this head; on approval the seat lands it (ready + auto-merge) under the maintainer's authorization of 2026-12-02T12:07Z (「审批人批准后的 Tier H PR 你可以自主落地」).

@objectstack-fleet objectstack-fleet Bot added the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Dec 2, 2026
@objectstack-fleet
objectstack-fleet Bot requested a review from os-zhuang December 2, 2026 15:25
@os-zhuang
os-zhuang marked this pull request as ready for review December 2, 2026 15:26
@os-zhuang
os-zhuang added this pull request to the merge queue Dec 2, 2026
Merged via the queue into main with commit 07b2bb2 Dec 2, 2026
66 checks passed
@os-zhuang
os-zhuang deleted the claude/project-thread-v23joj branch December 2, 2026 15:52
@objectstack-fleet objectstack-fleet Bot removed the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Dec 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation security size/s tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

3 participants