Repository navigation
feat(spec, lint): a permission set can acknowledge a meant roll-up read with rollupSourceUnreadableReason - #34775
Conversation
…ad with rollupSourceUnreadableReason security-rollup-source-unreadable is advisory, but os lint --strict fails on any warning and there was no way to declare a meant pair. A set's entry for a summary column can now carry a non-blank reason; that one finding becomes an info note quoting it. The runtime reads no part of the key. Claude-Session: https://claude.ai/code/session_01ADHkmQbFKVWVEYrgUsNnfJ Co-authored-by: Claude <noreply@anthropic.com>
…SourceUnreadableReason Claude-Session: https://claude.ai/code/session_01ADHkmQbFKVWVEYrgUsNnfJ Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 2 package(s): 3 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 1 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 173 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin d4146b7007524673a7ac7e6784755d05954d9528 && git checkout d4146b7007524673a7ac7e6784755d05954d9528
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin c12fe6649ffeb8a83dae916e8c420fa68c88a2cc b61b6d75111e8747f7fcfec1abfb3703cf1a535d && git checkout -B drift-repro c12fe6649ffeb8a83dae916e8c420fa68c88a2cc && git merge --no-ff b61b6d75111e8747f7fcfec1abfb3703cf1a535d
node scripts/docs-audit/affected-docs.mjs --json c12fe6649ffeb8a83dae916e8c420fa68c88a2cc
|
…adableReason Claude-Session: https://claude.ai/code/session_01ADHkmQbFKVWVEYrgUsNnfJ Co-authored-by: Claude <noreply@anthropic.com>
|
l2-review#4 · os-steve · session_01ADHkmP44onN8RMzsPMqjRq Contract-review-claim: session_01ADHkmP44onN8RMzsPMqjRq · head 6b6146d · 2026-11-17T10:15Z |
|
l2-review#4 · os-steve · session_01ADHkmP44onN8RMzsPMqjRq Contract-review-claim: session_01ADHkmP44onN8RMzsPMqjRq · head 7a8180f · 2026-11-17T10:17Z |
|
l2-review#4 · os-steve · session_01ADHkmP44onN8RMzsPMqjRq Contract reviewServed-tier: How this head was read: the net diff of Security-touching: yes (the field-level permission surface of a permission set). ① Derived judgments
② Semver levelClause-②: yes (widening) — one new optional authorable key; The changeset declares ③ Boundary flags
④ Design judgment
S1 (should-fix) — the published text says the acknowledgement "changes nothing at runtime: the column is read under the parent field's own field-level security either way", and the jsdoc says "the field merge, the read mask ... are unchanged". That is true of the key and false of the act the key requires. The key can only be written on a S2 (should-fix) — the new cross-key refusal has a second authoring door that this PR leaves able to produce the refused shape. Read, not reviewed:
Prose read for agreement with the schema only: Nits (no effect on correctness or the contract):
S1 and S2 are open on this head. Neither changes a parse result or the rule's judgment, so the verdict is PASS on the contract as ruled; each fix that moves a file in Scope owes a delta review on the new head. Implemented-by: VERDICT: PASS |
|
l2-review#4 · os-steve · session_01ADHkmP44onN8RMzsPMqjRq Contract reviewServed-tier: How this head was read: the net diff of Security-touching: yes Security-touching reads yes: the field-level permission surface of a permission set. ① Derived judgments
② Semver levelClause-②: yes (widening) — one new optional authorable key; The changeset declares ③ Boundary flags
④ Design judgment
S1 (should-fix) — the published text says the acknowledgement "changes nothing at runtime: the column is read under the parent field's own field-level security either way", and the jsdoc says "the field merge, the read mask ... are unchanged". That is true of the key and false of the act the key requires. The key can only be written on a S2 (should-fix) — the new cross-key refusal has a second authoring door that this PR leaves able to produce the refused shape. Read, not reviewed:
Prose read for agreement with the schema only: Nits (no effect on correctness or the contract):
S1 and S2 are open on this head. Neither changes a parse result or the rule's judgment, so the verdict is PASS on the contract as ruled; each fix that moves a file in Scope owes a delta review on the new head. Implemented-by: VERDICT: PASS |
…es readable: true in the field merge Contract review S1: the key is not read at runtime, but the entry that carries it is a declaring vote, so adding one to a set with no entry restores the column for holders whose other sets mask it. Also: the reason is quoted as a string literal, the hidden-entry refusal states its cause precisely, and the aggregated-field and filter-field arms are pinned. Claude-Session: https://claude.ai/code/session_01ADHkmQbFKVWVEYrgUsNnfJ Co-authored-by: Claude <noreply@anthropic.com>
|
l2-review#4 · os-steve · session_01ADHkmP44onN8RMzsPMqjRq Contract-review-claim: session_01ADHkmP44onN8RMzsPMqjRq · head b61b6d7 · 2026-11-17T10:34Z |
|
l2-review#4 · os-steve · session_01ADHkmP44onN8RMzsPMqjRq Contract reviewServed-tier: Delta review on top of record 6945332987 (PASS on head How this head was read: the rework commit The merge: the head has two parents, Security-touching: yes The diff is on the field-level permission surface of a permission set. ① Derived judgments
② Semver levelUnchanged. Clause-②: yes (widening), one new optional authorable key; ③ Boundary flags
④ Design judgment
Prose read for agreement with the schema only: Prior findings: S1: closed S2 is closed by the follow-up card #34786, named in the PR's Acceptance notes; N3 by the Acceptance note that states the pre-acknowledgement and the seat's choice. New nits (no effect on correctness or the contract):
No must-fix, no should-fix. The rework changes text and one message rendering; no parse result and no judgment of the rule moved, the statements added are true to the merge code at head, and the follow-up for the console editor is filed. The verdict rests on the tree; the pending check-runs named under ③ are not part of it and are the seat's to read. Implemented-by: VERDICT: PASS |
|
repo:objectstack#2 · os-steve · session_01ADHkmPJxG4vBVaLCBWLcWJ Final head · 2026-11-17T11:05Z
|
|
repo:objectstack#2 · os-steve · session_01ADHkmQtnGcx7hYEL11ptVs 席位核对L1 first review: ACCEPT · PR #34775 · card #34664 (name ruling 6943835606) · area o2-A · L1-a2 · 2026-11-17T11:09Z Head-sha: Final-head comment 6946277914. Contract review: first review 6945332987 at Checklist
L2 and landing
|
|
repo:objectstack#2 · os-steve · session_01ADHkmQ2SN4K183oqAvUajA Seat record · 2026-11-17T11:19Z · Head-sha: b61b6d7 维护者速读
席位意见:同意合并。给有意的「只看汇总」一个声明式出口,比让作者放开明细或藏掉总额更安全;副作用(条目投一票)已写进文档。 席位核对
|
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 44080060061 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
Requested by Steve · project thread
Fixes #34664
Clause-②: yes (widening) — one new optional authorable key,
rollupSourceUnreadableReasononFieldPermissionSchema(a permission set'sfieldsentry); nothing that parsed before is refusedMetadata-protocol: added
Skills-docs: follow-up #34742
维护者速读
rollupSourceUnreadableReason: '理由',声明「这个集本就该看汇总、不看明细」;写了之后,这个集这一列的security-rollup-source-unreadable由 warning 降为 info 并引出理由,os lint --strict不再因它失败。--strict把 warning 判失败、又没有任何确认办法,HotCRM(hotcrm#2557/fix(automation): bind flow triggers on cold boot, not just after HMR reload #2560,账户下挂发票与收款)只能二选一:给子对象开读权限(会放开所有行)或藏掉总额。键名与落位由席位定(卡上 6943835606)。readable: true一票(最宽者胜),原本没有该列条目的集为挂理由新加条目,会让同时持有屏蔽集的用户重新看到这一列,文档与 describe 已写明(L2 S1)。空白理由、readable: false旁带理由在解析时拒收。其它集、其它列和 row-scoped 提示不受影响。回滚即还原本 PR。packages/lint/src/validate-rollup-source-visibility.ts的acknowledgedReason与unreadable闭包;packages/spec/src/security/permission.zod.ts新键与第二个.refine;packages/lint/src/validate-rollup-source-visibility-acknowledged-34664.test.ts。pnpm --filter @objectstack/lint exec vitest run src/validate-rollup-source-visibility-acknowledged-34664.test.ts,预期 9 例全绿。What changes
security-rollup-source-unreadableis advisory by its own header ("the pair is legal and is often meant"), but it emits awarning,os lint --strictfails on any warning (packages/cli/src/commands/lint.ts:1175-1179), andpackages/lint/ the CLI had no per-finding acknowledgement. The seat named the key and its placement (card comment 6943835606): option A of the three offered.packages/spec/src/security/permission.zod.ts).FieldPermissionSchemagainsrollupSourceUnreadableReason: string(optional). Two parse refusals: a blank reason (NON_BLANK_STRING, which projects into the JSON Schema), and a reason besidereadable: false(a second object.refineon pathrollupSourceUnreadableReason; the column is hidden, so there is no read to acknowledge). The describe says the key is read only at authoring time, and (contract review S1) that the entry carrying it is an ordinary declaring entry: it votesreadable: truein the field merge, so on a set with no entry for the column, adding one restores the column for holders whose other sets mask it. The same sentence is in the jsdoc,rule-explanations.ts,fields.mdxandsecurity.mdx.FieldPermissionSchemais also reused byGetObjectPermissionsResponseSchema.fieldPermissions; per the seat the type is not split, and the server never sends the key.packages/lint/src/validate-rollup-source-visibility.ts).acknowledgedReason(set, column)reads the set's OWN entry for the summary column. When it carries a non-blank reason, everysecurity-rollup-source-unreadablefinding for that set and column (object, aggregated-field and filter-field arms) is emitted atinfo, same rule id, message endingAcknowledged on the set:plus the reason as a JSON string literal (quotes and line breaks stay escaped), pathpermissions[i].fields["OBJECT.SUMMARY"].rollupSourceUnreadableReason, and a hint saying how to restore the warning. Other sets, other columns, andsecurity-rollup-source-row-scopedare unchanged. Docblock table and a new section document it.rule-explanations.ts(the rule's explanation gains the acknowledgement paragraph),content/docs/data-modeling/fields.mdx(roll-up section, with an example),content/docs/deployment/validating-metadata.mdx(the advisory row),content/docs/protocol/objectql/security.mdx(the field permission reference, which enumerates the entry's keys; added after the docs-drift comment named the page).packages/spec/liveness/permission.jsongainsfields.children.rollupSourceUnreadableReason=live(lint is the whole feature, the same posture as dashboardwidgets.suppressWarnings); regeneratedauthorable-surface/security.json,liveness/state-counts/permission.md,content/docs/references/security/permission.mdx,content/docs/references/api/protocol.mdx..changeset/34664-rollup-source-unreadable-reason.md:@objectstack/specminor,@objectstack/lintminor.Tests
packages/lint/src/validate-rollup-source-visibility-acknowledged-34664.test.ts(9 cases, throughrunAuthoringRules): control without the key (both roll-ups warn); key on one column ⇒ that findinginfo, reason quoted, path at the key, the other column stillwarning; every column acknowledged ⇒ no warning left; another set reading the same column still warns; a blank reason on the raw door acknowledges nothing; the row-scoped note is untouched; the aggregated-field and filter-field arms are acknowledged the same way; a quote and a line break in the reason stay inside the quoted literal; a parsed set answers what the raw one does.packages/spec/src/security/permission.test.ts: 5 new cases underrollupSourceUnreadableReason(accepts and keeps it; absent key does not materialise; blank and non-string refused; refused besidereadable: false; rides a permission set'sfields).Acceptance notes
info. The acknowledged finding keepssecurity-rollup-source-unreadable(only its severity moves), so--jsonconsumers filtering by id still see the pair. One consumer filters by id without severity:packages/qa/scenarios/src/runner/orchestrate.ts#rollupSourceChargesstill charges an acknowledged pair when the card withholds the child from that persona. That is intended: an acknowledgement does not make a withheld total un-leaked, and its message regex still reads the new message (no$anchor). Not changed here.info. The seat chose not to add that in this PR (contract review N3).ui/packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.tsx#updateFieldPermclears onlywhenon Read off, so an entry carrying a reason turns into the refusedreadable: false+ reason shape;permission-slice.ts#withFieldBitsdrops the reason silently. Out of this card's file surface; filed by the seat as console permission matrix: turning Read off leaves rollupSourceUnreadableReason behind (refused shape) and the bulk shortcut drops it silently #34786 (Blocked-by lint:security-rollup-source-unreadableis advisory ("the pair is legal and is often meant") but has no way to acknowledge a meant pair, soos lint --strictforces either a widened child read or a hidden total #34664).Verification
Premise on origin/main f6f5b50
severity: 'warning'.packages/cli/src/commands/lint.ts:1175-1179:failing = errors.length + (strict ? warnings.length : 0).packages/lint/srcor the CLI; the only metadata suppression key is the dashboard widget'ssuppressWarnings(packages/spec/src/ui/dashboard.zod.ts:1415);packages/lint/src/index.ts:1127states "the CLI has no per-rule suppression".node scripts/pm/check-prior-rulings.mjs --card 34664: ADR-0035/0061/0063/0071/0074/0079 hits; none rules on acknowledging an advisory finding. ADR-0035's roll-up semantics are unchanged.Package tests and typecheck
pnpm --filter @objectstack/lint test: Test Files 216 passed (216), Tests 9124 passed (9124).pnpm --filter @objectstack/spec test: Test Files 848 passed (848), Tests 27174 passed, 1 todo.pnpm --filter @objectstack/lint typecheckandpnpm --filter @objectstack/spec typecheck(withNODE_OPTIONS=--max-old-space-size=4096): exit 0, test-typecheck debt held.Ablations (both legs restored, `git diff HEAD` empty)
acknowledgedReasonmade to returnundefined(anchorreturn nonBlank(reason) ? reason.trim() : undefined;, 1 → 0, viascripts/ablation-replace.mjs) ⇒ the new suite goes red, 4 failed / 3 passed (the four acknowledged cases; the control, blank-reason and row-scoped cases stay green, as expected).readable: falserefine made vacuous ((p) => true || …) ⇒refuses a reason beside readable: falsegoes red, 1 failed / 4 passed.Derived gates
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack, each command run with< /dev/null, exit captured before any pipe; reconciliation--ran: 115 derived, 114 run, 1 NOT-MEASURED, 0 UNRUN, every run family exit 0. After the security.mdx commit (head 7a8180f) the derived set is unchanged; the docs families re-run on it (check:doc-anchors,check:doc-authoring,check-affected-docs,check-drift-comment,check:docs-transcript-drift,check:nul-bytes) exit 0.check:docs,check:livenesscounts) and on prerequisites (lint dist not built; a shallow clone forcheck-plugin-teardown-shape --self-test). Regenerated withgen:schema,gen:docs,gen:liveness-counts, built@objectstack/lint, unshallowed, and re-ran those families: all exit 0.check:generated(derived after merging origin/main) exit 0 withNODE_OPTIONS=--max-old-space-size=4096(without it the test-typecheck step runs out of heap, not a finding).pnpm check:dual-build-cjs-loads, which needs every package'sdist/(a fullpnpm build); CI runs it./mnt/project-files/objectstack-seat2/34664-gates-ran.txt(project file).Rework round (contract review 6945280556: S1, N1, N2, N4, N5)
rule-explanationstests, 60/60;@objectstack/linttypecheck exit 0. Spec:permission.test.ts127/127.@objectstack/specrebuilt;check:generatedexit 0 (withNODE_OPTIONS=--max-old-space-size=4096). Re-run, all exit 0:check:docs,check:authorable-surface,check:liveness,check:doc-anchors,check:doc-authoring,check-affected-docs,check:docs-transcript-drift,check:nul-bytes,check:doc-security-posture.🤖 Generated with Claude Code
https://claude.ai/code/session_01ADHkmQbFKVWVEYrgUsNnfJ
Generated by Claude Code