Skip to content

docs(skills): the data skill teaches that a predicate update or delete of a controlled_by_parent detail writes the rows its by-id writes do - #36389

Merged
os-zhuang merged 1 commit into
mainfrom
claude/issue-36285-relationships-predicate-floor
Nov 22, 2026
Merged

os-zhuang merged 1 commit into
mainfrom
claude/issue-36285-relationships-predicate-floor

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Steve · project thread

Fixes #36285
Clause-②: no
Metadata-protocol: none

维护者速读

  • 用户能看到什么变化:用 AI 搭应用的人问到「看得到主记录的人按条件批量改、删明细」时,技能包不再教「只能动到本人录入的行」,改为教「批量与逐条改到的行一致,要么全部生效要么一行不动」。平台行为本身没有变。
  • 为什么做:属于权限与共享这条线;你裁定的「批量与逐条一致」已经随上一个改动落地,对外发布的技能包还在教旧规则,这是它欠下的文档跟进。
  • 出错会怎样:这次只改两处说明文字,不动运行代码;写错的后果是 AI 照着错误说法搭应用,合并后发现不对可以直接撤回。
  • 要你做什么:技能包属于需你本人批准的内容,请审阅这两处文字后批准并合并。

What changes

The rule taught is the maintainer's ruling 「A 批量与逐条一致」 as the runtime now implements it (the predicate-write change for controlled_by_parent details, already on main).

  • skills/objectstack-data/rules/relationships.md, the writeRequiresMasterRead: true bullet under "Writes under controlled_by_parent". Before: "The ownership floor (rows you created) still binds predicate and, for both users, on-behalf-of updates and deletes." After: "A predicate (multi: true) update or delete writes the rows a by-id write of each would, all matched rows or none. The ownership floor (rows you created) still binds, for both users, on-behalf-of updates and deletes." Only the predicate half moved; the on-behalf-of half is kept word for word (ADR-0090 D10).
  • skills/objectstack-data/evals/objects-fields-relationships.json, eval 17: the last sentence of expected_output states the same rule. Its assertions are unchanged: none of the four must_contain strings and none of the four must_not_contain strings involved the old wording.
  • .changeset/36285-relationships-predicate-floor.md: @objectstack/skills patch.

Read first, by risk:

  1. skills/objectstack-data/rules/relationships.md, the one hunk at lines 86 to 92: the sentence an agent will author from.
  2. skills/objectstack-data/evals/objects-fields-relationships.json, eval 17.

Skill size readings

What Before After
rules/relationships.md, lines 399 400
rules/relationships.md, tokens (ceiling 4203) 4162 4188
evals/objects-fields-relationships.json, lines 451 451
evals/objects-fields-relationships.json, tokens (not ratcheted) 7488 7517
Bundle, every SKILL.md summed, lines 4950 4950
Bundle, whole shipped tree, lines 22900 22901
Bundle, ratcheted authored tokens (ceiling 202541) 197497 197523
Bundle, whole shipped tree, tokens 290191 290246

No ceiling is raised. Before readings at ed33f8aed, after readings at eb547b8f3.

Tests

Head eb547b8f3. No runtime code moves, so no package test suite is owed and no ablation applies (documentation only).

Eval 17 against its own assertions, and the shipped catalog
  • Eval 17 expected_output checked against its assertions: must_contain missing 0 of 4, must_not_contain present 0 of 4. The fixture parses as JSON, 25 evals. The repository has no runner that executes eval fixtures; this is the structural check available.
  • pnpm --filter @objectstack/skills build, exit 0: "sync-catalog self-test: 9 cases pass", "114 file(s) across 14 skill(s) copied from skills/** into dist/skills and read back byte-identical". In packages/skills/dist/skills/objectstack-data/, the new sentence is found once in each of the two files and the old wording "still binds predicate" zero times in rules/relationships.md (positive control: writeRequiresMasterRead is found there).
Derived gates, local subset

node scripts/pm/dispatch-gates.mjs --commands derived 48 families from the 3 changed paths. All 48 were run at eb547b8f3 with each exit code captured before any pipe; --ran answers "48 derived, 48 run, 0 UNRUN".

  • 43 exit 0, among them check-skills-token-ratchet ("60 authored bundle file(s) within their ceilings"; relationships.md 4188 tokens, ceiling 4203, headroom 15), check:skill-served-sections, check:skill-links, check:skill-identifier-liveness, check:skill-compatibility, check:skill-frame-sync, check:doc-authoring, check:pm-skill-id-lint, check:nul-bytes, check:published-files, check-empty-changeset, check-changeset-no-major, check-adr-0087-registration.
  • 5 exit 3, NOT MEASURED, reason: each needs a full workspace build this documentation diff does not owe locally, and each printed its own prerequisite refusal: check:doc-formula-expressions (the formula package is not built), check:dts-closure, check:dual-build-cjs-loads, check:lean-entry-closure, check:sourcemap-no-sources-content. They are left to CI.

