Skip to content

Commit dfb8ed3

Browse files
docs(adr): ADR-0094 notes that a revertCommit projector failure reaches the caller (#34138)
<!-- claude-projects-attribution: {"github_login":"os-steve"} --> _Requested by **Steve** · [project thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi9Dnx7PUeFruJdBHdG9Tmzjt)_ Fixes #34077 Clause-②: no Metadata-protocol: none ## 维护者速读 - 改了什么:只在 ADR-0094 里加注记,不改代码。状态行加一条 2026-11-15 修订;9 月 4 日修订里那句「投影器失败只记日志、不报给调用方」后面、该修订表格正下方、D2 下同一说法的 9 月 4 日注记里,各加一个 ⚠️ 指针。原文一个字不改。 - 为什么改:PR #33805 之后,撤销一次提交(`revertCommit`)时投影器失败,该条目会进 `failed[]`,整体回 `success: false`,调用方能看到;ADR 还写着「不报给调用方」,读者会被误导。按版本回滚(`rollbackMetaItem`)没变,仍然只记日志,原句对它照旧成立。 - 风险与回滚:纯文档、只增不删,不影响任何运行行为。回滚即 revert 本 PR 一个提交。 - 先看:`docs/adr/0094-sys-permission-set-pure-projection.md` 的四处新增:第 3 行状态行末尾、第 130–135 行(D2 注记内)、第 575–580 行(修订表格正下方)、第 599–609 行(9 月 4 日修订的 `projectionApplied` 一条下)。 - 两分钟验证:`git diff --word-diff origin/main...HEAD -- docs/adr/0094-sys-permission-set-pure-projection.md`,预期只有 `{+…+}` 新增,没有 `[-…-]` 删除。 - 需要你做的:请批准并合并,或批准后由席位落地。 ## What changes ADR-0094's 2026-09-04 amendment says, verbatim: "`rollbackMetaItem` and both `revertCommit` limbs declare no such key on their response types and #14982 deliberately added none: there the projector is called and awaited, and a failure is logged without reaching the caller." Premise, read on `main` (`385ea1cc`), `packages/metadata-protocol/src/protocol-package-commits.ts`: - `revertCommit`, soft-remove limb and restore limb: each reads the projector's answer, and a `success: false` marks the item's step as not applied; an item with any such step settles into `failed[]` (row state named, the projector's own error text left on the log line) instead of `reverted[]`, and the revert answers `success: false`. Landed by PR #33805 (`568f214a6c`), the sibling fix of PR #34063. Pinned by `protocol.revert-commit-honest-outcome.test.ts` ("the projector failing on the restore limb…", "…on the soft-remove limb…"). - `rollbackMetaItem`: still `await host.runMutationProjector({...})` with the answer discarded, then `success: true`. **The 2026-09-04 sentence is kept for it** and the notes say so. - No `projectionApplied` key was added to either response type, so the first half of the sentence still holds; only "logged without reaching the caller" is stale, and only for the two `revertCommit` limbs. Four add-only insertions in `docs/adr/0094-sys-permission-set-pure-projection.md`; no existing character is removed or rewritten, no sentence moves: 1. `**Status**:` line: ` · **Amended** (2026-11-15, #34077): …` appended in the form of the line's existing 2026-10-14 entry, narrowed to the `revertCommit` limbs, citing PR #33805. 2. An in-place `⚠️ **Amended 2026-11-15 (#34077 / PR #33805)**` pointer indented under the 2026-09-04 bullet, right after the quoted sentence, anchored at `packages/metadata-protocol/src/protocol-package-commits.ts#revertCommit`. 3. **Beyond the card's two items (declared; accepted by review 6901691666):** the same pointer inside D2's own 2026-09-04 note, after "three of the seven call and await the projector without putting an outcome on the response." That note repeats the stale claim for the same two limbs; leaving one copy unmarked is the defect an at-tier review flagged on PR #34063. Add-only, same narrowing. 4. **Fix round 1 (review 6901691666, S-1):** a ⚠️ pointer directly below the amendment's door table, saying the `—` in the two `revertCommit` rows now means only that the answer carries no `projectionApplied` key, and that a projector failure there is reported through `failed[]` and `success: false`; the `rollbackMetaItem` row is unchanged. No table cell is touched. (N-2: the Status entry, text this PR adds, now names where the notes sit.) `docs/adr/README.md` is not regenerated: `adr-index` reports it current (the 0094 row's status cell truncates before the appended text). ## Tests None: docs-only diff, no code, no test. `skip-changeset` (`docs/adr/**` publishes nothing). ## Acceptance notes - Authoring ran in an isolated os-dev subagent pinned to the contract-review tier (`dispatch-gates --tier`: MANDATORY for `docs/adr/**`), effort xhigh, on this branch; this thread is served below that tier. Recorded here and in the report's deviations. - Same amendment, outside this card's surface, filed by the seat as #34142 (serial after this card): its tripwire `git grep -c "this.runMutationProjector(" -- packages/metadata-protocol/src/protocol.ts` no longer answers `7`, because the call sites moved into facet files (`protocol-save.ts`, `protocol-history-and-publish.ts`, `protocol-diff-delete-load.ts`, `protocol-package-commits.ts`). The amendment itself says that answer means the table went stale. Not touched here. - Landing: expect Tier H (a grown Status line reads as -1/+1; the low-risk add-only reader refuses it). The PR stays a draft until a GOVERNED_APPROVERS approval. ## Verification Head `bd358f52` (fix round 1 on top of `2cc431b3`). `dispatch-gates --commands` derives the same 21 commands; all 21 re-run on this head, all exit 0; `--ran` reconciles: "21 derived famil(ies) accounted for — 21 run, 0 NOT-MEASURED (a DERIVED zero …)". The round on `2cc431b3` was also 21/21 exit 0. <details><summary>Gate record at bd358f5 (21 commands)</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 ``` </details> Add-only proof against `main`: `git diff --word-diff` shows 0 `[-…-]` runs over main's text (the line-3 word-diff inside the fix commit touches only text this PR added); stripping the four insertions reproduces the base file byte for byte. `git diff --check` clean; no control bytes. <!-- signed: domain:skills#2 · os-steve · session_01ADHkmT7hSxSj6X3GqfXJCn --> --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 69b4ee3 commit dfb8ed3

1 file changed

Lines changed: 25 additions & 1 deletion

File tree

‎docs/adr/0094-sys-permission-set-pure-projection.md‎

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ADR-0094: Permission-Set Definitions Have One Authoritative Store — `sys_permission_set` Becomes a Pure Projection
22

3-
**Status**: Accepted (2026-07-14); **D5 retired 2026-08-09** (see D5-R) · **Amended** (2026-10-14, [ADR-0131](./0131-total-organization-ownership-no-null-organization-id.md) D2/D3/D13): **the projection is retired by execution** — #15204 stage 8 (`66949b7729`, 2026-10-13) unregistered the `sys_permission_set` row object, the `permission` projector with its boot reconcile, and the data-door write-through; D1 stands, generalized by ADR-0131 D3. See the notes under the TL;DR, D1–D4, the Consequences, the 2026-07-14 addendum and the 2026-09-04 amendment.
3+
**Status**: Accepted (2026-07-14); **D5 retired 2026-08-09** (see D5-R) · **Amended** (2026-10-14, [ADR-0131](./0131-total-organization-ownership-no-null-organization-id.md) D2/D3/D13): **the projection is retired by execution** — #15204 stage 8 (`66949b7729`, 2026-10-13) unregistered the `sys_permission_set` row object, the `permission` projector with its boot reconcile, and the data-door write-through; D1 stands, generalized by ADR-0131 D3. See the notes under the TL;DR, D1–D4, the Consequences, the 2026-07-14 addendum and the 2026-09-04 amendment. · **Amended** (2026-11-15, #34077): **on both `revertCommit` limbs a projector failure now reaches the caller** — since PR #33805 (`568f214a6c`) the revert reads the projector's answer, reports the item in `failed[]` and answers `success: false`; the 2026-09-04 amendment's "logged without reaching the caller" still holds for `rollbackMetaItem`. See the notes under D2 and in that amendment (below its table and in its `projectionApplied` bullet).
44
**Deciders**: ObjectStack Protocol Architects
55
**Builds on**: [ADR-0005](./0005-metadata-customization-overlay.md) (overlay store), [ADR-0056](./0056-permission-model-landing-verification.md) (landing verification), [ADR-0086](./0086-authz-metadata-config-boundary-and-cross-package-composition.md) (two doors / provenance)
66
**Closes**: framework#2875 (root cause behind the #2857 display-freshness class)
@@ -127,6 +127,12 @@ thrown, the metadata write itself succeeded and boot reconciliation heals on nex
127127
> and since 2026-09-03 that set includes the recovery doors. `projectionApplied` is
128128
> also not surfaced at every site: three of the seven call and await the projector
129129
> without putting an outcome on the response.
130+
>
131+
> ⚠️ **Amended 2026-11-15 (#34077 / PR #33805)** — for both `revertCommit` limbs a
132+
> projector failure is now put on the response: the item is reported in `failed[]` and
133+
> the revert answers `success: false`. No `projectionApplied` key was added, and
134+
> `rollbackMetaItem` is unchanged: it awaits the projector and puts no projection outcome
135+
> on the response. See the note in the amendment at the end.
130136
131137
`plugin-security` registers the `permission` projector. It re-reads the **fresh layered
132138
effective body** and:
@@ -566,6 +572,13 @@ that same file — D2's three, plus the four #14982 added:
566572
| `revertCommit`, soft-remove limb | `deleted` | none | — |
567573
| `deleteMetaItem`, legacy raw-engine exit | `deleted` | none | `projectionApplied` |
568574

575+
⚠️ **Amended 2026-11-15 (#34077 / PR #33805)** — in the two `revertCommit` rows
576+
the `—` now says only that the answer carries no `projectionApplied` key. Since
577+
PR #33805 a projector failure on either limb is on the response: the item is
578+
reported in `failed[]` and the revert answers `success: false`. The
579+
`rollbackMetaItem` row is unchanged: still `—`, and still no projection outcome
580+
on the response. See the note under the `projectionApplied` bullet below.
581+
569582
Three things D2's three-name sentence hides, each measured on the call sites
570583
rather than inferred from the method names:
571584

@@ -583,6 +596,17 @@ rather than inferred from the method names:
583596
declare no such key on their response types and #14982 deliberately added
584597
none: there the projector is called and awaited, and a failure is logged
585598
without reaching the caller.
599+
⚠️ **Amended 2026-11-15 (#34077 / PR #33805)** — for both `revertCommit`
600+
limbs, "logged without reaching the caller" no longer holds. Since PR #33805
601+
(`568f214a6c`) the revert reads the projector's answer
602+
(`packages/metadata-protocol/src/protocol-package-commits.ts#revertCommit`):
603+
a failure is still logged, and it now puts the item in `failed[]`, with its
604+
row state named and the projector's own error text left on the log line,
605+
and the revert answers `success: false`. That answer still carries no
606+
`projectionApplied` key, and the sentence above still holds for
607+
`rollbackMetaItem`, which awaits the projector and does not read its answer.
608+
Pinned by
609+
`packages/metadata-protocol/src/protocol.revert-commit-honest-outcome.test.ts`.
586610

587611
The count is enforced, not incidental —
588612
`packages/metadata-protocol/src/protocol.recovery-doors-mutation-projector.test.ts`

0 commit comments

Comments
 (0)