Skip to content

docs(adr): ADR-0066's viewAllFields vote anchor names holdsViewAllFields - #37621

Merged
os-zhuang merged 1 commit into
mainfrom
claude/project-thread-kgrra6
Nov 26, 2026
Merged

os-zhuang merged 1 commit into
mainfrom
claude/project-thread-kgrra6

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Refs #37245 (one item: the symbol anchor at ADR-0066 line 146, the anchor half of the row added in comment 7178404228)

Clause-②: no
Metadata-protocol: none

维护者速读

  • 用户能看到什么变化:用户无感;只改了权限设计记录里的一句话,把它指向代码的位置换成一个在「字段权限拆分」最后一步合并前后都存在的位置。
  • 为什么做:属于「字段权限拆分」专题;最后一步那个改动会删掉这句话原来指向的位置,它自己的文档检查因此一直是红的,这次先把这一句改好给它让路。
  • 出错会怎样:最坏是这句话读起来不如原来直白,只有读这份设计记录的人会碰到;纯文档,可以直接撤回,不影响任何功能。
  • 要你做什么:请审这一句并亲手合并(设计记录须由你本人合)。

What changes

One sentence of one dated note in docs/adr/0066-unified-authorization-model.md: the note of 2026-11-24 under D2 ⑧, line 146. Nothing else in the file moves.

Before:

The vote is cast inside `superuserFieldVote` (`packages/core/src/security/effective-object-permissions.ts#superuserFieldVote`), so both field merges answer the same.

After:

The vote is cast inside the one function that calls `holdsViewAllFields` (`packages/core/src/security/effective-object-permissions.ts#holdsViewAllFields`), and both field merges call that function, so both field merges answer the same.

The anchor now names holdsViewAllFields, the predicate that reads the viewAllFields bit. The sentence describes the vote function by its relation to that predicate and no longer by its name.

Why

Read first

  1. docs/adr/0066-unified-authorization-model.md, line 146. It is the only hunk. The risk is in the rewording: the sentence must read true against the code on both trees.
  2. packages/core/src/security/effective-object-permissions.ts, not changed here: holdsViewAllFields and its single call site. The call site sits in superuserFieldVote on main and in viewAllFieldsReadVote on feat(security)!: View All and Modify All stop opening fields; viewAllFields is the one every-field bit #37371.

Two-minute check

Run pnpm check:adr-symbol-anchors on this branch. Expect exit 0 and a line that starts ✅ check-adr-symbol-anchors: 4237 anchors across 163 records resolve.

For the other tree: check out the head of #37371, run git merge --no-commit with this branch, then run the same command. Expect the same line. Without the merge, that head exits 1 and prints one finding, [unresolved-symbol] docs/adr/0066-unified-authorization-model.md:146.

Tests

Docs only. No package is touched, so no build closure and no package test is owed. No tested behaviour changed, so there is no ablation.

The before and after of the gate on the tree of #37371 is the reverse verification. Three heads of that branch were read, because it moved twice during this work. Each merge was a throwaway in a scratch worktree, never committed and never pushed; the worktrees are removed.

Tree node scripts/check-adr-symbol-anchors.mjs
This branch, edbee340d4 (on main at 58570d8002) exit 0, 4237 anchors resolve
The #37371 branch at bad558d574, as pushed exit 1, one finding at ADR-0066 line 146
bad558d574 with this branch merged in exit 0, 4237 anchors resolve
The #37371 branch at ecc008621e, as pushed exit 1, the same one finding
ecc008621e with this branch merged in exit 0, 4237 anchors resolve
The #37371 branch at 71a5990508, as pushed exit 1, the same one finding
71a5990508 with this branch merged in exit 0, 4237 anchors resolve

All three merges were clean, with no conflicted path. The gate's --self-test exits 0 on this branch and on each merged tree.

How each symbol answers the gate's own resolver, per tree

