Repository navigation
Commit c21945d
docs(skills): objectstack-data teaches rollupSourceUnreadableReason beside security-rollup-source-unreadable (#35042)
<!-- claude-projects-attribution: {"github_login":"os-support-ai"} -->
_Requested by **Yibo Wang** · [project
thread](https://claude.ai/code/project/chan_01BVUyyPie8gHwoPM18iABwB?thread=cmsg_01BVUyyPie8gHwoPM18iABwBLW6dHPW6sSheA32XPKZzPV)_
Fixes #34742
Clause-②: no
Metadata-protocol: none
Served-tier: CONTRACT_REVIEW_TIER
## 维护者速读
- 改了什么:`objectstack-data`
技能的汇总可见性规则多教一条出路。权限集「该看汇总、不该看明细」时,保留该列可读,并在该集的字段条目上写
`rollupSourceUnreadableReason` 说明原因;评测集加一道对应的题。
- 为什么改:这个键已随平台落地,但技能只教「给子对象读权限」或「遮掉汇总列」两条路,AI
仍会用需求禁止的读授权去压警告,或把需求要给的汇总遮掉。
- 风险与回滚:只改技能文字、一道评测题和该文件的 token 上限行,不动产品代码。同文件删了 6 处重复付账,上限不升反降(4229 →
4221)。回滚即 revert 本 PR。
- 先看:`skills/objectstack-data/rules/relationships.md` 的「Never finish
with …」一段及其示例(新教学,另把「先摘掉 View All / Modify All」改为只说 Modify All);同文件被删的 6
处重复;`scripts/check-skills-token-ratchet.mjs` 里 `relationships.md`
那一行及注释。
- 两分钟验证:`node scripts/check-skills-token-ratchet.mjs`,预期末行以 `✓
check-skills-token-ratchet: 58 authored bundle file(s) within their
ceilings` 开头。
- 需要你做的:请审阅并批准。`check-governed-merges` 判为 Tier H(`skills/**`);席位达档合同审
6964794395 判 `Security-touching: yes`(本 PR 讲授权限集字段遮罩与 Modify All
的覆盖关系),低风险 skills 通道不适用,需 os-zhuang 批准后由席位落地。合同审 PASS,L1 ACCEPT,无
must-fix / should-fix。
## What changes
**`skills/objectstack-data/rules/relationships.md`** (§ Roll-up
Summaries, the "Never finish with `security-rollup-source-unreadable`
standing" paragraph and its example). The paragraph named two ways out
per permission set. It now names three, chosen from the request:
- the set sees the children: grant the read (unchanged);
- the set sees the total but not the children: keep the column readable
and add `rollupSourceUnreadableReason` to the set's entry for it. The
warning becomes a note quoting the reason. The reason is refused blank
or beside `readable: false`;
- neither: mask the summary on that set (unchanged, see the Modify All
note below).
It ends with the card's guard: never add the reason to silence a total
the request withholds; mask it. The `client_viewer` example gains the
acknowledged entry as a commented alternative to the mask line: `fields:
{ 'project.task_count': { readable: true, rollupSourceUnreadableReason:
'Clients see progress counts, not tasks' } }`.
**The mask sentence names Modify All alone.** It said to remove "any
View All / Modify All it holds on the parent (either overrides the
mask)". That is no longer true for View All: under the ADR-0066 D2 ⑧
note of 2026-11-15 a set's own `readable: false` row binds beside that
set's own View All, and only its Modify All unbinds it. The lint rule's
own hint names Modify All only. The sentence I was extending would have
kept teaching an unneeded removal, so it now reads "after removing any
Modify All it holds on the parent (it overrides the mask)". The same
parenthetical in the existing mask eval case (id 20) is brought in line;
its assertions are untouched.
**`skills/objectstack-data/evals/hooks-security-seeds-datasources.json`**.
The mask case (id 20) stays. One case is added after it (id 27): the
request says clients should see how many tasks each project has but
never read the tasks, so the answer keeps the column readable and
acknowledges it with a reason. Ids 25 and 26 are left for the open PR
#34964, which appends them at the end of the file; this case sits
mid-file so the two do not touch the same lines.
**`scripts/check-skills-token-ratchet.mjs`**: the `relationships.md` row
follows the measurement down, 4229 to 4221, with the arithmetic in its
comment.
**`.changeset/34742-skills-rollup-source-unreadable-reason.md`**:
`@objectstack/skills` patch.
No version caveat is taught: `@objectstack/skills` is versioned and
published with the other packages, so the text ships in the release that
carries the key.
### How the file is paid for
The row had zero headroom (16916 bytes, ceiling 4229 = ceil(16916 / 4)).
The teaching adds 419 bytes. Six restatements are cut from the same
file, 451 bytes, each with the text that still carries it:
| Cut | Bytes | Still carried by |
|:---|---:|:---|
| The `'grid'` and `'form'` bullets under "Inline-edit form factor" |
236 | The code comments beside the three `inlineEdit` values ("editable
line-item grid (fast bulk entry; thin children)", "read-only list; …
opens the FULL form") and the smart-default sentence (rich or form-only
fields, or more than ~8 editable fields, pick `form`) |
| "Where `inlineEdit` is the write side, the related list … is the read
side" lead-in | 67 | The heading "Detail-page related lists (the
read-side mirror)" and the `relatedList: 'primary'` comment "read side:
a body table" |
| "part of the record's main content:" in the `'primary'` bullet | 37 |
The same bullet: "a full-width table in the record's detail body" |
| Comment "One assignment per (project, employee) pair." | 52 | The
index line under it: `{ fields: ['project_id', 'employee_id'], unique:
'organization' }` |
| Comment "Child: Contact (independent lifecycle) of an account" | 55 |
The Relationship Types table (`lookup`: Independent) and the example's
own `account_id` lookup |
| Comments "On the PARENT object:" (roll-up block) and the second "On
the CHILD object's FK field:" (related-list block) | 60 | "A parent
`summary` field aggregates a child collection" directly above; the first
"On the CHILD object's FK field:" comment in Inline Editing, and "The
relationship flags" lead-in |
Net: 16916 to 16884 bytes, ceil(16884 / 4) = 4221. No raise.
### Size readings (`skills/**`)
| Reading | Before (`6d2db1d7ef`) | After (`df1e9b4764`) |
|:---|---:|---:|
| `rules/relationships.md`, lines | 414 | 409 |
| `rules/relationships.md`, bytes / tokens | 16916 / 4229 | 16884 / 4221
|
| All `SKILL.md` files, lines (none touched) | 4730 | 4730 |
| All authored `.md` under `skills/` outside `evals/`, lines | 18036 |
18031 |
| Eval file (unpriced), lines / bytes | 245 / 22460 | 255 / 23747 |
## Tests
All on head `df1e9b4764`.
<details><summary>Premise, re-measured on <code>origin/main</code>
6d2db1d</summary>
- `relationships.md:228-234` named grant or mask only.
- `git grep -n rollupSourceUnreadableReason -- skills` answered zero
lines (control: the same word hits
`packages/lint/src/validate-rollup-source-visibility.ts` and
`packages/spec/src/security/permission.zod.ts`).
</details>
<details><summary>Every taught clause, probed against the built lint
rule and the spec schema</summary>
One throwaway script (not committed) ran
`validateRollupSourceVisibility` from the rebuilt `packages/lint/dist`
over a `project` / `task` stack with a `client_viewer` set, and
`FieldPermissionSchema.safeParse` from `@objectstack/spec/security`:
```text
none [["warning","security-rollup-source-unreadable", …]]
mask []
reason [["info","security-rollup-source-unreadable","… Acknowledged on the set: \"Clients see progress counts, not tasks\""]]
parse reason+readable:true ok
parse blank refused: rollupSourceUnreadableReason
parse reason+readable:false refused: rollupSourceUnreadableReason
mask + View All []
mask + Modify All ["warning"]
```
So: the reason drops the finding to `info` (the "note" the docs name)
under the same id and quotes it; it is judged per set and per column
entry (`acknowledgedReason` reads the set's own entry for that column
only); a blank reason and a reason beside `readable: false` are refused
at parse; the set's own mask binds beside its own View All and not
beside its own Modify All.
</details>
<details><summary>Eval assertions, checked by script</summary>
No gate reads eval assertions outside `ui/`, so a script checked the
file: 25 cases, 25 distinct ids, every `must_contain` token is in its
`expected_output`, no `must_not_contain` token is, 0 violations.
The new case's tokens are layout-independent, because
`packages/qa/scenarios/src/skill-evals/grade.ts` matches literal,
case-sensitive substrings with no normalisation: `summary`,
`project.task_count`, `rollupSourceUnreadableReason`. Two checks are
left out on purpose, since neither can be spelled without depending on
whitespace or quoting: that the entry is not `readable: false`, and that
the set carries no `task` read grant. A wrong answer of either kind
(mask, or grant the read) still fails the case, because it has no reason
to carry `rollupSourceUnreadableReason`.
</details>
No ablation: the diff changes skill prose, an eval fixture and a ratchet
row, and no tested behaviour.
## Acceptance notes
- The card's proposed text is fitted to the skill's style and to the
measured behaviour; the one departure from it is the Modify All
correction above.
- The existing mask case (id 20) keeps its layout-dependent tokens; only
the new case follows the layout-independent rule.
- The eval file is also edited by open PRs #35022 and #34964. `node
scripts/pm/overlap-check.mjs` against `origin/main` 65ec3c5 and the
open PR heads answered `VERDICT clean exit 0` (#35038, #35022 and #34964
each merge cleanly with this branch).
## Verification
<details><summary>Local gates: 64 derived, 62 run, 2 NOT
MEASURED</summary>
- `pnpm --workspace-concurrency=2 --filter '@objectstack/lint...' build`
under the verify lock: `VERDICT command-exit 0`.
- `node scripts/pm/dispatch-gates.mjs --commands` then `--ran`: `✓
dispatch-gates --ran: 64 derived famil(ies) accounted for — 62 run, 2
NOT-MEASURED (2 DERIVED from a recorded exit 3).` Every run family
exited 0.
- NOT MEASURED: `check:dual-build-cjs-loads`, reason: exit 3,
prerequisite not met (needs a full build); `check:lean-entry-closure`,
reason: the same. Both are left to CI.
- `node scripts/check-skills-token-ratchet.mjs`: exit 0, `✓
check-skills-token-ratchet: 58 authored bundle file(s) within their
ceilings; 10 generator-owned file(s) and 30 eval fixture(s) measured,
not ratcheted.` Its `--self-test`: exit 0.
- `pnpm check:skill-links`: exit 0, `✓ check-skill-links: 256 relative
link(s) in 72 published skill file(s) resolve; 130 fragment(s) name a
real heading under GitHub's slug rule.`
- `test:repo` and the repo-wide lint are CI's runs, not run locally.
</details>
---
_Generated by [Claude
Code](https://claude.ai/code/session_01WGufziunkXbDT7wUWqfmWz)_
<!-- signed: repo:objectstack#3 · os-support-ai ·
session_01WGufziunkXbDT7wUWqfmWz -->
Co-authored-by: Claude <noreply@anthropic.com>1 parent 990d063 commit c21945d
4 files changed
Lines changed: 55 additions & 21 deletions
File tree
- .changeset
- scripts
- skills/objectstack-data
- evals
- rules
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1090 | 1090 | | |
1091 | 1091 | | |
1092 | 1092 | | |
1093 | | - | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
1094 | 1109 | | |
1095 | 1110 | | |
1096 | 1111 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
197 | | - | |
| 197 | + | |
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
203 | 203 | | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
204 | 214 | | |
205 | 215 | | |
206 | 216 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
| |||
138 | 137 | | |
139 | 138 | | |
140 | 139 | | |
141 | | - | |
142 | 140 | | |
143 | 141 | | |
144 | 142 | | |
| |||
186 | 184 | | |
187 | 185 | | |
188 | 186 | | |
189 | | - | |
190 | 187 | | |
191 | 188 | | |
192 | 189 | | |
| |||
228 | 225 | | |
229 | 226 | | |
230 | 227 | | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
235 | 235 | | |
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
| 241 | + | |
| 242 | + | |
241 | 243 | | |
242 | 244 | | |
243 | 245 | | |
| |||
288 | 290 | | |
289 | 291 | | |
290 | 292 | | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
298 | 296 | | |
299 | 297 | | |
300 | 298 | | |
| |||
344 | 342 | | |
345 | 343 | | |
346 | 344 | | |
347 | | - | |
348 | | - | |
| 345 | + | |
349 | 346 | | |
350 | 347 | | |
351 | 348 | | |
352 | 349 | | |
353 | 350 | | |
354 | | - | |
355 | 351 | | |
356 | 352 | | |
357 | 353 | | |
| |||
367 | 363 | | |
368 | 364 | | |
369 | 365 | | |
370 | | - | |
371 | | - | |
| 366 | + | |
372 | 367 | | |
373 | 368 | | |
374 | 369 | | |
| |||
0 commit comments