Repository navigation
docs(adr): repoint three security-plugin.ts symbol anchors to declarations the class keeps - #25316
Merged
Merged
Conversation
…kens ADR-0055 Context item 3 drops to a file-level anchor (the #1994 by-id pre-image check is inline step 2.7 and has no symbol of its own); ADR-0055 section 3 points at assertControlledByParentWrite, the master-edit write gate it describes; ADR-0123's amendment points at composeWriteTenantWall, the step 3.7 wall that spells the refusal. Anchor spellings only, no prose. Claude-Session: https://claude.ai/code/session_016g7nYP9wdNx1GDa5XDr7Uy Co-authored-by: Claude <noreply@anthropic.com>
os-zhuang
approved these changes
Oct 23, 2026
os-zhuang
marked this pull request as ready for review
October 23, 2026 00:58
os-zhuang
enabled auto-merge
October 23, 2026 00:58
This was referenced Oct 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Sales · project thread
Fixes #25314
Clause-②: no
Metadata-protocol: none
Ruling-ref: 6353073966
Tier H (
docs/adr/**, AGENTS.md Prime Directive 14): this PR stays a draft and lands only on an APPROVED review by aGOVERNED_APPROVERSaccount. No seat readies, queues or arms auto-merge on it.维护者速读(草稿)
改了什么 — 三个 ADR 锚点的拼写,别无其它(无正文改动、无
anchor-exempt标记、无其它文件)。路径前缀均为packages/plugins/plugin-security/src/security-plugin.ts:#sharingModel(读派生computeControlledByParentFilter内的局部const)#symbol)start()中间件内联的 step 2.7,没有自己的符号;门禁头注对此的处方就是「drop to a file-levelpath」#controlled_by_parent(读派生里的三处字符串字面量,literal级)#assertControlledByParentWritenull即拒;本 ADR 第 125 行 "What both halves do now" 的 Write 条已用同一锚点#refuseNoActiveOrganization(composeWriteTenantWall内的局部闭包)#composeWriteTenantWall为什么改 — #25223 的只搬不改拆分要把这些函数体搬出
security-plugin.ts;旧锚点只靠函数体内的 token 碰巧拼写相同才解析,一搬就unresolved-symbol(在撤回的五体切头94ef3e320f上已复现)。新目标是拆分各切都保留在类上的方法声明(或文件本身),之后任何搬动都不会再悄悄弄断它们。风险与代价(含回滚) — 零运行时影响,只动 3 行文档。回滚即 revert 本 PR。
席位意见 —
你要做的 — 审阅三处新指向是否对得上句子;同意即 APPROVE。若不同意其中某处,点名改法即可(候选见裁决
6353073966第 3 条)。Why each target (one line each)
2.7. Row-level WRITE authorization (pre-image check)., inline in thestart()middleware) — no symbol of its own exists, and the ruling's other candidate#checkControlledByParentWritere-reads the MASTER, not "the target row under the write-op RLS filter", so the gate header's file-level remedy is the honest pointer.#assertControlledByParentWrite(not the ruling's first candidate#checkControlledByParentWrite). §3's sentence is the master-edit write gate forupdate/delete/create: resolve the master id, re-read the master under its edit write filter, deny onnull. That isassertControlledByParentWrite(step 2.8,:9654), which the middleware calls directly.checkControlledByParentWrite(:9492) is the servedISecurityServicemember that wraps it for one by-idupdateand returns an outcome instead of throwing. ADR-0055:125 already anchors the write half to#assertControlledByParentWrite, and ruling6353073966lists it among the method shells the class keeps across every cut. If the maintainer prefers the ruling's candidate, it is a one-token amend.#composeWriteTenantWall. Step 3.7's Layer 0 tenant write wall, "the ONE spelling of the wall's judgement of a row" by its own docblock; therefuseNoActiveOrganizationclosure lives inside it.Anchor readings
Measured with
extractAnchors/symbolSegmentResolution/symbolResolutionClassfromscripts/symbol-anchors.mjs(comments stripped as the gate strips them), onorigin/main258f4e6aa(base) and this head0dafb657eb;security-plugin.tsis byte-identical in both.#sharingModel· declaration ·:9208(localconstincomputeControlledByParentFilter)#controlled_by_parent· literal ·:9035,:9209,:9275#assertControlledByParentWrite· declaration ·:9654#refuseNoActiveOrganization· declaration ·:8499(local closure incomposeWriteTenantWall)#composeWriteTenantWall· declaration ·:8432node scripts/check-adr-symbol-anchors.mjs(underos-verify-lock):258f4e6aa: exit 0 — 2383 anchors across 142 records resolve — 467 symbol (440 declaration, 27 literal), 1888 file-level.0dafb657eb: exit 0 — 2383 anchors across 142 records resolve — 466 symbol (440 declaration, 26 literal), 1889 file-level.The declaration count is flat, not +1: ADR-0055:58 moves literal → declaration (+1) and ADR-0055:26 moves declaration → file-level (−1). The literal count drops by one.
Tests and gates
Docs-only diff; no package touched, so no build closure, no package tests, no ablation.
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackat0dafb657ebderived 20 families for the two changed paths; each ran underscripts/pm/os-verify-lock.sh, all exit 0:check-adr-links(+--self-test),check-adr-symbol-anchors(+--self-test),check-ci-filter-parity,check-closing-keyword-parity(+--self-test),check-comment-mask-corpus,@objectstack/lint check:doc-formula-expressions(first run exit 3 PREREQUISITE NOT MET; re-run exit 0 after the prescribedturbo run build --filter=@objectstack/formula --filter=@objectstack/lint),check:adr-anchors,check:closed-ceremony-text,check:cross-package-test-inputs,check:doc-authoring,check:driver-memory-census,check:gitlink-declared,check:nul-bytes,check:pm-governed-merges,check:pm-prior-rulings,check:refd-timer-probe,check:watch-hint-literal.--ranreconciliation: 20 derived, 20 run, 0 NOT-MEASURED (a derived zero, every line carrying its exit code).Changeset
None:
docs/adr/**publishes nothing from any released package, so this PR carriesskip-changeset.Acceptance notes
#checkControlledByParentWriteresolves asdeclarationon three lines, not one: the method at:9492and two object-literal service members at:2442and:5346. It is not used by this PR; noted for whoever amends ADR-0055:58 to it.insert/update/delete/transfer/restore/purge) where the sentence names three. The sentence reads narrower than the code, not false; no prose was changed here (gate header: "Do not repair prose to clear this gate"). Carrier: none.security-plugin.ts(the cut-9+ plan) will not red on ADR-0055:26; that cut's own anchor map (ruling6353073966item 2) is what covers it.🤖 Generated with Claude Code
https://claude.ai/code/session_016g7nYP9wdNx1GDa5XDr7Uy