Repository navigation
Commit 8961c0c
<!-- claude-projects-attribution: {"github_login":"os-steve"} -->
_Requested by **Steve** · [project
thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi96MB8994zPjb9j9J5mcDtv1)_
Fixes #33820
Clause-②: no
Metadata-protocol: none
Ruling-ref: 6893666857
Records the maintainer's re-ruling on #33696, option 「只对管理员去掉」 (record
[6893666857](#33696 (comment)),
2026-11-15T11:31Z, replacing 6893097935), in ADR-0139 and ADR-0055. This
is the governed precondition the ruling names: #33696's code (draft PR
#33897) must not land before this PR merges.
## 维护者速读
- 改了什么:在 ADR-0139 和 ADR-0055 各加 2026-11-15 的修订说明,记录裁决
6893666857(「只对管理员去掉」):只有「在子对象上有查看全部权限、每一级主对象读范围都不受限、主对象外键必填」的读者去掉父链,能看到本租户内主记录为空或指向不存在主记录的子记录;其他读者(包括普通成员)不变。
- 为什么改:这条裁决只对这一类读者放开了 ADR-0139 D6 里已记录的一条禁令(#24932 裁决 B 第 4 条),按规则推翻已接受
ADR 的决定要先改 ADR;裁决原文要求本修订先合并,#33696 的代码后合并。
- 风险与回滚:纯文档、只增不改(+43 / −0),不改变任何运行时行为;回滚即 revert 本 PR,回滚后 #33696
的代码不能合并。
- 先看:① ADR-0139 D6 末尾新增段(三条逐字引用的裁决条款,以及放开哪一条、哪一条不动);② ADR-0055「The rules
the read keeps」下的新增说明(必填主对象上无主记录行的读者规则);③ ADR-0139 Status 段末尾的新增条目。
- 两分钟验证:`git diff --numstat origin/main...HEAD`,预期只有两行 `6 0
docs/adr/0055-…` 与 `37 0 docs/adr/0139-…`,删除数都是 0。
- 需要你做的:批准并合并本 PR(#33696 的代码等它合并)
## What changes
- `docs/adr/0139-engine-internal-semi-join-leaf-readable-parent-ids.md`
(+37 / −0), two insertions:
- A dated `**Amended** (2026-11-15)` entry at the end of the Status
paragraph. D6's ⛔ on "interim removal of the predicate for an
unrestricted master scope" (#24932 ruling B item 4) is lifted for one
reader class and nothing else: a reader who holds view-all on the detail
AND whose every master hop answers unrestricted (the engine's per-hop
scope, not `hasSuperuserReadBypass`), with a required master FK. D6's
other ⛔ item (an interim with two spellings of one scope) stands.
- A dated paragraph at the end of D6 carrying the record's three binding
bullets verbatim (reader class; the lift and the landing order;
multi-tenant), naming the near-miss readers who keep the predicate, and
saying why ADR-0055 moves now despite D6's "ADR-0055's own text moves
only in that switch's edit, never here": the ruling's own order, quoted
— "citing this record; ADR-0055's 10-22 note in step".
- `docs/adr/0055-master-detail-controlled-by-parent.md` (+6 / −0), four
insertions:
- A new `· **Amended** (2026-11-15, #33696, ruling 「只对管理员去掉」
6893666857)` status entry.
- A `⚠️ **Amended 2026-11-15 …**` mark directly under the 2026-10-22
status entry (the "10-22 note in step").
- A `⚠️ ` note in §2, under the 2026-11-06 (#30905 ruling A) note.
- A `⚠️ ` note under "The rules the read keeps" in the 2026-11-06
amendment, so the rows-with-no-master rule reads as one statement:
optional master, the owner and View All on the detail (unchanged);
required master, only View All on the detail with every master hop
unrestricted; members keep the chain.
## Why
Prime Directive 13: reversing a recorded decision needs an amended
status line on the ADR that records it. The ruling lifts ADR-0139 D6's ⛔
for one reader class and orders this amendment to merge before #33696's
code.
## Acceptance notes
- **In place as well as on the status line (seat hypothesis,
measured):** both files, each following its own precedent. ADR-0139
follows its 2026-10-21 amendment (status entry plus a dated `**Amended …
verbatim:**` D6 paragraph with a blockquote). ADR-0055 follows its
2026-10-22 amendment, the one the ruling names (status entry plus
in-place `⚠️ **Amended …**` notes, no end-of-file section); the mark
under a status entry follows the 2026-10-26 and 2026-11-06 entries'
trailing marks.
- **Append-only:** `git diff --numstat` reads `37 0` and `6 0`; no
existing line changed or re-wrapped. So the ADR-0139 entry sits at the
end of the Status paragraph, and the ADR-0055 mark for the 2026-10-22
entry is its own line directly under it (renders as that entry's
continuation).
- **Decision letters, base → head:** ADR-0139 `D` headings 6 → 6, bold
leads 0 → 0, table rows 0 → 0; ADR-0055 0/0/0 → 0/0/0. No new
`path#Symbol` anchor; `docs/adr/README.md` unchanged (`check:adr-index`
current).
- **#33897 is not described as landed:** both records say the change
"lands only after" this amendment and name no symbol or mechanism of it.
- **Quoted verbatim:** the reader-class, lift-and-ordering and
multi-tenant bullets. Not restated: the record's pins and release-note
bullets and the orphan-sources follow-up card, which belong to #33696.
- **Derived, not verbatim (seat to check):** "on a required master the
owner has no arm"; the two near-miss readers in D6 (unrestricted hops
without view-all on the detail; view-all on the detail with a restricted
hop), which follow from the first bullet's AND and coincide with the
record's pins bullet; "a master scope that is the tenant wall is not
unrestricted" (the multi-tenant bullet); and ADR-0055's "§3 (the write
gate) is not amended by this note", true of the note and consistent with
claim amendment 6895345175 on #33696, but not a ruling sentence.
- **Round 2 (contract review 6896995006, PASS on dca1f17):** S1 taken:
the ADR-0055 §2 note now restates the full reader class, adding "(the
engine's per-hop scope, not `hasSuperuserReadBypass`)" and "inside its
own tenant wall". N2 taken: the mark under the 2026-10-22 status entry
now says the parent chain over a required master "is dropped for one
reader class" instead of describing the unlanded code's query shape. N1
and N3 unchanged. The three open questions are answered A in that record
(the §3 clause stays; no view-all bit definition; no further marks). One
new commit, 0e1c1bc, touching only the two ADR-0055 lines this PR
added; numstat is still `37 0` and `6 0`.
- **Authoring tier:** this card's tier is mandatory CONTRACT_REVIEW_TIER
(`docs/adr/**`). The card thread runs a lower tier, so the ADR text was
authored by an isolated `os-dev` subagent pinned to model alias `fable`
in the card worktree on this branch (effort xhigh); round 2 went through
the same route. The thread reviewed round 1 and changed one wording
(which D6 item is lifted: "the second of the two things above that the
ruling ⛔ does not take", since D6 carries one ⛔ over two items).
## Verification
Head `0e1c1bca` (round 2; round 1 at `dca1f17e` read the same 21/21),
`node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack` derived 21 commands for the two paths; all
21 run locally after the last commit, each `exit 0`:
<details><summary>21 derived gates, exit codes, and the --ran
reconciliation</summary>
```text
node scripts/check-adr-links.mjs :: exit 0
node scripts/check-adr-links.mjs --self-test :: exit 0
node scripts/check-closing-keyword-parity.mjs :: exit 0
node scripts/check-closing-keyword-parity.mjs --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
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
Run reconciliation — 21 derived, 21 run, 0 NOT-MEASURED, 0 UNRUN.
```
</details>
The lint/formula closure for `check:doc-formula-expressions` was built
first under `os-verify-lock` (VERDICT command-exit 0, 93 s). No code, no
test, no changeset (`skip-changeset`: `docs/adr/**` publishes nothing).
Tier H: this PR stays draft for a GOVERNED_APPROVERS approval.
## Human Minimum
- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic.
(n/a, docs only)
- [x] 2. Every name I added uses the casing for its kind. (no names
added)
- [x] 3. No formatter ran; `pnpm lint` passes. (no lintable file
touched; CI runs it)
- [x] 4. One issue, one branch off an up-to-date `main`, one pull
request.
- [x] 5. A change that publishes carries a changeset, and both
declaration lines are filled in here and in the changeset. (publishes
nothing; `skip-changeset`)
- [x] 6. `packages/spec` touched: its generated artifacts are
regenerated and committed. (not touched)
- [x] 7. No hand edits to `content/docs/references/`,
`packages/*/CHANGELOG.md` or `content/docs/releases/`.
- [x] 8. Title, body and comments are in English. (the quoted ruling and
the 维护者速读 section stay Chinese by rule)
- [x] The *Before Submitting* list in CONTRIBUTING.md is done.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01ADHkmPhSc3AHNRvPRkKRq8
<!-- signed: domain:skills#2 · os-steve ·
session_01ADHkmPhSc3AHNRvPRkKRq8 -->
---------
Co-authored-by: Claude <noreply@anthropic.com>
1 parent b1811fd commit 8961c0c
2 files changed
Lines changed: 43 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
| |||
53 | 55 | | |
54 | 56 | | |
55 | 57 | | |
| 58 | + | |
| 59 | + | |
56 | 60 | | |
57 | 61 | | |
58 | 62 | | |
| |||
229 | 233 | | |
230 | 234 | | |
231 | 235 | | |
| 236 | + | |
| 237 | + | |
232 | 238 | | |
233 | 239 | | |
234 | 240 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
20 | 31 | | |
21 | 32 | | |
22 | 33 | | |
| |||
298 | 309 | | |
299 | 310 | | |
300 | 311 | | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
301 | 338 | | |
302 | 339 | | |
303 | 340 | | |
| |||
0 commit comments