symbolResolutionClass from scripts/symbol-anchors.mjs, asked with the text of packages/core/src/security/effective-object-permissions.ts at each commit:

Commit holdsViewAllFields superuserFieldVote viewAllFieldsReadVote
58570d8002 (main) declaration declaration absent
edbee340d4 (this branch) declaration declaration absent
bad558d574 (the split's branch) declaration absent declaration
71a5990508 (the split's branch, latest) declaration absent declaration
What the reworded sentence claims, counted on each tree
  • Call sites of holdsViewAllFields in packages/core/src/security/effective-object-permissions.ts, comments aside: one on 58570d8002 (line 1076, inside superuserFieldVote) and one on bad558d574 (line 1064, inside viewAllFieldsReadVote). The function is not exported, so nothing outside the file calls it. packages/lint keeps a separate author-time copy under the same name; the anchor names the file, so it does not point there.
  • Callers of that one function among the two field merges. On 58570d8002: buildEffectiveFieldPermissions (line 1175) and getFieldPermissions (packages/plugins/plugin-security/src/permission-evaluator.ts, line 590). On bad558d574: lines 1160 and 566 of the same two files.
  • The file is byte-identical between bad558d574, ecc008621e and 71a5990508, so the second reading stands for all three.

Acceptance notes

  • The end-state note is not written here. The same row asks for a dated note stating what is true once View All and Modify All stop voting on fields. That note is written after feat(security)!: View All and Modify All stop opening fields; viewAllFields is the one every-field bit #37371 merges, as the card says of every row whose prerequisite has not merged.
  • Sentences this pull request leaves alone. The notes of 2026-11-02 and 2026-11-15, and the rest of the 2026-11-24 note, say that View All and Modify All vote on fields. The first two each name superuserFieldVote once in prose (lines 142 and 144). All of that is true on main today. It becomes dated when feat(security)!: View All and Modify All stop opening fields; viewAllFields is the one every-field bit #37371 merges, and the end-state note is what supersedes it. The gate passes on those two mentions on both trees: it judges anchors, and a name in prose is not one.
  • Why not the symbol the row proposed. The row comment proposes re-pointing at viewAllFieldsReadVote. That holds only after feat(security)!: View All and Modify All stop opening fields; viewAllFields is the one every-field bit #37371 merges. This pull request has to be green on main alone and has to leave that branch green once it merges main.
  • An edit, not an added note. Re-pointing an anchor changes the sentence that carries it, so this is a one-sentence rewrite inside an existing dated note. No decision text is touched.
  • No changeset. The diff is docs/adr/** alone, which no package ships. skip-changeset is declared with this pull request.
  • Governed path. docs/adr/** lands by the maintainer's hand. This pull request stays a draft and nobody is asked to review it from here.
  • Order of landing. This one lands first. The feat(security)!: View All and Modify All stop opening fields; viewAllFields is the one every-field bit #37371 branch then needs one merge of main to pick the sentence up, and its anchor gate reads green from that commit on.
  • The generated index is untouched. pnpm check:adr-index exits 0 at this head.
  • The protocol line. The claim spells it as n/a, docs only. It is written above in the closed vocabulary as none, which is what that says.
  • Base. The branch is cut from main at 58570d8002. main has since moved by one commit, 54d6726c09. It changes a changeset, a CLI test and two files of packages/lint, and nothing under docs/adr, in the anchored file or in the gate.

Verification

Local gates at head edbee340d4: 21 derived by node scripts/pm/dispatch-gates.mjs --commands, 21 run, 21 exit 0. --ran reconciles them: 21 derived, 21 run, 0 NOT-MEASURED, 0 UNRUN. Every exit code was captured before any pipe.

The 21 commands and what they printed

One command, pnpm --filter @objectstack/lint run check:doc-formula-expressions, first exited 3: prerequisite not met, nothing measured, because @objectstack/formula and @objectstack/lint were not built. After pnpm exec turbo run build --filter=@objectstack/formula --filter=@objectstack/lint --concurrency=2 under the shared verify lock (VERDICT command-exit 0), it exited 0. That second run is the one counted.

  • node scripts/check-adr-links.mjs and its --self-test: exit 0
  • node scripts/check-closing-keyword-parity.mjs and its --self-test: exit 0
  • node scripts/check-comment-mask-corpus.mjs: exit 0
  • node scripts/ci/plan-test-core-shards.mjs --self-test: exit 0
  • pnpm --filter @objectstack/lint run check:doc-formula-expressions: exit 0
  • pnpm check:adr-anchors: exit 0
  • pnpm check:adr-index: exit 0
  • pnpm check:adr-symbol-anchors: exit 0, 4237 anchors across 163 records resolve — 1452 symbol (1423 declaration, 29 literal), 2733 file-level, 52 cross-repo, 6 exempt, 96 continuation
  • pnpm check:ci-filter-parity: exit 0
  • pnpm check:closed-ceremony-text: exit 0
  • pnpm check:cross-package-test-inputs: exit 0
  • pnpm check:doc-authoring: exit 0
  • pnpm check:driver-memory-census: exit 0
  • pnpm check:gitlink-declared: exit 0
  • pnpm check:nul-bytes: exit 0
  • pnpm check:pm-governed-merges: exit 0
  • pnpm check:pm-prior-rulings: exit 0
  • pnpm check:refd-timer-probe: exit 0
  • pnpm check:watch-hint-literal: exit 0

The 52 cross-repo anchors are reported and not judged, because no sibling checkout is present. That is the gate's ruled behaviour and the same on every tree above.

Every other gate family is CI's to run on this pull request. node scripts/pm/overlap-check.mjs --branch=HEAD at edbee340d4 gives VERDICT clean: the branch merges cleanly with origin/main at 54d6726c09.


Generated by Claude Code

The 2026-11-24 note under D2 ⑧ anchored the function the `viewAllFields`
read vote is cast in by its name, `superuserFieldVote`. The field-axis
split's last step (draft PR 37371) replaces that function, so the anchor
stops resolving on that branch and `check:adr-symbol-anchors` reds there.

The sentence now anchors `holdsViewAllFields`, the predicate that reads
the bit, and describes the vote function by its relation to it: the one
function that calls the predicate, which both field merges call. That
holds on `main` today (the caller is `superuserFieldVote`) and on the
split's branch (the caller is `viewAllFieldsReadVote`), so the anchor
resolves on both trees and the sentence stays true across that merge.

One sentence of one dated note; no decision text and no other note is
touched. The end-state note for D2 ⑧ is a later row of the weekly ADR
revisions card and is not written here.

Claude-Session: https://claude.ai/code/session_011y7As8wf3DSPRevwNnYLcM
Co-Authored-By: Claude <noreply@anthropic.com>
@objectstack-fleet objectstack-fleet Bot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Nov 26, 2026
@github-actions github-actions Bot added size/xs documentation Improvements or additions to documentation labels Nov 26, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · os-alice · session_011y7As8wf3DSPRevwNnYLcM

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: edbee340d45883b5d04794ac43e6a9694655fa1e
Local-runs: none
Scope: docs/adr/0066-unified-authorization-model.md + none
Security-touching: yes
Rule-change-verified: none

PR #37621, card #37245: the one row claimed in 7196224618 (row comment 7178404228, its anchor half). First record on this head, a full round. Read for it: the card body and all 10 of its comments, the PR body, file list and net diff against main (54d6726c09, merge-base 58570d8002), the 49 check-runs on the head, and the tree of draft PR #37371 at 71a5990508 (read, not reviewed). The dispatch order was not read.

Check-runs on the head, read 2026-11-26T16:02Z: 49 in all, 26 success, 23 skipped, none red, none pending. A first read at 15:58Z still had Test Core (1/10) running; it and Test Core have since concluded success.

① Derived judgments

  • The diff is one sentence. One file, +1/−1, and inside line 146 only the words between "The vote is cast inside" and ", so both field merges answer the same" differ (file blob a3a6e1da85 to 6398170231). Right: nothing else in the 2026-11-24 note and no other note moves.
  • Accept-set and public surface: none implied. No schema, export, gate or rule on what a seat may do is in the diff. Clause-②: no is right.
  • Decision text: untouched. D2 ⑧ and the rulings the note records read as before. The sentence changes how the vote function is pointed at, not what the note decides. Right.
  • Anchor population: one out, one in. effective-object-permissions.ts#superuserFieldVote leaves and effective-object-permissions.ts#holdsViewAllFields arrives, same file. Right: at the head no symbol anchor under docs/adr/** names superuserFieldVote any more; lines 142 and 144 keep the name in prose, which is no anchor.

② Semver level

  • Nothing is published by this diff: no package ships docs/adr/**. No package.json in the tree names that path, and os-dev.md lists it among the paths that publish nothing. No changeset is owed, and skip-changeset says what is true. Check Changeset concluded success on the head.
  • Clause-②: no and Metadata-protocol: none in the PR body are both true of the diff: it changes nothing a metadata author can write and nothing a consumer can call.

③ Boundary flags

Open questions of report 7196910014:

  • Q1, a name-free sentence or one that also records the old name: A, keep it as pushed. Reasons and the one carry are in ④.
  • Q2 (1), the first line Refs #37245 (one item: …): leave. It is the spelling execution-duties.md gives a partial landing (Refs #N (item k), never Fixes), the card must stay open for its other rows, and PR-body guards (claim · duplicate · Part-of · single-writer path) concluded success on it.
  • Q2 (2), all 21 derived gate commands run locally: leave. os-dev.md names the --commands list as the gate families a dev runs for the files it changed; running more than the dispatch asked changes nothing in the PR.
  • Q2 (3), skip-changeset hung in the pr_create stroke: true on the merits, escalated to the seat on the authority. The label's premise holds (② above). Whether the dispatch's label sentence or its changeset sentence governed is the seat's to say at L1: the dispatch order is outside this review's inputs, and os-dev.md reads "write nothing and report" where a dispatch forbids labels.
  • Q3, the claim's Metadata-protocol: n/a — docs only: A, the seat amends the claim line to none, a card-side stroke. The value is outside the closed vocabulary of the claim template in SKILL.md (added, narrowed, semantic, none). Every caller of that line's one reader found under scripts/ on main hands it a PR body or a changeset body (readMetadataProtocolLine in clause2-line.mjs, called by l1-face.mjs, the queue guard, the merges audit, the release-notes script and the two changeset gates); none was found that parses a claim comment. So the PR body is right as it stands and the head does not move.

Dev flags (deviations, out_of_scope_findings):

SQL push-down: the diff holds no code, so nothing to check.

Author: objectstack-fleet[bot] through the relay; no other login to name.

The security line above reads yes on purpose. The changed sentence states where a permission field vote is cast and that both field merges agree on it, which is permission behaviour by the template's rule. It teaches nothing new: the code it describes is unchanged, and no reading of the note gets wider or narrower. The PR is Tier H whichever way that line reads, because an in-place edit is not an add-only note. No exploitable issue was found; no private findings file was written.

④ Design judgment

docs/adr/0066-unified-authorization-model.md, line 146, the sentence at the head:

"The vote is cast inside the one function that calls holdsViewAllFields (packages/core/src/security/effective-object-permissions.ts#holdsViewAllFields), and both field merges call that function, so both field merges answer the same."

Each clause against the code, on both trees. The anchored file is blob a105b3c534 at the merge-base, at main 54d6726c09 and at the head, and blob b4c72981bb at #37371's head 71a5990508.

Clause main and this head #37371 at 71a5990508
"the one function that calls holdsViewAllFields" one call site, line 1076, inside superuserFieldVote (line 1065); the predicate is not exported, so no other file can call it one call site, line 1064, inside viewAllFieldsReadVote (line 1056); not exported
"The vote is cast inside" it a set that holds the bit, with no readable: false row of its own on the field, turns the function's read answer to yes and adds no edit the same two tests; the function answers true
"both field merges call that function" buildEffectiveFieldPermissions, line 1175; PermissionEvaluator.getFieldPermissions, permission-evaluator.ts line 590; each once per field line 1160; line 566; each once per field
"so both field merges answer the same" both apply that one answer both apply that one answer
the anchor #holdsViewAllFields function holdsViewAllFields( at line 1099: a declaration by the resolver's first pattern, in code, not in a comment the same declaration at line 1086, body identical

Every clause is true on both trees.

Open question 1, ruled: A. The name-free sentence loses nothing the note needs.

No must-fix, no should-fix.

  • N1 (nit, accepted as is). "The one function that calls holdsViewAllFields" is true of the declaration the anchor names. packages/lint/src/validate-security-posture.ts declares a second function of the same name, with its own caller (objectWideFieldVote); only the path in the parentheses tells the two apart. The count of callers is prose that the anchor gate does not check; the declaration's own doc comment backs it on both trees. No effect on correctness.
  • N2 (nit, prose, accepted as is). "Both field merges" stands twice in the one sentence. Not worth a push on a governed path.

Implemented-by: claude/project-thread-kgrra6
Reviewed-by: session_011y7As8wf3DSPRevwNnYLcM

VERDICT: PASS

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 26, 2026 16:10
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · os-alice · session_011y7As8wf3DSPRevwNnYLcM

席位意见:ACCEPT,交维护者合并。

席位核对 — ACCEPT · head edbee34 (2026-11-26T16:10Z)

  1. Shape: 1 file, docs/adr/0066-unified-authorization-model.md, +1/-1, inside the claim's surface (claim 7196224618, narrowed to the ADR-0066:146 anchor). Refs #37245: the card keeps its other rows and stays open. skip-changeset: no published package touched. Governed (check-governed-merges --pr 37621: ADR change that is not an add-only note) → maintainer merge, pm:awaiting-merge.
  2. Premise measured: the dev ran the anchor gate on this branch alone (exit 0, 4237 anchors resolve) and on throwaway merges of it into each of feat(security)!: View All and Modify All stop opening fields; viewAllFields is the one every-field bit #37371's three heads (bad558d, ecc0086, 71a5990): red as pushed, green merged, merge clean every time (report 7196910014).
  3. Review: Contract review PASS 7197247260 at this head (CONTRACT_REVIEW_TIER, effort xhigh), No must-fix, no should-fix., nits N1/N2 accepted as is.
  4. Gates: at this head 26 success, 23 expected skip, 0 failed, 0 pending; l1-face CLEAN, 13 items; mergeable_state clean.
  5. Dev's open questions: Q1 A (name-free sentence; the end-state note will carry the rename). Q2 A on all three: the Refs first line, the wider local gate run, and skip-changeset at pr_create (the dispatch asked for a docs-only changeset per repo convention; that sentence governs over "do not add labels"). Q3: the claim's Metadata-protocol value is read by nothing that judges this PR; the PR body carries none; left as is.
  6. Accepted deviations: 试行偏离 (fresh agent; no in-agent CI wait; dev ran l1-face). The seat's exception to its area:data intake is the maintainer's named order (decision card, 2026-11-26T15:22Z).

@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 26, 2026
@os-zhuang
os-zhuang added this pull request to the merge queue Nov 26, 2026
Merged via the queue into main with commit cde15e3 Nov 26, 2026
55 checks passed
@os-zhuang
os-zhuang deleted the claude/project-thread-kgrra6 branch November 26, 2026 16:57
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 pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue size/xs skip-changeset PR has no user-facing published change; bypasses the changeset gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants