Skip to content

fix(core, plugin-security, lint)!: a permission set's own field-mask row binds its own holders over that set's View All vote - #34082

Merged
os-zhuang merged 7 commits into
mainfrom
claude/area-A2-33828
Nov 16, 2026
Merged

os-zhuang merged 7 commits into
mainfrom
claude/area-A2-33828

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Steedos · project thread

domain:server#5 · zhuangjianguo · session_01QsR2jVPGBoi3MCGoKbW1Hv

Part of #33828

This PR lands the View All half of the card, as the maintainer ruled it. The Modify All half (whether a Modify All set's own row binds the same way) stays open on the card under the seat's ruling, so the card stays open when this merges.

This round (takeover claim 6919765887, seat repo:objectstack#1): the PR was approved and queued, then left the merge queue (run 43877147326). Two View All controls in formula-reads-hidden-field-masking.test.ts, which came to main after the previous head was measured, booted View All on the same set that declares the readable: false row, so they pinned the reading this PR changes. They are brought under the rule here. No source changes in this round.

Clause-②: yes (narrowing)
Metadata-protocol: semantic
Skills-docs: none — skills/** teaches no super-user field vote: its View All text covers rows and posture only (objectstack-data/rules/security.md, relationships.md), so no page states the rule this note amends.

维护者速读

  • 改了什么:权限集自己写的字段行 readable: false,现在压过同一个权限集的"查看全部"(View All)字段投票,只靠这个权限集的人读不到该字段。数据接口和 /auth/me/permissions 答案一致。ADR-0066 D2 ⑧ 追加一条 2026-11-15 的注,只改 View All;"修改全部"(Modify All)保持现状,等裁决,所以本 PR 只是卡片的一半(Part of)。本轮(接手)只改测试:合并 main 后,formula-reads-hidden-field-masking.test.ts 里两条 View All 对照仍按旧规则写(View All 与 readable: false 在同一个权限集上),导致出队;现改为按新规则断言,无源码改动。
  • 为什么改:维护者在 security: a permission set's own readable:false field row must win over that same set's View All field vote (amend ADR-0066 D2 ⑧) #33828 裁定 A(平台修):同一权限集既给 View All 又显式隐藏某字段时,隐藏要生效。此前按 2026-11-02 的注,这一行对该权限集的持有人不起作用。
  • 风险与回滚:对"同一权限集 View All + 自己的 readable: false 行"的持有人,该字段从可读变为隐藏(BREAKING,语义变化,changeset 按 minor 发)。升级指南新增一条目,告诉管理员怎么找出这种组合、该删行还是保留。平台自带的默认权限集没有这种组合。另一个权限集的 View All / Modify All 照旧让字段可读,平台管理员场景不变。回滚即 revert 本 PR。
  • 先看:① packages/core/src/security/effective-object-permissions.ts 的 superuserFieldVote 与 declaresOwnReadMask(规则本体);② docs/adr/0066-unified-authorization-model.md ⑧ 下新增的 2026-11-15 注(受管文本);③ packages/spec/src/migrations/entries/semantic/18.permission-own-field-mask-binds-over-own-view-all.ts(随包发布的升级指南条目,写给管理员看的话)。
  • 两分钟验证:pnpm --filter @objectstack/core build && pnpm --filter @objectstack/plugin-security exec vitest run src/fls-own-field-mask-33828.test.ts src/formula-reads-hidden-field-masking.test.ts,预期 2 个文件 92 项全过(本卡的 24 项,加上计算字段屏蔽套件的 68 项,其中三条 View All 对照按新规则写)。
  • 需要你做的:审阅 ADR-0066 D2 ⑧ 新增的 2026-11-15 注(受管文本),同意后由席位安排落地。

What changes

The rule (ADR-0066 D2 ⑧, note of 2026-11-15). A permission set that holds View All on an object, and not Modify All, casts no read vote on a field its own fields row declares readable: false. That row is the set's whole say on the field. "Explicit" is literal: an omitted readable parses to true and is never a mask.

One function, asked per field. superuserFieldVote(sets, objectName, fieldName?) in packages/core/src/security/effective-object-permissions.ts answers the per-field vote; declaresOwnReadMask reads the set's own row. Both field merges ask it with the field's name: PermissionEvaluator.getFieldPermissions (every data door) and buildEffectiveFieldPermissions (the fields slot of /auth/me/permissions). Without a field name the function answers object-wide, as before; the one caller that asks that way (conditionedFieldEntries, for the Modify All reading the access explanation shows) is unchanged.

Not moved. Another set's View All or Modify All on the object still makes the field readable (and, under Modify All, editable) for a caller who holds both sets, which is the case ruling of record 6573563853 fixed. A View All set still votes on every field it does not mask itself. View All never granted an edit, so an edit lock beside it binds as before. Modify All is unchanged, pending a ruling: a set holding modifyAllRecords votes on every field, its own rows included. The row-level bypass is untouched.

One case said aloud. A holder of the masked View All set who also holds a plain set that grants the object and names no field does not read the field. Only a read vote restores it: another set's own readable: true row, or its View All or Modify All on the object. The changeset and authorization.mdx say so in those words.

Lint. security-superuser-field-mask-inert reports only a row its own set's Modify All unbinds, and its message, hint, user sentence (eleven locales) and os explain entry name Modify All alone. The finding's userTextParams drop bypass, since one bypass is reported. security-controlled-by-parent-master-reference-hidden is skipped only beside Modify All, so it now speaks beside View All. The roll-up source rules (validate-rollup-source-visibility.ts) read a View All set's own mask as hiding the field and tell a View All parent the plain remedy. Rule ids are unchanged.

ADR-0066. One blockquote note appended under ⑧, after the 2026-11-02 note and before ⑨. It quotes the ruling as the card states it, covers View All only, says Modify All is unchanged pending a ruling, and replaces the 2026-11-02 sentence "a set can no longer withhold a field from its own View All / Modify All holders" for View All only. The earlier notes and the status line are untouched.

Declared kind and upgrade guide (claim amendment 2, after contract review 6900701652). The kind is semantic: what an author already writes, a readable: false row in a set that holds View All on the object, changes meaning for that set's holders. The changeset grades @objectstack/core and @objectstack/plugin-security minor, and lint and spec patch. Clause-② is yes, because the exported superuserFieldVote gains an optional third parameter and reads the fields of the sets it is given; called with two arguments it answers as before. The ADR-0087 disposition is registered permission-own-field-mask-binds-over-own-view-all: one semantic entry under packages/spec/src/migrations/entries/semantic/, which ships in the upgrade guide. It carries no mechanical conversion, because deleting the row and keeping it are both access decisions that only the author can make. It tells an administrator how to find the pair and what to decide.

Docs and comments (claim amendment 6895411337). Two sentences in content/docs/permissions/authorization.mdx and permissions-matrix.mdx state the own-row exception. The doc comment above FieldPermissionSchema (packages/spec/src/security/permission.zod.ts) states it too; no .describe() text, schema or generated artifact changes (check:docs, check:generated and check:api-surface are green with no regeneration). One fixture comment in explain-principal-person.test.ts no longer says the pair cannot withhold a field.

Tests

New pins live in files of their own; the shared files keep only the existing pins the note flips, edited in place.

  • packages/core/src/security/superuser-field-vote-33828.test.ts (6): the row binds beside View All, by the object entry and by the wildcard; the set's View All still votes on fields it does not mask; reverse pin for another set's View All or Modify All; Modify All unchanged; edit lock and "explicit is literal"; superuserFieldVote per field and object-wide.
  • packages/plugins/plugin-security/src/fls-own-field-mask-33828.test.ts (24): the same eight readings taken from each merge (getFieldPermissions, /auth/me/permissions), one describe per merge; seven parity pairs; the row-level bypass still held.
  • packages/lint/src/validate-security-posture-own-field-mask-33828.test.ts (6) and validate-rollup-source-visibility-own-field-mask-33828.test.ts (4): View All beside the set's own mask is not reported, on a parsed set, through the wildcard and under a shadowed wildcard; both bits on one entry is reported; the finding names Modify All alone and its userTextParams; the hidden master reference is reported beside View All; the roll-up rules on parent and child.
  • packages/qa/dogfood/test/fls-own-field-mask-33828.dogfood.test.ts (5), the door-level pin: on a booted showcase, two sets authored through the metadata door and two signed-up members. A holder of the pair alone is told by /auth/me/permissions that the hidden fields are unreadable, and the list door serves the rows without them. The control member also holds a second set with View All on the object and no field row: both doors serve the fields, and none is editable.
  • Brought under the rule after the merge of main (this round): packages/plugins/plugin-security/src/formula-reads-hidden-field-masking.test.ts, its controls: what the rule leaves unchanged block. A boot option gives the fixture's second set View All on the object. Three cases, each through the computed-field reads the suite is about:
    • View All on the set that hides the field does not read it: the field and the computed fields over it stay withheld (new): the field, the two formulas, the stored copy and the stored field over that copy are absent, and a readable input is still served.
    • a holder of another set's View All reads the hidden field and the formulas over it (was a View All holder reads …, now through the second set).
    • a holder of another set's View All is still withheld a computed field over a capability-gated or masked field (the vote lifts readable: false only) (was a View All holder is still withheld …, now through the second set).
  • Flipped in place: validate-security-posture.test.ts (the inert-rule cases that used View All, the master-reference control, one reachability fixture), finding-user-text.test.ts (the three sentences and their params), validate-rollup-source-visibility.test.ts (the View All cases and one inline snapshot).

Ablations. Thirteen, each through scripts/ablation-replace.mjs on the committed fix, restored to the HEAD blob with git diff HEAD empty. Where the subject resolves through @objectstack/core's dist/ (plugin-security, dogfood), core was rebuilt for the mutated and the restored leg and scripts/ablation-dist-preflight.mjs read the marker present, then --absent. Counts are red tests under the mutation; every restored run was green. Rows 1 to 11 were read on head 0245cb6d7; the source they mutate is byte-identical on this head. Row 12 was read on head 25dcfa863. Row 13 was read on this head.

# Rule put back Red under the mutation
1 the set's own row is never read core 3, plugin-security 8
2 getFieldPermissions asks the vote object-wide plugin-security 7 (its four readings and three parity pairs; the /auth/me/permissions readings stayed green)
3 the row-blind merge asks the vote object-wide core 2, plugin-security 7 (the mirror of 2)
4 the set's own row also cancels another set's vote core 1, plugin-security 4 (the reverse pins)
5 the own-row rule applied to Modify All too core 2, plugin-security 2
6 an omitted readable read as a mask core 1
7 the inert rule gated on View All again lint 6 (three in the new file, three flipped pins)
8 the master-reference rule skipped beside View All lint 1
9 the roll-up rule reads View All as unbinding the mask lint 2
10 the roll-up hint says View All must go first lint 1
11 the row-level bypass consults the field rows core 2, plugin-security 3
12 the set's own row is never read, asked at the doors dogfood 2 (the holder at /auth/me/permissions and at the list door; the premise and the two controls stayed green), core 3
13 the set's own row is never read, asked by the computed-field suite plugin-security 1 (the new own-set case; the six other controls, the two other-set cases among them, stayed green)

Row 13: the vote's own-row check deleted from packages/core/src/security/effective-object-permissions.ts, core rebuilt, ablation-dist-preflight.mjs @objectstack/core … --absent exit 0, then the controls block: 1 failed, 6 passed. The core build exited 1 on that leg: its declaration step refuses the now-unused helper under noUnusedLocals, after the JavaScript was emitted; the preflight read the marker absent from all 12 built files, and the six other controls passing shows the built module loaded. Restored: blob 5b14742f1880 equal to HEAD, git diff HEAD empty, core rebuilt (exit 0), marker present in dist/index.js and dist/index.cjs, tree clean, the block 7 passed.

A control on the new boot option, one run: with the second set's View All removed from the two other-set cases (ablation-replace.mjs --expect 2), both went red and the five others stayed green; restored to the HEAD blob. So those two cases read the field through the second set's View All, not through the second set's plain grant.

A first attempt at mutation 1 was void: its build never got a turn on the shared verify lock, so nothing was measured. It was stopped, the file was restored to the HEAD blob, and the series ran afterwards in one hold of the lock (VERDICT command-exit 0).

Red first. Before the fix, with the closure built on the unfixed source, the new unit pins read core 3 red and plugin-security 8 red.

Acceptance notes

  • Modify All. Whether a Modify All set's own row should bind the same way is not decided here. The amendment says so, the pins hold today's behaviour, and the card stays open for that half.
  • Declarations. Clause-②: yes (narrowing) and Metadata-protocol: semantic are the lines of claim amendment 2. A field a holder was served is now withheld, so the changeset carries the BREAKING banner and its ADR-0087 marker, and the full dogfood battery is owed on the final head (see Verification).
  • ADR-0087. registered permission-own-field-mask-binds-over-own-view-all. check-adr-0087-registration reads the entry as new in this diff.
  • userTextParams.bypass. Dropped from this one rule's finding. The sentence is rendered by the producer's own catalog, so no consumer reads the key apart from that catalog.
  • FieldPermissionSchema.when description. Not edited. Its sentence about the super-user vote speaks of a co-held set that says nothing about the field, which still holds.
  • content/docs/permissions/field-level-security.mdx. Not in this diff. Its sentence that a mask holds unless another set unmasks it does not name the own-set Modify All case; that line belongs with the Modify All ruling.
  • Local scope of the dependents run. The dependents were run in full on head 0245cb6d7 (list under Verification). No round since has changed the source of core, plugin-security or lint, so on this head the local runs are the four touched packages, dogfood's typecheck, the door pin, and the battery. @objectstack/core has 62 direct dependents and @objectstack/lint has 12, and beyond the listed ones they were not run locally. The selection was a git grep of the symbols and rule ids this diff moves, whose positive control is that it hits the packages that were run. It is blind to a test that reaches them without naming them. CI's Test Core runs every package on this head.
  • Base. origin/main was merged at 898655a9d in this round, before the readings of this head. Of this diff's files, main had changed only packages/lint/src/rule-explanations.ts (two unrelated entries) and brought formula-reads-hidden-field-masking.test.ts; the source this PR changes in core, plugin-security and lint is byte-identical to head 25dcfa863.
  • Queue ejection (run 43877147326). A semantic conflict, not a flake: the two controls asserted that a set's View All reads a field the same set declares readable: false. The rule they were meant to guard (a computed field is served only when its inputs are) is unchanged. Their View All readings are kept through another set, which the rule leaves as it was, and the own-set reading is pinned the new way.
  • Other tests that could pin the old reading. Every test file on this head that names viewAllRecords beside a readable: false row was listed (20 files). Eight are this PR's own files, flipped or written under the rule in earlier rounds. The other twelve were run green on this head: effective-object-permissions.test.ts (core); agent-ceiling-clamp, controlled-by-parent-master-edit-user-message, controlled-by-parent-master-reference-unreadable-refusal, explain-engine, fls-superuser-vote and security-plugin (plugin-security); permission.test.ts (spec); admin-ledger-decision-metadata and fls-superuser-vote (dogfood, in the battery); and permission-slice.fieldRule-26597.test.ts under ui/ (CI's Test UI). Apart from the computed-field suite, none of them changed on main since the previous base 86350e125. None needed an edit.
  • Overlap. Before the push, git merge-tree --write-tree of this head exited 0 against origin/main (898655a9d) and against the head of the one open PR that touches a file of this diff: feat(plugin-auth)!: SCIM projects the enterprise manager attribute into sys_user.manager_id #34252 (packages/lint/src/rule-explanations.ts). After the push, it also exited 0 against origin/main at fa9d69552 and against the two open PRs that add a semantic entry in the same directory, feat(mcp,spec)!: run_action and resume_run refuse the retired confirm member — confirmation happens in the app, by the person #34358 and fix(metadata-protocol,spec)!: the bare item read refuses a package-less row beside two row holders, and reads a row-held base at its dependent's added member (ADR-0150 D3) #34355. The file lists of all 48 other open PRs were read (the Version Packages PR page by page); only feat(plugin-auth)!: SCIM projects the enterprise manager attribute into sys_user.manager_id #34252 touches a file of this diff. No path of this diff is routed to the regeneration merge driver.

Verification

Readings on head 880f1686b (merge base with origin/main 898655a9d) unless a line names another head. Every heavy run went through scripts/pm/os-verify-lock.sh and its VERDICT line is quoted; the box was shared, so no wall-clock figure here is an idle-box figure.

Touched packages on this head
  • Closure build, pnpm --workspace-concurrency=2 --filter '@objectstack/dogfood^...' build after the merge of main: VERDICT command-exit 0.
  • One hold of the verify lock, VERDICT command-exit 0, each command exit 0:
    • typecheck of core, plugin-security, lint, spec and dogfood.
    • pnpm --filter @objectstack/core test: Test Files 148 passed (148), Tests 3410 passed (3410).
    • pnpm --filter @objectstack/plugin-security test: Test Files 274 passed (274), Tests 6849 passed, 45 skipped (6894).
    • pnpm --filter @objectstack/lint test: Test Files 214 passed (214), Tests 9077 passed (9077).
    • pnpm --filter @objectstack/spec test: Test Files 844 passed (844), Tests 27031 passed, 1 todo (27032).
    • The door pin fls-own-field-mask-33828.dogfood.test.ts: Test Files 1 passed (1), Tests 5 passed (5).
  • The computed-field suite with the card's own pin file, vitest run src/formula-reads-hidden-field-masking.test.ts src/fls-own-field-mask-33828.test.ts: Test Files 2 passed (2), Tests 92 passed (92), VERDICT command-exit 0.
  • Ablation row 13 and the control on the boot option: see Tests.
Dependents, read on head 0245cb6 (one hold of the verify lock, VERDICT command-exit 0)
  • pnpm --filter @objectstack/cli exec vitest run --project unit: Test Files 422 passed (422), Tests 6002 passed (6002). The integration tier is declared to CI.
  • cloud-connection: 82 files, 1224 tests passed. organizations: 18 files, 252 passed. plugin-auth: 277 files, 5495 passed, 10 skipped. plugin-dev: 10 files, 89 passed.
  • rest: 413 files, 8454 passed, 332 skipped. runtime: 605 files, 11046 passed, 19 skipped. service-automation: 282 files, 3997 passed. verify: 52 files, 439 passed.
  • plugin-hono-server: 42 files, 556 passed. scenarios: 34 files, 865 passed. metadata-protocol: 342 files passed, 9 skipped (351), 22902 tests passed, 43 skipped. example-showcase: 48 files, 545 passed.
  • Every command exited 0.
Gates on this head
  • node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack: 122 commands derived from this diff (unchanged in number from the previous head). 119 exited 0 on the first pass. Three exited 3, PREREQUISITE NOT MET, and nothing was measured by them on that pass: check:skill-examples and check:dual-build-cjs-loads read built output of eight packages outside the dogfood closure, and check:type-check-debt waits on the shared verify lock for its closure build. After those eight packages were built, the first two exited 0; check:type-check-debt exited 0 in its own hold (VERDICT command-exit 0, 0 ledger entries re-measured, no error above its record).
  • --ran reconciliation, every line recorded with its exit code: 122 derived famil(ies) accounted for — 122 run, 0 NOT-MEASURED (a DERIVED zero — all 122 recorded an exit code and none of them is 3).
  • The diff is 1215 changed lines (+1019 / -196) in 22 files, under the 3000 threshold; docs/adr/** is the mandatory-tier surface, as before.
  • Outside the derived list: node scripts/check-platform-checklist.mjs --changed-from origin/main OK, 11 anchors judged, 0 lost; check-nul-bytes OK; eslint --no-inline-config on the edited test file exit 0 (the repo-wide pnpm lint is left to CI).
  • test:repo (the repo vitest project) is declared to CI: this diff edits none of its tests.
  • CI on this head: 68 check-runs, all completed, 58 success and 10 skipped, none failed. Among them Lint & Repo Gates, TypeScript Type Check, Test Core (8 of 8 shards), Build Core, Governed Surface Queue Guard, Test UI, Type Check UI, Build & E2E UI, Live E2E UI, Dogfood Regression Gate and Check Changeset: success; Lint UI skipped. On a pull-request event CI does not run the dogfood shards, so the battery below is the local reading and the queue build is the first CI one.
Dogfood battery

On this head 880f1686b, pnpm --filter @objectstack/dogfood test with no shard and no path, one hold of the verify lock, VERDICT command-exit 0: Test Files 476 passed, 3 skipped (479); Tests 4023 passed, 42 skipped (4065). No file failed. The three dogfood files that name View All beside a readable: false row (fls-own-field-mask-33828, fls-superuser-vote, admin-ledger-decision-metadata) declare no skip and are among the passed files.

On head 25dcfa863: the reading of report 6904385475 (one budget timeout in flow-provenance-server-held.dogfood.test.ts, no assertion failed). On head 0245cb6d7: Test Files 467 passed, 3 skipped (470); Tests 3959 passed, 42 skipped (4001).

🤖 Generated with Claude Code

https://claude.ai/code/session_01FEkQ5nNrLRm8ssuwWcBVcw

…row binds its own holders over that set's View All vote

ADR-0066 D2 (8) is amended by the maintainer's ruling: an explicit
`readable: false` field-permission row on a permission set wins over that
same set's View All field vote. Both field merges ask one function for the
per-field vote, so every reader answers the same. Another set's View All or
Modify All still votes, and Modify All is unchanged.

The lint rule that reports a mask its own set unbinds now reports only
beside Modify All; its user text and rule explanation follow.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jVPGBoi3MCGoKbW1Hv
…eir own files

The pins this change adds move out of the shared test files into files of
their own; the shared files keep only the existing pins the amended rule
flips, edited in place.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jVPGBoi3MCGoKbW1Hv
@github-actions github-actions Bot added size/l documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 15, 2026
@github-actions

github-actions Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 4 package(s): @objectstack/core, @objectstack/lint, @objectstack/plugin-security, @objectstack/spec, touching 17 documentable anchor(s). ⚠️ 1 changed file(s) yielded no anchor (packages/spec/src/security/permission.zod.ts), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files.

18 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: node scripts/docs-audit/affected-docs.mjs --json 898655a9d010fc7dede34f3eb31e18ba995560b7.

⛔ 7 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails.

What this run could not see
  • 1 changed file(s) yielded no anchor (packages/spec/src/security/permission.zod.ts) — pages documenting those are invisible to this run
  • 5 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 65 of 247 client-bound route-ledger rows — the other 182 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 182: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 59 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 123 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 184 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 898655a9d010fc7dede34f3eb31e18ba995560b7 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 095f73ca6b105e25ad57065e49e446182156d8d6 — the merge of head 880f1686bc6bf02b2830dc35e065b9b7b203bb23 into base 898655a9d010fc7dede34f3eb31e18ba995560b7, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 095f73ca6b105e25ad57065e49e446182156d8d6 && git checkout 095f73ca6b105e25ad57065e49e446182156d8d6
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 898655a9d010fc7dede34f3eb31e18ba995560b7 880f1686bc6bf02b2830dc35e065b9b7b203bb23 && git checkout -B drift-repro 898655a9d010fc7dede34f3eb31e18ba995560b7 && git merge --no-ff 880f1686bc6bf02b2830dc35e065b9b7b203bb23

node scripts/docs-audit/affected-docs.mjs --json 898655a9d010fc7dede34f3eb31e18ba995560b7

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs 898655a9d010fc7dede34f3eb31e18ba995560b7 → pass the list as
args.docs, on the commit named under Which tree this was computed on.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

review#2 · os-tesla · session_01L9qibxTeW8xHnxoHxWNHWW

Contract-review-claim: session_01L9qibxTeW8xHnxoHxWNHWW · head 0245cb6 · 2026-11-15T20:06Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

review#2 · os-tesla · session_01L9qibxTeW8xHnxoHxWNHWW

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 0245cb6d7bc4969fd9f6f1551ef000e399970c0d
Local-runs: none
Scope: packages/spec/src/security/permission.zod.ts, docs/adr/0066-unified-authorization-model.md + .changeset/33828-own-field-mask-binds-over-own-view-all.md, packages/core/src/security/effective-object-permissions.ts, packages/core/src/security/superuser-field-vote-33828.test.ts, packages/plugins/plugin-security/src/permission-evaluator.ts, packages/plugins/plugin-security/src/fls-own-field-mask-33828.test.ts, packages/plugins/plugin-security/src/explain-principal-person.test.ts, packages/lint/src/validate-security-posture.ts, packages/lint/src/validate-security-posture.user-text.ts, packages/lint/src/validate-security-posture.test.ts, packages/lint/src/validate-security-posture-own-field-mask-33828.test.ts, packages/lint/src/validate-rollup-source-visibility.ts, packages/lint/src/validate-rollup-source-visibility.test.ts, packages/lint/src/validate-rollup-source-visibility-own-field-mask-33828.test.ts, packages/lint/src/rule-explanations.ts, packages/lint/src/finding-user-text.test.ts, content/docs/permissions/authorization.mdx, content/docs/permissions/permissions-matrix.mdx

Read at 2026-11-15T20:18Z. First review of this head, taken on patrol as owed; claim: comment 6900513648. Independence: implemented in a zhuangjianguo lane (domain:server#5); neither dispatched nor implemented by os-tesla.

Read: the whole diff against merge base b8ac0e240, the PR body and thread, the card and its thread, the head's check-runs and the log of the one red job. Read outside the diff, never reviewed: the callers of the field merge in plugin-security, the consumers of the readable-field answer in the other packages, the shipped default permission sets, scripts/pm/clause2-line.mjs, scripts/check-adr-0087-registration.mjs, the stock changesets 4138ce8 and 33689-ai-action-confirmation-elicited.md.

① Derived judgments

  • The rule. ADR-0066 D2 ⑧, note of 2026-11-15: a set that holds View All on an object, and not Modify All, casts no read vote on a field its own row declares readable: false. The tree keeps it. One function answers the per-field vote and both field merges ask it with the field's name. The note quotes the card's ruling word for word.
  • Same set only. The mask is read on the set that declares it and never on a sibling. Another set's View All, Modify All or declared readable: true still reads the field, in either resolution order. No holder of another set alone loses a field. Pinned from both sides in core and plugin-security, with the shipped admin_full_access as one of the second sets.
  • Not wider than declared. A View All set still votes on every field it does not mask itself. Modify All votes as before, its own rows included, also when both bits sit on one entry. An omitted readable is not a mask. An edit lock beside View All binds as before. The row-level bypass does not read the field rows.
  • One case worth saying aloud. A holder of the masked View All set plus a plain set that grants the object and names no field loses the field, although the plain set alone would serve it. That is the standing rule of the merge (only a vote reads a field a held set masks), it is pinned, and the holder holds the declaring set, so it is inside the declared narrowing. The changeset's phrase "a caller whom no other set serves the field to" is true only when "serves" is read as "votes"; see N1.
  • Doors. Every reader of field permissions I traced takes its answer from the one merge: the result mask, the filter and sort guard, the field-level write gate, the readable-field answer the schema, reference-name, approvals, audit, analytics and storage readers ask, the access explanation, and the fields slot of /auth/me/permissions. I found no reader that decides a field from the View All bit ahead of the merge. Whether every transport applies field security at all is not moved by this diff and was not audited end to end here.
  • Shipped sets. The default sets that withhold identity fields hold no View All or Modify All, and the admin sets carry keeping rows. The PR's statement that no shipped set carries the pair holds on the tree.
  • Lint. security-superuser-field-mask-inert now gates on the set's own Modify All and is silent beside View All alone, through the object entry, the wildcard and a wildcard Modify All shadowed by an explicit View All entry. security-controlled-by-parent-master-reference-hidden speaks beside View All, which is right now that the mask binds there. The roll-up source rules read a View All set's own mask as hiding the field on parent and child. Each new finding is a true one under the new rule; I found no new false positive on a valid stack. Rule ids unchanged. The card's three hotcrm rows stop being reported.
  • Schema face. permission.zod.ts changes a doc comment only. No shape, description or generated artifact moves, and the repo gates for generated files are green on this head. The published description of when speaks of a co-held set that says nothing about the field and stays true.
  • Tests. 40 new pins, all on the two merges and the lint rules, each with a control or reverse pin and with multi-set cases in both orders. None goes through a booted data door; see S4.
  • Card acceptance. Met for View All: both merges, the second-set Modify All reverse pin, the ADR amendment, the lint change. The card's Modify All half is left undecided; see S3.

② Semver level

  • Declared: Clause-②: no (narrowing), Metadata-protocol: none, patch on core, plugin-security, lint and spec, ! in the title, a BREAKING paragraph, adr-0087: not-required (no-migration-prescription). The carrier, the "who moves" paragraph and the one-line remedy are present. A FROM/TO block is not owed, since no authorable key is removed or renamed.
  • M1 (must-fix) — the kind is semantic, not none, so the level is wrong. AGENTS.md: "a changed meaning or default is semantic", and a kind takes at least minor. What an author already writes (a readable: false row in a set that holds View All on the object) changes meaning for that set's holders: from binding none of them to hiding the field. The ADR note itself says it replaces the sentence that told authors the row withholds nothing, and the two docs pages change their advice to authors. The stock changeset 33689-ai-action-confirmation-elicited.md declares semantic for the same kind of move (an authorable key whose runtime meaning changes). The precedent the PR cites, 4138ce8, declared none for the mirror change, and the PR body puts the question to the reviewer; this is the answer. Remedy: declare Metadata-protocol: semantic in the PR body and the changeset and grade the level the gate then asks for, or bring a ruling of record that none governs runtime-merge changes of this kind.
  • S1 (should-fix) — the ADR-0087 disposition rests on "nothing for a migration to rewrite", while the same body tells an administrator which stored row to delete to keep the old answer. That is a judgment only the author can make on stored metadata, which is what a semantic entry under packages/spec/src/migrations/entries/semantic/ carries to the upgrade guide (compare permission-write-without-read-refused). Register one, or say in the marker why the upgrade guide need not name the pair.
  • S2 (should-fix) — superuserFieldVote is exported from @objectstack/core, and it gains an optional third parameter and an accepted fields member on its input. That widens a public surface, so by the stock reading ("yes (narrowing) … the one widening is …") the value is yes (narrowing) with the widening named.
  • CI on this head: not green. 68 check-runs: 56 success, 10 skipped, 2 failure. The failures are Test Core (7/8) and its roll-up Test Core: @objectstack/scenarios, test/runner/run-date.test.ts, three cases, each "Test timed out in 5000ms". The diff touches no scenarios file and the suites of the four touched packages are green in their shards. It still has to be green before anything lands. No check is in progress.

③ Boundary flags

  • docs/adr/** is a Tier H governed surface: the note lands only on the maintainer's word, whatever this record says. No agent seat approves, queues or arms it.
  • packages/spec is touched by a comment only; no baseline or generated doc is owed.
  • @objectstack/lint: the finding's userTextParams lose bypass. No reader of that key exists in this repo outside the rule's own catalog.
  • Consumer: hotcrm#2481 waits on a release that carries this.
  • Base: the head was measured on b8ac0e240; main has moved, with one unrelated hunk in rule-explanations.ts. CI ran on the merge with d3bea96d8.
  • Security discipline: this record stays at the rule level. Mechanism-level notes for the seat are in scratchpad/pr-34082/security-notes.md, not on the thread.

④ Design judgment

  • docs/adr/0066-unified-authorization-model.md — holds against the code it cites (superuserFieldVote, both merges, the lint rule) and against its first consumer, the card's project_member rows. It amends the 2026-11-02 sentence for View All only and says so. It leaves a ruling pending with no carrier; S3.
  • packages/spec/src/security/permission.zod.ts — the comment agrees with the merge. Nit N2.
  • effective-object-permissions.ts, permission-evaluator.ts — agree with the note. The narrowing makes a declared mask real for the declaring set's holders and takes nothing from anyone else.
  • validate-security-posture.ts, its user text, rule-explanations.ts, validate-rollup-source-visibility.ts — agree with the runtime rule, set by set.
  • Against the published spec on main: the spec says readable: false hides a field; before this diff a set's own View All made that false for its holders. The narrowing makes the spec's own statement real. It does take a field away from holders who read it until now, which is why M1 and S1 matter.

Findings:

  • M1 (must-fix) — Metadata-protocol: none should be semantic, and the level follows the kind (②).
  • S1 (should-fix) — ADR-0087: register a semantic entry for the pair, or justify its absence against the body's own remedy (②).
  • S2 (should-fix) — Clause-② value: the exported superuserFieldVote signature widens (②).
  • S3 (should-fix) — Fixes #33828 closes the card while its Modify All half ("or editable: false", "View All / Modify All") is left "pending a ruling" in the ADR. Name the card that carries that ruling in the PR body, or do not close this one.
  • S4 (should-fix) — no pin goes through a booted door, and the dogfood battery the narrowing arm owes on the final head has no reading on the card. Post that reading before landing; one door-level pin for a holder of the pair (a list read and /auth/me/permissions) with the second-set control would hold the rule where consumers meet it.
  • N1 (nit) — changeset and authorization.mdx: "serves the field to" and "reads the field" mean "casts a read vote on it"; a plain co-held set that names no field does not restore it. One clause would say so.
  • N2 (nit) — content/docs/permissions/field-level-security.mdx (not in the diff) still tells the reader a mask holds unless another set unmasks it, without the own-set Modify All case; worth a line when the Modify All ruling lands.

Implemented-by: claude/area-A2-33828
Reviewed-by: session_01L9qibxTeW8xHnxoHxWNHWW

VERDICT: FAIL

…d semantic, registered for the upgrade guide and pinned at two doors

The changeset declares the kind semantic and grades core and plugin-security
minor: the meaning of a set's own `readable: false` row beside that set's View
All changes for the set's holders. Its ADR-0087 disposition is now a registered
semantic entry, which tells an administrator how to find the pair and what to
decide. The exported `superuserFieldVote` is named as the one widening.

A door-level pin boots the showcase and asks `/auth/me/permissions` and the
list door for a holder of the pair, with a second View All set as the control.

The changeset and the authorization page say what "another set reads the
field" means: a read vote, never a co-held set that says nothing about it.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jVPGBoi3MCGoKbW1Hv
@github-actions github-actions Bot added size/xl and removed size/l labels Nov 15, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

review#2 · os-tesla · session_01L9qibxTeW8xHnxoHxWNHWW

Contract-review-claim: session_01L9qibxTeW8xHnxoHxWNHWW · head 25dcfa8 · 2026-11-16T00:01Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

review#2 · os-tesla · session_01L9qibxTeW8xHnxoHxWNHWW

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 25dcfa863613d10673918f081c89e6d0b09b558d
Local-runs: none
Scope: packages/spec/src/migrations/entries/semantic/18.permission-own-field-mask-binds-over-own-view-all.ts, packages/spec/src/security/permission.zod.ts, docs/adr/0066-unified-authorization-model.md + .changeset/33828-own-field-mask-binds-over-own-view-all.md, packages/core/src/security/effective-object-permissions.ts, packages/core/src/security/superuser-field-vote-33828.test.ts, packages/plugins/plugin-security/src/permission-evaluator.ts, packages/plugins/plugin-security/src/fls-own-field-mask-33828.test.ts, packages/plugins/plugin-security/src/explain-principal-person.test.ts, packages/qa/dogfood/test/fls-own-field-mask-33828.dogfood.test.ts, packages/lint/src/validate-security-posture.ts, packages/lint/src/validate-security-posture.user-text.ts, packages/lint/src/validate-security-posture.test.ts, packages/lint/src/validate-security-posture-own-field-mask-33828.test.ts, packages/lint/src/validate-rollup-source-visibility.ts, packages/lint/src/validate-rollup-source-visibility.test.ts, packages/lint/src/validate-rollup-source-visibility-own-field-mask-33828.test.ts, packages/lint/src/rule-explanations.ts, packages/lint/src/finding-user-text.test.ts, content/docs/permissions/authorization.mdx, content/docs/permissions/permissions-matrix.mdx
Security-touching: yes

Read at 2026-11-16T00:11Z. Delta review of this head against FAIL 6900701652 at 0245cb6; claim: comment 6903592312; no lane request (owed per check-owed-reviews). Independence: implemented in a project thread for domain:server#5; reviewed by os-tesla, who neither dispatched nor implemented it.

Read: the fix commit 25dcfa86 in full, the merge 72aacd76, what main brought between the old base b8ac0e240 and 86350e125, the refreshed PR body and thread, the card and its thread, and the head's check-runs with the log of the one red run. Everything the record 6900701652 read at 0245cb6d stands for the unchanged part, as shown under "What moved". Read outside the diff, never reviewed: the sibling semantic entries and the SemanticMigration type, the 18.3.0 lint changelog, .github/workflows/ci.yml for which jobs run the dogfood package, and the objectql read-chain change that came in with main.

① Derived judgments

  • What moved since 0245cb6d. One merge of main and one fix commit. The PR's own change measured before the merge (against b8ac0e240) and after it (against 86350e125) is the same patch, the same 19 files. The head adds only 25dcfa86: the changeset, authorization.mdx, one new semantic entry and one new dogfood test, for 21 files. No source of core, plugin-security or lint changed in this round, so the judgments of 6900701652 on the rule, the two merges, the doors and the lint rules stand unchanged.
  • The merge of main. Of the PR's files, main touched only rule-explanations.ts, in an unrelated entry; the PR's hunk there is unchanged. Near the evaluation, main brought the View All parent-chain change (perf(objectql): drop a required master's parent chain for a View All reader over unrestricted hops #33897, ruling security: an unrestricted reader of a controlled_by_parent detail with a required FK drops the vacuous parent-chain leaf (epic #33631 R4) #33696) and the bare doc read (fix(objectql)!: a bare doc read refuses a name two enabled packages hold, naming both #34036). The first is a row-level rule that reads the object-level bits and never the field merge; the second is metadata addressing. Neither changes an answer of the field-permission merge, and the first agrees with the PR's statement that the row-level bypass does not read field rows. main has moved further since (to 0d1443d0b), with no commit on a file of this diff; CI ran on that merge.
  • Prior M1 (kind and level): closed. The PR body and the changeset declare Metadata-protocol: semantic. The changeset grades core and plugin-security minor, lint and spec patch. The level gate reads it as semantic with a package at minor and is green.
  • Prior S1 (ADR-0087): closed. The marker is registered permission-own-field-mask-binds-over-own-view-all, and the entry exists under packages/spec/src/migrations/entries/semantic/. It names the surface, tells an administrator how to find the pair and what to decide in either direction, and says why no mechanical rewrite exists. Its statements agree with the code: Modify All excluded, the wildcard included, an omitted readable is not a mask, the co-held-set case. Its claim that the lint warning lists the pair on releases from 18.3.0 agrees with the lint changelog.
  • Prior S2 (Clause-②): closed. The value is yes (narrowing) on the body, the changeset and claim amendment 2, and the changeset names the one widening (the optional third argument of superuserFieldVote, with the two-argument answer unchanged).
  • Prior S3 (closing keyword): closed. The body says Part of #33828 and that the Modify All half stays open on the card. No commit message on the branch carries a closing keyword. The card stays open as the carrier.
  • Prior S4 (door pin and battery): changed, half closed. The door pin exists: on a booted showcase, a holder of the pair alone and a second member who also holds a plain View All set are each asked at /auth/me/permissions and at the list door, with a premise test and a guard against an empty list. That half is closed. The battery half is open: the card carries no dogfood reading for this head (its last comment is claim amendment 2), and the PR body says the battery is not measured on this head. See S1 below.
  • Prior N1 (wording): closed. The changeset, authorization.mdx and the entry now say a holder reads the field only when another set casts a read vote on it, and that a co-held set that says nothing about the field does not restore it.
  • Prior N2 (field-level-security.mdx): open, unchanged. Not in the diff. The body defers the line to the Modify All ruling, which is what the nit asked. Carried as N1 below.

② Semver level

  • Declared: Clause-②: yes (narrowing), Metadata-protocol: semantic, minor on core and plugin-security, patch on lint and spec, ! in the title, a BREAKING paragraph, adr-0087: registered permission-own-field-mask-binds-over-own-view-all. The body, the changeset and claim amendment 2 agree line for line.
  • The level is right. The meaning of a row an author already writes changes in the merge that core and plugin-security own, so those two take minor. Lint follows with a narrower finding and no change to an authorable key; spec gains a comment and an upgrade-guide entry. patch is acceptable for both.
  • A FROM/TO block is carried by the entry's replacement text, as its siblings do.
  • CI on this head: green in effect. 72 check-runs, all completed: 59 success, 12 skipped, 1 failure. The failure is a superseded Check Changeset run that read the PR body before it was edited (it still saw no (narrowing) and none beside the new minor grades). The run triggered by the body edit is green on the same head, as are Test Core, its shard 7 that was red on the previous head, the governed-surface guards and the PR-body guards. No check is in progress.
  • One limit of that green: on a pull-request event CI does not run the dogfood package (its shards are skipped and Test Core excludes it). The new door pin therefore has no CI reading on this head; its reading is the author's local one in the PR body, and the queue build will be the first CI reading.

③ Boundary flags

  • docs/adr/** is a Tier H governed surface: the note lands only on the maintainer's word, whatever this record says. No agent seat approves, queues or arms it. The ADR text did not change in this round.
  • packages/spec: one new semantic entry and a comment. The registry and upgrade-guide gates are green on this head.
  • packages/qa/dogfood: one new test file, added to the file surface by claim amendment 2.
  • The card stays open after this merges, for the Modify All half. hotcrm#2481 waits on a release that carries this.
  • Base: measured on 86350e125; main is at 0d1443d0b with nothing on this diff's files.
  • Security discipline: this record stays at the rule level. Mechanism-level notes for the seat are in scratchpad/pr-34082/security-notes.md, not on the thread.

④ Design judgment

  • 18.permission-own-field-mask-binds-over-own-view-all.ts — holds against the rule the code implements and against the ruling it cites. It is the right kind of entry: both outcomes are access decisions, so it prescribes a judgment and no rewrite. Against its first consumer, the card's project_member rows, the instruction "keep the row" gives the outcome the card asked for.
  • docs/adr/0066-unified-authorization-model.md, packages/spec/src/security/permission.zod.ts — unchanged since 6900701652; the judgment there stands. The pending Modify All ruling now has a carrier, the open card.
  • fls-own-field-mask-33828.dogfood.test.ts — agrees with the rule from both sides at the two doors the card names, and its control asserts that the second set reads and never edits.
  • The remaining implementing files are byte-identical to the head 6900701652 judged, and agree with the note.
  • Against the published spec on main: the narrowing makes the spec's own statement, that readable: false hides a field, real for the declaring set's holders. It takes a field from holders who read it until now; that is now declared as semantic, graded, and carried to the upgrade guide.

Findings:

  • S1 (should-fix) — continues prior S4. The dogfood battery the narrowing arm owes on the final head has no reading on the card for 25dcfa86, and CI does not run the dogfood package on this event. The reading from 0245cb6d does not carry over, because main came in between. Post the reading on the card before this is queued; the seat should not land on this record alone until it is there and green.
  • N1 (nit) — continues prior N2. content/docs/permissions/field-level-security.mdx still lacks the own-set Modify All case; it goes with the Modify All ruling on the open card.

No must-fix. Prior M1, S1, S2, S3 and N1 are closed; prior S4 is half closed and continues as S1; prior N2 continues as N1.

Implemented-by: claude/area-A2-33828
Reviewed-by: session_01L9qibxTeW8xHnxoHxWNHWW

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · zhuangjianguo · session_01QsR2jVPGBoi3MCGoKbW1Hv

Request: review · PR #34082 · S1/A2 · Part of #33828 (View All half) · head 25dcfa8 · 2026-11-16T01:01Z

Reviewer: review-a of seat domain:server#5. The area declares this head final. This is the ordinary ACCEPT read, per review-checklist.md.

References:

  • L2 contract record: 6903726508, PASS at this head.
  • Dev report: 6904385475.
  • Claim amendment 2: 6902098081.
  • Declaration lines: Clause-②: yes (narrowing), Metadata-protocol: semantic.

Checks at this head: 59 success, 12 skipped. The one failure is a superseded Check Changeset run from before the body edit; its later run is a success.

Dogfood battery on this head: 3966 passed, 1 failed, 42 skipped.

  • The failure is one test-budget timeout outside the diff: flow-provenance-server-held.dogfood.test.ts, 5257 ms against a 5000 ms budget.
  • That file passed on the previous head's battery, and 3 isolated runs on this head under the lock were green (14/14 each, about 1.7 s).
  • The area classes it as a load timeout, not a red of this diff. Please name in the ACCEPT whether this reading meets the record's battery condition. If it does not, the area runs the battery again.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · zhuangjianguo · session_01QsR2jTjrNnh6b2BkCXFugM

Review claim (review-a, S1) · head 25dcfa8 · 2026-11-16T01:02Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · zhuangjianguo · session_01QsR2jTjrNnh6b2BkCXFugM

Review — PASS

Head-sha: 25dcfa863613d10673918f081c89e6d0b09b558d
Reviewer: review-a (areas S1 + S3) · read 2026-11-16T01:03Z · diff read against the merge base with main 86350e12 (21 files, +1001/−190, matches the PR files list)
Implemented-by: session_01QsR2jVPGBoi3MCGoKbW1Hv (area S1 dispatch) · Reviewed-by: session_01QsR2jTjrNnh6b2BkCXFugM

Contract face: a declared narrowing, packages/spec/src, and governed ADR text (docs/adr/0066). The CONTRACT_REVIEW_TIER record is 6903726508 (PASS at this head). This verdict is the ordinary ACCEPT read. The ADR path makes this Tier H, so the seat lands it through the four-piece hand-off to the maintainer, not by arming it.

What holds

  • One function, both merges. superuserFieldVote(sets, object, field?) withholds only the read vote a View All set would cast on a field its own row masks with readable: false. Modify All returns first, as before. Another set's View All still votes. An omitted readable is not a mask. getFieldPermissions and buildEffectiveFieldPermissions both ask it per field, so the data doors and /auth/me/permissions cannot split. Called with two arguments it still gives the object-wide answer, which keeps the exported signature compatible. That makes minor right for core.
  • The scope matches the ruling's View All half. Modify All is unchanged and pinned as it is today, and the PR is Part of #33828. The lint rules follow the same split: the inert-mask finding is now Modify All only, and the master-reference and roll-up rules read a View All set's own mask as binding.
  • Declaration. The title carries !. The changeset has the BREAKING banner, a "Who moves" section, a "Not moved" section and the registered semantic entry. core and plugin-security take minor, lint and spec take patch. Clause-②: yes (narrowing) / Metadata-protocol: semantic.
  • Tests. Card-named pin files in core, plugin-security, lint (two) and dogfood, the last with the door-level pin at /auth/me/permissions and the list door. Each of the 12 ablations goes red where it should, and the flipped pins are edited in place.

The battery condition (record 6903726508 S1): met. The record asks for a battery reading of this head, on the card and green, before landing. The reading (dev report 6904385475) has one red in 4009 tests: flow-provenance-server-held.dogfood.test.ts, a 5000 ms budget timeout at 5257 ms, with no assertion failing. I read that as green for this head, for these reasons:

  • Every file in the battery has a green reading on this head. 467 files passed in the run. The one other file passed three times on the same head under the lock (14/14 each time, about 1.7 s, a third of the budget), so this diff's code passes that test with time to spare.
  • The same file was green in the full battery on the previous head.
  • The first error is a timeout, and the run was on a shared, loaded box.

This does not rest on "the diff's closure misses the file". A dogfood test boots the whole stack, plugin-security included, so its closure does reach this diff. The same-head isolated runs are what carry it. A second full battery would add no information about this diff. If this test times out again in CI or the queue, treat it as a flake signature and file it. Do not re-run past it.

Nits (no re-review needed)

  1. The record's N1 (field-level-security.mdx) is left for the Modify All half, as stated.

Gates: at review time 59 success, 12 skipped. The one failure is the superseded first Check Changeset run, from before the body edit, and its later run is a success.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · zhuangjianguo · session_01QsR2jRsWwTRkuRCyQwvpAG

维护者速读

Head-sha: 25dcfa863613d10673918f081c89e6d0b09b558d

  • 改了什么:如果一个权限集给某对象开了"查看全部"(View All),又在自己的字段行里写了 readable: false,现在这一行会生效,只靠这个权限集的人看不到该字段。数据接口和 /auth/me/permissions 的回答一致。ADR-0066 D2 ⑧ 追加一条 2026-11-15 的注。"修改全部"(Modify All)保持原样,等你另行裁决,所以本 PR 只完成 security: a permission set's own readable:false field row must win over that same set's View All field vote (amend ADR-0066 D2 ⑧) #33828 的一半。
  • 为什么改:你在 security: a permission set's own readable:false field row must win over that same set's View All field vote (amend ADR-0066 D2 ⑧) #33828 裁定 A(平台修):同一权限集既给 View All 又显式隐藏某字段时,隐藏要生效。按 2026-11-02 的注,这一行此前对该权限集的持有人不起作用。
  • 风险与回滚:持有"View All + 本集 readable: false"组合的人,该字段从可读变为隐藏(BREAKING,语义变化,core / plugin-security 按 minor 发)。另有一种情况在文档中写明:此人若同时持有另一个只授予对象、不写字段行的普通权限集,仍然看不到该字段,只有另一个集的 View All / Modify All 或 readable: true 行能让它重新可读。平台自带默认权限集里没有这种组合;平台管理员(持有另一集的 View All / Modify All)不受影响。升级指南新增一条,告诉管理员怎样找出这种组合。回滚:revert 本 PR。
  • 先看:① docs/adr/0066-unified-authorization-model.md ⑧ 下新增的 2026-11-15 注(受管文本,就是你要批的部分);② packages/core/src/security/effective-object-permissions.ts 中的 superuserFieldVote 和 declaresOwnReadMask(规则本体,约 30 行);③ packages/spec/src/migrations/entries/semantic/18.permission-own-field-mask-binds-over-own-view-all.ts(写给管理员的升级说明)。
  • 两分钟验证:pnpm --filter @objectstack/core build && pnpm --filter @objectstack/plugin-security exec vitest run src/fls-own-field-mask-33828.test.ts,预期 24 项全过。
  • 需要你做的:审阅 ADR-0066 ⑧ 的 2026-11-15 注,对 head 25dcfa86 点 Approve(L2 契约审核 PASS 6903726508,L1 普通审核 ACCEPT 6904455228)。批准后由席位落地。

席位意见:建议批准。我对照 diff 读了规则本体:它只撤掉"同一集、View All、无 Modify All、本集显式 readable: false"这一张读票;另一集的投票、Modify All 和行级越权都没动;两个合并入口都按字段调用同一个函数,不会分叉。ADR 注只改 View All,并写明 Modify All 待裁决。Modify All 那一半正在做 Fable 评审,评审完单独发决策卡给你,与本 PR 合并与否无关。

席位核对

  1. 形态:21 个文件,+1001/−190(≤3000)。check-governed-merges --pr 34082 读到 1 条受管命中(docs/adr/0066-unified-authorization-model.md),落地档为 Tier H。标题带 !;changeset 有 BREAKING 横幅;Clause-②: yes (narrowing),Metadata-protocol: semantic;ADR-0087 为 registered permission-own-field-mask-binds-over-own-view-all。
  2. 前提实测:席位在本 head 读了 superuserFieldVote:Modify All 先返回;View All 只在 fieldName 给出且本集行是显式 readable: false 时跳过;buildEffectiveFieldPermissions 改为按字段调用(原先按对象缓存)。两参调用的回答与原来相同。十二组消融在 PR 正文,红绿读数齐全。
  3. 门禁 check-runs:head 25dcfa86 上 59 success、12 skipped、1 failure。那个 failure 是 23:10Z 被取代的第一次 Check Changeset(改正文之前),23:12Z 的重跑为 success。
  4. 接受的偏差:field-level-security.mdx 一句和 FieldPermissionSchema.when 的描述留给 Modify All 那一半,L1 nit 1 已记录。全量 dogfood 电池的一次超时,L1 按同 head 隔离三跑 14/14 认定为负载超时,不复跑;若在 CI 或队列再超时,按 flake 签名立卡。
  5. 范围外去向:security: a permission set's own readable:false field row must win over that same set's View All field vote (amend ADR-0066 D2 ⑧) #33828 的 Modify All 一半留在卡上(PR 写的是 Part of),席位已送 Fable 评审,评审后出中文决策卡。Skills-docs: none(skills/** 不讲超级用户字段投票)。
  6. 落地条款:等 GOVERNED_APPROVERS 的授权 APPROVED(或维护者直接合并)。获批后,席位过落地前检查、清除 pm:awaiting-merge、ready 并开 auto-merge。head 若再移动,撤掉挂签回到等待。

@github-actions

Copy link
Copy Markdown
Contributor

⛔ merge queue 构建失败 — 先分诊,再决定要不要重排

队列构建 43877147326 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集),
所以失败的测试可能在本 PR 没碰过的包里 —— 那不是重排能修的。每次盲目重排都会让排在后面的所有 PR 重建一轮。

分类:failure —— 按下面的日志分诊。

失败的 job(日志抽取,best effort):

  • Test Core (8/8) — 失败步骤: Run this shard's tests

    @objectstack/plugin-security:test:  FAIL  src/formula-reads-hidden-field-masking.test.ts > controls: what the rule leaves unchanged > a View All holder reads the hidden field and the formulas over it
      ↳ 失败原因: @objectstack/plugin-security:test: AssertionError: expected { id: 'a1', …(37) } to match object { open_cases: 6, load: 0.5, …(2) }
    @objectstack/plugin-security:test:  FAIL  src/formula-reads-hidden-field-masking.test.ts > controls: what the rule leaves unchanged > a View All holder is still withheld a computed field over a capabi
      ↳ 失败原因: @objectstack/plugin-security:test: AssertionError: expected { id: 'a1', …(37) } to match object { open_cases: 6, load: 0.5, …(1) }
    

↳ 失败原因 是判读的关键:超时(Test timed out in … / Hook timed out in …)多半是负载/时序,不是本 PR 的回归;
断言(AssertionError: …)才指向真实的行为改变。两者的 FAIL 行长得一模一样,只有这一行能区分。

⚠️ 断言这一侧有一类例外,判据是断言在测什么,不是它是不是 AssertionError。 断言的对象是产品行为(一个值、一个形状、一次拒收)⇒ 照上面读:真实的行为改变,去查,⛔ 不要重排掉;
断言的对象是这次实验自身的有效性前提(跑完的耗时、负载下的先后、任何只在时间预算内才成立的条件)⇒ 它跟超时是同一类,同样对负载敏感,重排一次是合法的判别手段。
识别是机械的:断言的消息或它比较的值本身点名了一段时长、一个时间戳、一个耗时计数。实测过的一对 —— AssertionError: SecurityPlugin.init() ran: expected false to be true 测的是产品行为(真回归);
AssertionError: this run took over a second, so second-precision stamps could have differed too: expected 1006 to be less than 1000 测的是实验前提:它守护的那条不变式当时是绿的,同一个 head 原样重排一次即成功。
穿着 AssertionError 外衣的时间测量,仍然是时间测量。(⛔ 这只改「怎么读一次红」,不改「哪些测试可以重排」——后者由别处管。)

跨 PR 相同签名(24h,按失败测试文件聚合):

  • src/formula-reads-hidden-field-masking.test.ts — 24h 窗口内只有本 PR 撞到过,暂不汇总(再有一个不同 PR 撞到就会自动开汇总 issue)。
  • ⚠️ 24h 评论账本没读完(超过 5 页仍未读到窗口尽头),所以上面的「不同 PR 数」是下界,不是全量。

历史信号:

  • 本 PR 过去 24h 无队列失败记录(首次)。
  • 过去 24h 队列共有 29 个失败构建(不含本次)。

分诊清单:

  1. 失败测试在本 PR 改动的包里 → 真回归,修 PR。
  2. 失败测试与本 PR 无关 → 看上面的「跨 PR 相同签名」;已有汇总 issue ⇒ flaky/环境问题实锤,去那张 issue 上谈,修好前重排只会再烧一轮全队列。
  3. 两者都不是 → 可能与同组 PR 语义冲突;等前面的 PR 落地或失败出队后再重排一次即可,不要连续重排。

Generated by Claude Code · merge-queue-triage workflow (#4859)

@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 16, 2026
…sking suite follow the own field-mask rule

A set's own readable: false row binds that set's holders over the same set's
View All (ADR-0066 D2 note of 2026-11-15). The two View All controls booted
View All on the set that declares the row, so they pinned the earlier reading.

- View All on the set that hides the field: the field and the computed fields
  over it stay withheld (new pin, ablated against the rule).
- View All held through another set: still reads the hidden field and the
  formulas over it, and is still withheld a computed field over a
  capability-gated or masked field (the two controls, kept via that route).

Claude-Session: https://claude.ai/code/session_01FEkQ5nNrLRm8ssuwWcBVcw
Co-Authored-By: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-project-manager · session_01FEkQ5nNrLRm8ssuwWcBVcw

Final head · PR #34082 · Part of #33828 · area o1-A · head 880f168 · 2026-11-16T17:40Z

Head 880f1686bc6bf02b2830dc35e065b9b7b203bb23 supersedes 25dcfa86, the head the maintainer approved and the queue then ejected (run 43877147326). The area declares it final. The dev report is 6924131716 on #33828, under takeover claim 6919765887. The body was rewritten at this head (body-only).

  • What moved. One clean merge of origin/main (898655a9d) and one test-only commit. No source changes in core, plugin-security, lint, spec or the ADR; the PR's own source is byte-identical to 25dcfa86.
  • The fix. In formula-reads-hidden-field-masking.test.ts, the two View All controls that came to main in fix(plugin-security)!: a computed field over a field the caller cannot read is hidden from that caller #34135 now read the field through another set's View All, which the rule leaves as it was. A new own-set case pins that View All on the set that hides the field does not read it, and the computed fields over it stay withheld.
    • Ablation: deleting the own-row check in core turned the new pin red while the other-set cases stayed green; restored, all green.
    • Control: removing the second set's View All turned both other-set cases red, so they read through the second set's View All and not through its plain grant.
  • Sweep. Outside this PR's own files, 12 other test files name View All beside a readable: false row. All pass on this head and none needed an edit.
  • Readings at this head.
    • Package suites: core 3410, plugin-security 6849 (45 skipped), lint 9077 and spec 27031 passed. Typechecks: exit 0.
    • Gates: 122 derived, 122 run, all exit 0.
    • Dogfood battery: 476 files and 4023 tests passed, 42 skipped, no failure.
    • CI: 58 success, 10 skipped, 0 failed.
  • Tier. Tier H: the ADR-0066 note, unchanged. The maintainer's approval was on 25dcfa86, so it must be given again on this head.
  • Owed on this head.
    • An L2 delta at CONTRACT_REVIEW_TIER (review#1), on 6903726508.
    • An L1 delta (L1-a), on 6904455228.
    • Then the seat's Tier H hand-off.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

review#1 · os-mickey · session_01ASNY8Ywba8ySbMdWvra2vS

Contract-review-claim: session_01ASNY8Ywba8ySbMdWvra2vS · head 880f168 · 2026-11-16T17:42Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-project-manager · session_01FEkQ5kcNtBBExhz4DZqYbi

席位核对 · ACCEPT (L1, delta) · Head-sha: 880f168 · 2026-11-16T17:44Z

L1 thread L1-a for area o1-A, reading the delta from the earlier L1 ACCEPT 6904455228 at 25dcfa86 to the final head declared in 6924204407 (dev report 6924131716 on #33828). The queue ejected 25dcfa86 (run 43877147326). This round is one merge of main (fb36b6b0) and one test-only commit (880f1686).

  • The PR's own change is the same patch. Measured against the main parent of each merge: 86350e12..25dcfa86 and 898655a9..fb36b6b0 are both 21 files, +1001/−190, with the same file list.
    • 20 of the 21 files are blob-identical between 25dcfa86 and fb36b6b0.
    • The one that differs, packages/lint/src/rule-explanations.ts, differs only because main moved it. The PR's hunks there are line-for-line the same in both measurements.
    • git show --remerge-diff fb36b6b0 is empty, so the merge resolved nothing by hand.
    • No source of core, plugin-security or lint changed in this round, so the earlier ACCEPT's judgments on the rule, the doors and the lint rules stand.
  • The test-only commit (formula-reads-hidden-field-masking.test.ts, +18/−6, a file main brought in with fix(plugin-security)!: a computed field over a field the caller cannot read is hidden from that caller #34135, f84dc192). Its two View All controls assumed the rule this PR changes: that View All on the same set reads a field that set declares unreadable. After the merge, they now say what this PR's rule says.
    • A new secondViewAll boot option puts View All on the object in the second set only (held through TWO_SETS). The two former controls now read through another set's View All. One shows the hidden field and the formulas over it are read. The other shows a capability-gated or masked source still withholds its computed fields (the vote lifts readable: false only).
    • A new pin covers the own-set case. With View All on the set that hides the field, the field and every computed field over it (open_cases, load, load_pct, open_cases_stored, load_stored) stay withheld, and capacity is still served.
    • No assertion was dropped or loosened. Each former expectation still holds on the path the rule leaves unchanged, and the changed path gains a pin in the rule's direction. The BootOptions docblock now states the rule (ADR-0066 D2 ⑧).
  • Checks on this head (check-runs): 72 names, 60 success, 12 skipped, and 0 failed or running. The narrowing battery is pinned to this head per 6924204407: 476 files, 4023 tests passed, 42 skipped, no failure.
  • Base. PRBASE is 898655a9 (Test Core plan), and K = 10, under 15. git merge-tree against current main is clean.

No new findings. The notes of 6904455228 stand as written there.

Landing: Tier H. The seat hands it back to the maintainer for re-approval after review#1's L2 delta PASS on this head.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

review#1 · os-mickey · session_01ASNY8Ywba8ySbMdWvra2vS

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 880f1686bc6bf02b2830dc35e065b9b7b203bb23
Local-runs: none
Scope: packages/spec/src/migrations/entries/semantic/18.permission-own-field-mask-binds-over-own-view-all.ts, packages/spec/src/security/permission.zod.ts, docs/adr/0066-unified-authorization-model.md + .changeset/33828-own-field-mask-binds-over-own-view-all.md, packages/core/src/security/effective-object-permissions.ts, packages/core/src/security/superuser-field-vote-33828.test.ts, packages/plugins/plugin-security/src/permission-evaluator.ts, packages/plugins/plugin-security/src/fls-own-field-mask-33828.test.ts, packages/plugins/plugin-security/src/formula-reads-hidden-field-masking.test.ts, packages/plugins/plugin-security/src/explain-principal-person.test.ts, packages/qa/dogfood/test/fls-own-field-mask-33828.dogfood.test.ts, packages/lint/src/validate-security-posture.ts, packages/lint/src/validate-security-posture.user-text.ts, packages/lint/src/validate-security-posture.test.ts, packages/lint/src/validate-security-posture-own-field-mask-33828.test.ts, packages/lint/src/validate-rollup-source-visibility.ts, packages/lint/src/validate-rollup-source-visibility.test.ts, packages/lint/src/validate-rollup-source-visibility-own-field-mask-33828.test.ts, packages/lint/src/rule-explanations.ts, packages/lint/src/finding-user-text.test.ts, content/docs/permissions/authorization.mdx, content/docs/permissions/permissions-matrix.mdx
Security-touching: yes

Read at 2026-11-16T17:51Z. Delta review of this head against PASS 6903726508 at 25dcfa863613d10673918f081c89e6d0b09b558d; claim: comment 6924257607. The original reviewer's session is gone, so this seat takes the delta. Independence: implemented on claude/area-A2-33828 (area S1 of domain:server#5, then area o1-A of repo:objectstack#1 by takeover 6919765887); this session neither dispatched nor implemented it.

Read: the merge fb36b6b04 and the test commit 880f1686 in full, the rule's source hunks again at this head, the refreshed PR body and thread, the card and its thread, the head's check-runs, and queue run 43877147326 with the log of its failed job. Read outside the diff, never reviewed: what main brought to plugin-security between 86350e125 and 898655a9d (the computed-field masking change #34135 and the permission-set seal change #34359), the callers of the field merge in plugin-security at this head, content/docs/permissions/field-level-security.mdx, and the changeset of #34135.

① Derived judgments

  • What moved since 25dcfa86. One merge of main (898655a9d) and one test-only commit. The PR's own change is the same patch per file: for each of the 21 files, the patch-id of 86350e125..25dcfa86 equals that of 898655a9d..880f1686. 20 of the 21 blobs are identical between the two heads; rule-explanations.ts differs only by main's own hunks. The head adds one file to the diff, formula-reads-hidden-field-masking.test.ts (+18/−6), for 22 files. No source of core, plugin-security, lint or spec changed, and the ADR text is unchanged, so the judgments of 6900701652 and 6903726508 on the rule, the two merges, the doors, the lint rules, the semantic entry and the door pin stand.

  • The merge is automatic. Re-derived from the two parents and their base 86350e125, the merge gives the same tree as the merge commit, with no conflict. Against main as it is now (c9ef6538b) the head also merges with no conflict.

  • Why the queue ejected the previous head. Run 43877147326 failed on exactly two cases, both in the controls block of the computed-field suite that fix(plugin-security)!: a computed field over a field the caller cannot read is hidden from that caller #34135 brought to main after 25dcfa86 was measured; every other plugin-security file and the three dogfood shards were green there. Both cases put View All on the same set that declares the readable: false row and expected the field served. That is the reading this PR's declared narrowing changes, so the failures are the narrowing meeting two pins of the old rule, not a defect in either change.

  • No conflict between the two rules. fix(plugin-security)!: a computed field over a field the caller cannot read is hidden from that caller #34135's rule is that a computed field is served only when what it reads is. It takes its answer on each input from the one field merge this PR changes, on the same record and through a reference, and decides nothing from a View All bit itself. So under this PR a computed field follows its input in both directions: withheld where the set's own row now binds, served where another set's vote reads the input. fix(plugin-security)!: a computed field over a field the caller cannot read is hidden from that caller #34135 did not touch the merge or the vote.

  • The edit re-pins; it does not loosen. The two former cases keep every expectation they had, now for a holder of another set's View All, which the rule leaves as it was: the field and the computed fields over it are served, and a capability-gated or masked field still withholds its computed fields. The fixture's second set carries no field row, so its plain grant casts no vote and these two cases do rest on its View All. One new case pins the own-set reading: the field, a formula over it, a formula over that formula, a stored copy and a stored field over the copy are all absent, and a readable input is still served. No assertion was dropped. The test names state the rule only.

  • Coverage of the interaction. The own-set case is pinned at one reader (a single-record read) on the same record. The suite's other readers (filter, sort, aggregate, explain) and the through-a-reference path are not repeated for the own-set case. They read the same merge, and the merge itself is pinned from both sides in core, plugin-security and at two booted doors, so this is an observation and no finding.

  • fix(metadata-protocol, plugin-security): judge a permission set's seal, lock and write intent by (package, name) #34359 (seal and lock by package and name). It changes which save of a permission set is judged an override of a shipped one. It does not change which sets a caller holds or what the field merge is handed. The own-row rule reads the mask on the set that declares it, never by name, so two sets of one name in two namespaces are each judged on their own rows. The changeset's statements are unaffected.

  • Shipped sets. No default permission set changed on main in this window; the statement that none carries the pair still holds.

  • S1: closed. (S1 of 6903726508.) The card carries the dogfood battery reading for this head in dev report 6924131716: 476 files and 4023 tests passed, 42 skipped, none failed.

  • N1: kept. (N1 of 6903726508.) field-level-security.mdx still lacks the own-set Modify All case. It now has a carrier of record: the follow-up ruled on the card at 6909362597, to land after this PR. See N3.

Every finding of 6900701652 was closed or carried by 6903726508, and nothing on this head reopens one.

② Semver level

  • Declared, unchanged: Clause-②: yes (narrowing), Metadata-protocol: semantic, minor on core and plugin-security, patch on lint and spec, ! in the title, a BREAKING paragraph, adr-0087: registered permission-own-field-mask-binds-over-own-view-all. The body, the changeset and the takeover claim 6919765887 agree.
  • The level stands. A test-only round moves no published surface and owes no new changeset line.
  • The changeset is still true on the merged tree. It does not say that computed fields over the hidden field are withheld with it, which is now the case in the same release; see N4.
  • CI on this head: green. 72 check-runs, all completed: 60 success, 12 skipped, none failed, none in progress. On a pull-request event CI does not run the dogfood shards, so the battery reading on the card is the local one and the queue build will be the first CI reading of the dogfood package on this head.

③ Boundary flags

  • docs/adr/** is a Tier H governed surface. The maintainer's approval was given on 25dcfa86 and must be given again on this head; no agent seat approves, queues or arms it.
  • The ADR note says Modify All is unchanged "pending a ruling". That ruling has since been given on the card (6909362597: keep the behaviour, warn only) and cross-linked to Decision: separate the record axis from the field axis — View All / Modify All stop voting on fields, a read-only viewAllFields bit carries the admin channel (end state, v19) #34365 (6912701885). Both say this PR lands as it is and that one ADR sentence replaces "pending a ruling" in a follow-up. The note's rule text is right; the pending clause is stale by direction, with a named carrier.
  • The card stays open after this merges (Part of #33828). hotcrm#2481 waits on a release that carries this.
  • Base: measured on 898655a9d. main is at c9ef6538b, where of this diff's files only rule-explanations.ts has moved, in unrelated entries. Nothing since touches plugin-security or the core security merge, and no later commit adds a test that pins View All.
  • SQL push-down: the delta adds no id materialisation and no in-app join.
  • PR author is objectstack-fleet[bot].
  • Security discipline: this record stays at the rule level. No security finding was made in this round.

④ Design judgment

  • docs/adr/0066-unified-authorization-model.md, packages/spec/src/security/permission.zod.ts, 18.permission-own-field-mask-binds-over-own-view-all.ts: byte-identical to the head 6903726508 judged. Read again against the merged tree, each still agrees with the code it cites: one function answers the per-field vote and both merges ask it by field name. Against the first consumer, the card's project_member rows, the outcome is the one asked for, and with fix(plugin-security)!: a computed field over a field the caller cannot read is hidden from that caller #34135 on main the computed fields over those totals are withheld with them, which is the stricter and consistent reading.
  • effective-object-permissions.ts, permission-evaluator.ts, the lint files: unchanged, and they agree with the note.
  • formula-reads-hidden-field-masking.test.ts: the edited block says what the note says, from both sides, and its doc comment on the boot option states the rule correctly.
  • Against the published spec on main: the narrowing makes the spec's own statement, that readable: false hides a field, real for the declaring set's holders, and takes nothing from a holder of another set. main's computed-field rule extends that statement to what a field is computed from, and the two compose without a second reading of the bits.

Findings:

N3 (nit) — content/docs/permissions/field-level-security.mdx, not in the diff: a sentence main brought with #34135 says View All and Modify All lift a permission set's readable: false. For View All that now holds for another set's row only. The follow-up already owed on that page should correct this sentence together with the Modify All line.
N4 (nit) — the changeset and the upgrade-guide entry do not say that computed fields over the hidden field are withheld with it, and #34135's changeset, in the same release, says a View All holder reads such a field "as before". One clause in the release notes, or in the follow-up, would join the two.

No must-fix, no should-fix.

Implemented-by: claude/area-A2-33828
Reviewed-by: session_01ASNY8Ywba8ySbMdWvra2vS

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-project-manager · session_01FEkQ5pmEYLVFDcQ1Z1CS8H

维护者速读

Head-sha: 880f1686bc6bf02b2830dc35e065b9b7b203bb23

  • 改了什么:一个权限集自己写了字段行 readable: false,现在这一行压过同一个权限集的「查看全部」(View All)。只靠这个权限集读数据的人,读不到该字段;数据接口和 /auth/me/permissions 的答案一致。ADR-0066 D2 ⑧ 追加一条 2026-11-15 的注,只涉及 View All。「修改全部」(Modify All)不动,等裁决,所以本 PR 是 security: a permission set's own readable:false field row must win over that same set's View All field vote (amend ADR-0066 D2 ⑧) #33828 的一半(Part of)。
  • 为什么改:你在 security: a permission set's own readable:false field row must win over that same set's View All field vote (amend ADR-0066 D2 ⑧) #33828 裁定 A(平台修):同一权限集既给了 View All、又显式隐藏某字段时,隐藏要生效。
  • 风险与回滚:对「同一权限集 View All 加上自己的 readable: false 行」的持有人,该字段由可读变为隐藏(BREAKING,changeset 按 minor)。升级指南新增条目 18,告诉管理员怎样找出这种组合。平台自带的默认权限集没有这种组合。别的权限集给的 View All 或 Modify All 照旧让字段可读。回滚即 revert。
  • 先看:① packages/core/src/security/effective-object-permissions.ts 的 superuserFieldVote 和 declaresOwnReadMask;② docs/adr/0066-unified-authorization-model.md ⑧ 下新增的注(受管文本);③ 迁移条目 18.permission-own-field-mask-binds-over-own-view-all.ts。
  • 两分钟验证:pnpm --filter @objectstack/core build && pnpm --filter @objectstack/plugin-security exec vitest run src/fls-own-field-mask-33828.test.ts src/formula-reads-hidden-field-masking.test.ts,预期 2 个文件、92 项全部通过。
  • 需要你做的:对 head 880f1686 点 Approve。它因为 docs/adr/** 属 Tier H,共 1,215 行,没有超过 3,000 行。之前在 25dcfa8 上的同意不随 head 移动;这一轮只改了测试(合并 main 后,按新规则改写了两条 View All 对照)。批准后由席位落地。

席位意见:建议批准。这是按你的裁决 A 做的语义收紧,L1 和契约审核都在本 head 上通过,没有未结的 should-fix。席位这次没能在本地亲跑验证命令(工作树安装时 tsx 的 IPC 管道路径过长,失败了,与本 PR 无关),本 head 的结论以 CI 读数和区线程的读数为准。

席位核对

  1. 形态:22 个文件,+1,019/−196。check-governed-merges --branch origin/claude/area-A2-33828 的读数:GOVERNED,22 条路径里命中 1 条(ADR-0066 的注),规模 1,215 行,不超过 3,000。标题带 !。Part of #33828。
  2. 前提实测:席位未亲跑(原因见上)。区线程报告本 head 的 dogfood battery 全绿,见 L1 记录。
  3. 门禁 check-runs:head 880f1686 上 60 条 success、12 条 skipped,没有失败、没有待跑;mergeable_state 为 clean。
  4. 审核:L1-a ACCEPT 6924290789;L2 CONTRACT_REVIEW_TIER PASS 6924478563(review#1),两者都在本 head。没有 must-fix 或 should-fix 残留;N3、N4 随 Modify All 的后续一起处理。
  5. 范围外去向:Modify All 那一半等裁决,security: a permission set's own readable:false field row must win over that same set's View All field vote (amend ADR-0066 D2 ⑧) #33828 保持打开。
  6. 落地条款:等 GOVERNED_APPROVERS 在本 head 上 APPROVED(或维护者直接合并)。落地前席位重读 head 和 check-runs;head 若再移动,就撤掉挂签回到等待。之后清 pm:awaiting-merge,开 auto-merge。

@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 Nov 16, 2026
@os-zhuang
os-zhuang added this pull request to the merge queue Nov 16, 2026
Merged via the queue into main with commit 3e49033 Nov 16, 2026
77 checks passed
@os-zhuang
os-zhuang deleted the claude/area-A2-33828 branch November 16, 2026 21:40
@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 16, 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 size/xl tests 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.

2 participants