Acceptance notes

  • Search for other sentences teaching the old rule, at ed33f8aed: git grep -iE 'rows you created|ownership floor' -- skills/ answers the two sites corrected here and no other; git grep -i predicate -- skills/objectstack-data/ has no other hit about a controlled_by_parent write. No generated mirror carries the sentence: rules/relationships.md is hand-authored, and check:skill-served-sections is green.
  • The predicate rule holds for every controlled_by_parent detail, not only one that declares writeRequiresMasterRead. The sentence stays in the bullet where the old one stood, as the card asks for a rewrite in place with no restructuring.
  • The region after line 406 of relationships.md (another open draft's) is not touched; the file is 400 lines on this branch.
  • relationships.md grows by 1 line and 26 tokens, inside its ceiling. Nothing was deleted to pay for it.
  • Governed surface (skills/**, Tier H): this pull stays draft and requests no reviewer.

Verification

Two-minute check: git diff origin/main...HEAD -- skills/ shows exactly two hunks, one sentence each. Then node scripts/check-skills-token-ratchet.mjs; expect a last line starting "✓ check-skills-token-ratchet: 60 authored bundle file(s) within their ceilings".

🤖 Generated with Claude Code

https://claude.ai/code/session_01ADHkmRY38EZf38Yy3zthbY

…rolled_by_parent detail matches its by-id writes

The writeRequiresMasterRead bullet in objectstack-data's
rules/relationships.md and eval 17's expected_output said the ownership
floor still binds a predicate update or delete. A non-delegated predicate
(multi: true) update or delete now writes the rows a by-id write of each
would, all matched rows or none; on-behalf-of keeps both users' floors.

Claude-Session: https://claude.ai/code/session_01ADHkmRY38EZf38Yy3zthbY
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 Nov 22, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-steve · session_01ADHkmRY38EZf38Yy3zthbY

席位核对

L1 verdict: ACCEPT at head eb547b8f34 (seat repo:objectstack#2, reviewer of record).

  • Shape: draft → main; first line Fixes #36285, and merging delivers the whole card (the bullet, eval 17 from the scope addition 7075133273, and the grep for a third site). No closing keyword binds any other card. Clause-②: no · Metadata-protocol: none, line-initial in body and changeset. l1-face.mjs CLEAN, 13 items.
  • Premise measured against the code's own note: PR fix(plugin-security)!: a predicate update or delete of a controlled_by_parent detail writes the rows its by-id writes do #36282's changeset says a predicate update or delete of a controlled_by_parent detail "changes the rows a write of each row by id would change for the same caller, and it applies to all of its matched rows or to none", and "a write made on another user's behalf keeps the floor". Both corrected sentences (rules/relationships.md bullet, eval 17 expected_output) say exactly that; the on-behalf-of half is kept. git grep -iE 'rows you created|ownership floor' -- skills/ at base found only these two sites.
  • Eval 17: expected_output restated; its must_contain / must_not_contain never named the old wording, so they are unchanged (dev check: 0/4 missing, 0/4 present).
  • Gates: check-runs at eb547b8f34: 28 success · 16 expected skip · 0 failed · 0 pending; mergeable_state clean. Local at eb547b8: 48 derived, 43 exit 0, 5 NOT MEASURED by exit 3 (whole-build families, run in CI); check-skills-token-ratchet exit 0 (relationships.md 4188 / 4203, ceiling unchanged); @objectstack/skills build copies the new sentence into dist/skills byte-identical.
  • Changeset read sentence by sentence: .changeset/36285-relationships-predicate-floor.md — the bullet, the eval and the kept on-behalf-of half each match the diff.
  • Accepted deviations: commit trailers follow AGENTS.md's model-free pair rather than the order's line; relationships.md +1 line (inside the ordered ±1).
  • Out of scope: the predicate rule holds on every controlled_by_parent detail, not only under writeRequiresMasterRead; the corrected sentence stays in the bullet where the false one lived (no restructuring ordered). carrier: none, recorded in the PR's Acceptance notes. Open PR docs(skills): objectstack-data and objectstack-automation SKILL.md become routers #36158 (card skills: SKILL.md becomes a router with a size budget, and points to the contract instead of restating it #34770, decision inbox) edits this file only after its l.399 region; no overlap.
  • L2 owed: skills/** is governed rule text ⇒ CONTRACT_REVIEW_TIER. No L2 seat is seated (l2-review#3 [PM seat] l2-review · seat 3 — 🟢 os-project-manager · 由 os-project-manager 账户的项目负责 #34475 and review#2 [PM seat] review · seat 2 — 🟢 os-project-manager · 由 os-project-manager 账户的项目负责 #33258 off duty since 2026-11-21 15:08Z, mailboxes closed), and this seat does not take the ceiling tier for contract review under its maintainer's standing order. needs:contract-review is hung in this stroke; the head waits on the owed list.
  • Landing: Tier H (skills/**) ⇒ stays draft until an L2 PASS at the current head and an approval from GOVERNED_APPROVERS; then the seat requests that review and hangs pm:awaiting-merge.

Contract-review-handoff: l2-review — CONTRACT_REVIEW_TIER unavailable (maintainer quota order 2026-11-15T21:53Z; no L2 seat seated, 2026-11-22T09:34Z) · head eb547b8

@objectstack-fleet objectstack-fleet Bot added the needs:contract-review Marker only — PR awaits its at-tier Contract review PASS; no check reads it, the record decides label Nov 22, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

l2-review#4 · os-steve · session_01ADHkmT4eA4YqtxfiPyLPih

Contract-review-claim: session_01ADHkmT4eA4YqtxfiPyLPih · head eb547b8 · 2026-11-22T15:15Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

l2-review#4 · os-steve · session_01ADHkmT4eA4YqtxfiPyLPih

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: eb547b8f34ef52059b0ac59f01548bab200cb4fd
Local-runs: none
Scope: skills/objectstack-data/rules/relationships.md, skills/objectstack-data/evals/objects-fields-relationships.json + none
Security-touching: yes

PR #36389, card #36285. Net diff against merge-base ed33f8aedcee (the commit that landed PR #36282): 3 files, +16 −5. The two hits files carry one sentence each; the third file is the changeset. No file in the diff implements or enforces the rule (the runtime is already on main), so the + side of Scope is empty. The record says Security-touching: yes because both changed hunks teach which rows a caller may write under a sharing model: permission and sharing behaviour on a path whose name does not show it. The adopting seat adds the security label.

① Derived judgments

  • Accept-set: none moves. No schema, key, lint rule, parser or runtime file is in the diff. Right.
  • Public surface: the published @objectstack/skills bundle changes one sentence in objectstack-data/rules/relationships.md (the writeRequiresMasterRead: true bullet) and the last sentences of eval 17's expected_output. The taught rule moves from "the ownership floor binds a predicate update or delete" to "a predicate (multi: true) update or delete writes the rows a by-id write of each would, all matched rows or none". Right: this is the rule main runs since ed33f8aedcee (ADR-0055, amendment 2026-11-22; ruling record 7073030861).
  • On-behalf-of half: kept ("still binds, for both users, on-behalf-of updates and deletes"). Right: security-plugin-authz-middleware.ts on main sets masterGateCoversThisWrite = !delegatorSets on the by-id path and takes no predicateMasterGateRowIds for a delegated predicate write, and ANDs the delegator's own filter with its floor.
  • Eval 17 assertions: unchanged. Right: none of the four must_contain and four must_not_contain strings involves the old or the new wording, and the new expected_output still satisfies all eight.
  • Completeness against the card's Done-when grep: at the head, rows you created, ownership floor, owner_only_, multi: true and predicate across skills/ (objectui aside) show no third sentence teaching the floor on a predicate write of a controlled_by_parent detail. rules/security.md l.117 names owner_only_writes only as the preferred built-in scoping and says nothing about predicate writes. Right.
  • Gates: 49 check-runs on the head, every one success or skipped, none failed. Check Changeset, Lint · docs & code guards, Lint · repo & tooling gates, Lint · PM dispatch-gates, Test Core, Governed Surface Queue Guard and PR-body guards are success. The 5 gate families the dev could not measure locally (exit 3, build prerequisite) and test:repo are answered by the Lint, Type Check and Test Core runs.

② Semver level

.changeset/36285-relationships-predicate-floor.md bumps @objectstack/skills at patch. That matches what the diff publishes: corrected skill prose and an eval fixture, no key, export or behaviour. Clause-②: no and Metadata-protocol: none on the PR body and the changeset are right: nothing declared is taken away and no metadata shape moves; the behaviour change itself shipped on the narrowing arm with PR #36282. Check Changeset is success on the head.

③ Boundary flags

  • open_questions: empty in the dev report. Nothing to answer.
  • Deviation, commit trailer (model-free pair per AGENTS.md instead of the dispatch order's form): accepted; not a contract matter.
  • Deviation, 5 of 48 derived gates not measured locally and test:repo left to CI: answered by the head's check-runs, all green.
  • Deviation, relationships.md is 399 lines at base, not 406: no effect; the hunk is at l.86 to 92 and the other open draft's region is untouched.
  • Out-of-scope note from the dev (the predicate rule holds for every controlled_by_parent detail, not only one declaring writeRequiresMasterRead): confirmed against ADR-0055 and the tests, and taken up as N2 below. Not escalated.
  • Token ratchet: relationships.md sits at 4188 of 4203 tokens (dev reading), no ceiling raised. Any longer wording needs a ceiling decision; see N1.
  • SQL push-down: no code in the diff, so no new id materialisation or in-app join.

④ Design judgment

skills/objectstack-data/rules/relationships.md, read against main:

  • "A predicate (multi: true) update or delete writes the rows a by-id write of each would": holds. ADR-0055 amendment 2026-11-22, "Equal to the by-id answer"; middleware step 2.8 takes the gate's judged row ids for a non-delegated addressed predicate write and step 3 composes Layer 1 with masterGateCoversThisWrite and scopes the write to those ids. Pinned in packages/plugins/plugin-security/src/predicate-write-floor-deferral.test.ts: "a detail declaring writeRequiresMasterRead: a member who only reads the master (CAROL) writes every row".
  • "all matched rows or none": holds for the refusals the ADR names. One master the caller may not read refuses the write whole (the first of the ADR's two stated differences from by-id, so this clause is what keeps the sentence from over-promising); a row-level check, a validation rule, a hook or a restrict relation on one row refuses it whole (test "all matched rows or none: ...").
  • The ADR's second stated difference (ownerMayEdit is a by-id update only) cannot be misread from this sentence: it sits in the writeRequiresMasterRead bullet, which is refused beside ownerMayEdit, and the ownerMayEdit bullet above already says "widens only the row owner's by-id update".
  • "The ownership floor (rows you created) still binds, for both users, on-behalf-of updates and deletes": holds, by id and by predicate (tests "a write on another user's behalf keeps both floors (ADR-0090 D10)").
  • Against the card: both Done-when lines and the scope addition (comment 7075133273) are met in place, with no restructuring.

skills/objectstack-data/evals/objects-fields-relationships.json, eval 17: the new expected_output states the same two sentences as the rule file, adding "for both users" to agree with it. It answers the eval prompt (how to declare the line's sharing) as before; the changed tail is accurate against main for the reasons above, and the assertions do not require the old wording.

Tried to break it:

  • A delegated predicate write: the first new sentence does not exempt it, but a delegated by-id write keeps both floors too, so "the rows a by-id write of each would" stays true, and the next sentence says so.
  • A row naming no master: owner or Modify All writes it by id; a predicate write reaching one the caller may not write is refused whole. Consistent with both clauses.
  • An unreadable row: not matched by predicate, not found by id. Consistent.
  • An app-authored update or delete policy with using on the detail: see N1.

No must-fix, no should-fix.

N1 (nit) — "all matched rows or none" is the ADR's and the card's own phrase, where "matched" means the rows inside the write's composed scope. A row the predicate matches but an app-authored using policy does not admit is left unwritten and the write answers success for the rest (step 3 keeps Layer 1; changeset 35802-cbp-predicate-write-master-gate.md, second bold paragraph), so a reader taking "matched" as "matched by the where" could expect a whole refusal there. The first clause ("the rows a by-id write of each would") and rules/security.md ("using admits ... the existing rows an update/delete policy lets it change or remove") give the right answer, and the wording is the one the card's Done-when prescribes, so the sentence is correct as the contract states it. A clearer wording costs tokens the file does not have (15 of headroom). Left as an accepted deviation; a follow-up card is the place if the maintainer wants the using case spelled out.

N2 (nit) — the sentence sits in the writeRequiresMasterRead bullet, while the rule holds for every controlled_by_parent detail whose caller passes the master gate (edit on the master by default). Nothing false is taught: the default paragraph says every write needs edit on the master and never mentioned the floor. The dev flagged it and the card asks for a rewrite in place. Left as an accepted deviation.

Implemented-by: claude/issue-36285-relationships-predicate-floor
Reviewed-by: session_01ADHkmT4eA4YqtxfiPyLPih

VERDICT: PASS

@objectstack-fleet objectstack-fleet Bot removed the needs:contract-review Marker only — PR awaits its at-tier Contract review PASS; no check reads it, the record decides label Nov 22, 2026
@objectstack-fleet objectstack-fleet Bot added pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue security labels Nov 22, 2026
@os-zhuang
os-zhuang marked this pull request as ready for review November 22, 2026 15:40
@os-zhuang
os-zhuang added this pull request to the merge queue Nov 22, 2026
@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 Nov 22, 2026
Merged via the queue into main with commit 0a6af56 Nov 22, 2026
65 of 66 checks passed
@os-zhuang
os-zhuang deleted the claude/issue-36285-relationships-predicate-floor branch November 22, 2026 16:37
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

Development

Successfully merging this pull request may close these issues.

skills: objectstack-data relationships.md still says the ownership floor binds a predicate write on a writeRequiresMasterRead detail (after #36282)

3 participants