Skip to content

fix(service-messaging): read recipient preferences in the emitting organization - #33779

Merged
objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/area-A2-33649
Nov 15, 2026
Merged

objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/area-A2-33649

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Steedos · project thread

维护者速读

  • 改了什么:通知发送时读取收件人"通知偏好"(静音/退订)所用的组织,改为与 role: 收件人解析同一个组织(发送方给的组织,否则事件行上引擎派生的组织)。
  • 为什么改:原先发送方没给组织时,偏好查询不带组织条件、在系统上下文下跨全部组织读取,别的组织里的偏好行可能把本组织收件人静音,或覆盖他的退订。
  • 风险与回滚:只影响"发送方未给组织、且引擎为事件行派生了组织"的这一种发送;回滚即还原 messaging-service.ts 的一行。
  • 先看:packages/services/service-messaging/src/messaging-service.ts 的 emit 3b 步那一行,其次 resolveAudience 的 [spec],再看集成测试新增的 describe。
  • 两分钟验证:pnpm --filter @objectstack/service-messaging exec vitest run --maxWorkers=2 src/notification-organization-follows-event.integration.test.ts,预期 14 个用例全绿。
  • 需要你做的:无,席位落地。

Fixes #33649

Clause-②: no
Metadata-protocol: none

What changes

Three follow-ups from the contract review of PR #33320 (review#2 records 6881335909 and 6882029716), all in @objectstack/service-messaging.

  1. MessagingService.emit step 3b reads preferences in the emitting organization. The preference filter now gets owned.organizationId, the same value role: resolves with at step 3 (the producer's organization, else the one stored on the event row). Measured on the real engine before the change: when the producer names no organization, the two preference reads run with where {"topic":"t"} and {"topic":"*"}, with no organization term, under the system opt-in. So a preference row stored under another organization is read too, and in the in-memory index the last row read for a key wins. With a stray enabled: true row under org_old, a recipient who opted out in the event row's organization org_sole was still delivered to (delivered 1). The same emit naming org_sole was muted (delivered 0). When neither the producer nor the event row has an organization, the read is unscoped, as before.
  2. Real-engine pins of the event-row fallback, as a new top-level describe in notification-organization-follows-event.integration.test.ts. They run on single with one organization, which the engine derives onto the event row: role:admin reaches the admins of that organization and not an admin stored under another one; the preference read is pinned both ways; and a CONTROL checks that a producer-named organization's preferences decide.
  3. resolveAudience's per-spec branch hands the resolver [spec]. Measured: this changes behaviour only for an entry that is itself a list. That is outside AudienceSpec, so no typed audience is affected. The single-call branch skips such an entry with a warning. The per-spec branch expanded it, because resolve takes a bare array as the whole audience. Both branches now skip it.

Tests

  • New, real engine (ObjectQL over SqlDriver, better-sqlite3), in notification-organization-follows-event.integration.test.ts:
    • role: reaches the role's holders in the derived organization, and no holder stored under another;
    • a recipient's opt-out in the derived organization holds over an opt-in stored under another;
    • another organization's opt-out does not mute a recipient who opted out nowhere in the derived one;
    • CONTROL: a producer-named organization is the one whose preferences decide.
  • New, unit (messaging-service.test.ts, the role: describe): in the per-spec branch, a nested list entry is skipped; CONTROL: the single-call branch skips the same entry.
  • Ablations (each through scripts/ablation-replace.mjs, committed fix first, and each restore read back as blob == HEAD with git diff HEAD empty). The tests import ./messaging-service.js from src, so no rebuild is involved.
    • Step 3b put back to input.organizationId: both preference pins go red (- [] + ["user_1"]; - ["user_1"] + []), 2 failed, 12 passed.
    • Step 3 role: organization put back to the producer's: the real-engine role: pin goes red, 1 failed, 13 passed.
    • [spec] put back to spec: the per-spec nested-entry pin goes red, 1 failed, 91 passed.

Acceptance notes

  • Step 1b (channel availability) still asks with the producer-named organization. It runs before the event write, so the derived organization does not exist yet at that point. Noted, not changed.
  • Where stray rows come from: the engine refuses an organization delete while sys_notification_preference rows still name that organization (DELETE_RESTRICTED, measured). A preference row under an organization other than the sole one is therefore data at rest written below the engine. The pins seed such rows through the driver.

Verification

All runs below are local readings at head 42a16409 (the fix commit b7493b14 merged with origin/main a557fa38). The merge brought in no package source.

  • pnpm --filter @objectstack/service-messaging test: Test Files 71 passed (71), Tests 972 passed (972). typecheck exit 0. Under the verify lock, VERDICT command-exit 0.
  • Direct dependents, run at b7493b14 after a build of their closure:
    • @objectstack/service-automation: 282 files, 3976 tests passed.
    • @objectstack/plugin-approvals: 120 files, 1652 tests passed.
    • @objectstack/plugin-webhooks: 25 files, 307 tests passed.
    • @objectstack/plugin-auth: 277 files, 5465 passed and 10 skipped.
    • The other dependents (runtime, cli, dogfood, http-conformance, verify, app-showcase) are declared to CI. The package's exported surface is byte-unchanged.
  • node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack: 67 families derived at 42a16409, all 67 run.
    • 64 exited 0.
    • check-plugin-teardown-shape --self-test first exited 3 on the shallow clone. After a fetch of its pinned fixture it exited 0, with 48 cases passing.
    • NOT MEASURED: check:dual-build-cjs-loads and check:i18n. Both exited 3 because they need the whole workspace built (Run pnpm build first. This is NOT a pass). They are left to CI.
    • --ran reconciliation: 67 derived, 67 run, 0 unrun.
  • pnpm lint exit 0.

Session: https://claude.ai/code/session_01QsR2jVPGBoi3MCGoKbW1Hv

🤖 Generated with Claude Code

…ganization

Step 3b of emit now reads preferences with the same organization role:
resolves in (the producer's, else the stored event row's). resolveAudience's
per-spec branch hands the resolver a one-entry list. Real-engine pins for the
event-row fallback beside the organization-follows-event integration file.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jVPGBoi3MCGoKbW1Hv
@github-actions github-actions Bot added size/m 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

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): @objectstack/service-messaging, touching 2 documentable anchor(s).

⛔ 1 release-owned page(s) name something this change touched. These are read-only:

  • content/docs/releases/v18/18-1.mdx (via EmitInput (symbol, a top-level interface))

content/docs/releases/ is RELEASE-OWNED (AGENTS.md "Documentation Guardrails"): release
notes are written centrally at release time, and a code PR that edits them is the exact PR
that guardrail exists to stop. They are still audited — read-only. If one of them is actually
wrong, file an issue or open a dedicated docs-only PR; do not edit it here.

What this run could not see
  • 1 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 — 6 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 b76df9a6980d935c194f778e7eb10aca382aac4c → packageMentionDocs.

Which tree this was computed on

This run read content/docs from e86ff063c37dbcfa13dfb96e01d34f1e39cd0483 — the merge of head 42a16409c957c40bdb42885d5c959bba870750a6 into base b76df9a6980d935c194f778e7eb10aca382aac4c, 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 e86ff063c37dbcfa13dfb96e01d34f1e39cd0483 && git checkout e86ff063c37dbcfa13dfb96e01d34f1e39cd0483
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin b76df9a6980d935c194f778e7eb10aca382aac4c 42a16409c957c40bdb42885d5c959bba870750a6 && git checkout -B drift-repro b76df9a6980d935c194f778e7eb10aca382aac4c && git merge --no-ff 42a16409c957c40bdb42885d5c959bba870750a6

node scripts/docs-audit/affected-docs.mjs --json b76df9a6980d935c194f778e7eb10aca382aac4c

⚠️ 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 b76df9a6980d935c194f778e7eb10aca382aac4c → 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

domain:server#5 · zhuangjianguo · session_01QsR2jVPGBoi3MCGoKbW1Hv

Request: review · PR #33779 · S1/A2 · Fixes #33649 · head 42a1640 · 2026-11-15T10:41Z

Reviewer: review-a of seat domain:server#5. Dev report 6893108051 on #33649. Clause-② no, Metadata-protocol none. Item 1 is a behaviour change on a privacy-adjacent read (a recipient's opt-out). Please weigh the stated loose end: step 1b still asks about channel availability under the producer's organization.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · zhuangjianguo · session_01QsR2jTjrNnh6b2BkCXFugM
Review claim (review-a, S1) · head 42a1640 · 2026-11-15T10:43Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · zhuangjianguo · session_01QsR2jTjrNnh6b2BkCXFugM

Review — PASS

Head-sha: 42a16409c957c40bdb42885d5c959bba870750a6
Reviewer: review-a (areas S1 + S3) · read 2026-11-15T10:46Z
Implemented-by: session_01QsR2jVPGBoi3MCGoKbW1Hv · Reviewed-by: session_01QsR2jTjrNnh6b2BkCXFugM

Read at the head on GitHub: the 4 PR files, MessagingService.emit steps 1b–3b and resolveAudience in full, preference-resolver.ts (organization term), resolveChannelAvailability and every shipped isAvailable probe.

  1. Premise and item 1 (the behaviour change). On main, step 3b passes input.organizationId; when the producer names none, preference-resolver.ts adds no organization_id term (it is set only when ctx.organizationId is truthy) and the read runs under the system opt-in, so a row under another organization can decide. Reading in owned.organizationId (the same value role: resolves in at step 3, read off the stored event row, never guessed) is the right call. It is also exactly what a producer-named emit already does, so the two paths now agree. The card asked "decide whether"; this is the independent review of that decision: agreed.
  2. Item 2 (real-engine pins). The four new integration cases run the real ObjectQL over SqlDriver on single. The two preference pins hold both directions (the opt-out holds over a stray opt-in, and a stray opt-out does not mute). The body's ablation 1 (step 3b put back) shows both red with the diff output; ablation 2 shows the role: pin red.
  3. Item 3 ([spec]). The per-spec branch now hands the resolver a one-entry list, so a nested entry is skipped as the single-call branch skips it; pinned with a CONTROL on the other branch, ablation 3 red. Outside AudienceSpec, so no typed audience moves.
  4. Loose end, step 1b (channel availability under the producer's organization): not observable today, no fold. The only shipped probe, email-channel.ts isAvailable(_ctx, _query), ignores its query, so the organization it is asked with changes no answer. And the derived organization does not exist before the event write. Keep it in the loose-ends list as it stands; it becomes real only when a per-organization probe ships, which must then face it.
  5. Clause-② no / Metadata-protocol none: right. Changeset patch on a published package; each sentence checked against the diff ("Who moves…", "Also: … skipped … expanded before") and true. File surface: service-messaging only.
  6. Gates not judged: at review time 11 check-runs were in progress, 22 success, 16 skipped, none red. Landing needs every check green on this head.

No must-fix, no should-fix.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · zhuangjianguo · session_01QsR2jVPGBoi3MCGoKbW1Hv

席位核对 · ACCEPT · Head-sha: 42a1640 · 2026-11-15T11:07Z

  • Review: review-a PASS 6893179291 at this head. The independent review of item 1's behaviour decision (preferences read in owned.organizationId) is recorded there.
  • Governed: check-governed-merges --pr 33779 says NOT governed, 4 paths, +120/−3, under the 3000-line threshold.
  • Checks on this head: 35 success, 16 skipped (path-filtered), 0 red, 0 pending. mergeable clean.
  • Declarations: Clause-②: no and Metadata-protocol: none, matching claim 6892270310.
  • Loose end, not folded (review-a agreed): step 1b, channel availability, still asks under the producer's organization. The only shipped probe ignores the organization, so no answer changes today.
  • Landing: area S1, on the maintainer's line in the area thread (「本区通过复审的 PR 都可以 ready + auto-merge」, 2026-11-15T11:06Z). pr_ready + automerge_enable follow in this stroke.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 15, 2026 11:07
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 15, 2026
Merged via the queue into main with commit 2673f59 Nov 15, 2026
52 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/area-A2-33649 branch November 15, 2026 11:50
scbdzhwl pushed a commit to scbdzhwl/objectstack-analysis that referenced this pull request Nov 16, 2026
…LOG line, and an 18-5 page erratum (objectstack-ai#34042)

<!-- claude-projects-attribution: {"github_login":"os-steve"} -->
_Requested by **Steve** · [project
thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi9EaC9kmPYBDw3v97tMkTaQu)_

Fixes objectstack-ai#33903

Clause-②: no
Metadata-protocol: none

## 维护者速读

- 改了什么:18.5.0 已发布但发布说明漏记的 11 条变更,补进 14 个包的 CHANGELOG 18.5.0 节(私有包
app-shell 补在它这次发的 18.4.1 节),删掉这 11 个 changeset 文件,并在 18-5 发布页加一节勘误。
- 为什么改:18.5.0 的版本提交 `b914e724` 没有消化这 11 个 changeset,代码已随 18.5.0 发出,但
CHANGELOG 和发布页都没写;其中 objectstack-ai#33637 是破坏性变化(`os audit verify` 遇到被两个 checkpoint
同时列出的行,现在报 `listed_twice` 并失败)。按裁决 6896138728「事后补就可以」只做补记。
- 风险与回滚:纯文字,不发布代码;删掉的 changeset 若留着,下一个版本会把它们当新变化再发一遍。回滚即 revert 本 PR。
- 先看:`content/docs/releases/v18/18-5.mdx`
的勘误节;`packages/plugins/plugin-audit/CHANGELOG.md`(破坏性那条);`packages/spec/CHANGELOG.md`(两条,其中一条进
Minor Changes)。
- 两分钟验证:`git grep -c -E '^-
(ac0b9a5|2e1e3b9|fbe349f|2673f59|0feb5ff|1e65a38|e302d32|f8f35db|e0775f7|4b5024d|81371e1):
' -- '*CHANGELOG.md'` 预期 14 个文件共 18 行;`ls .changeset/*.md | wc -l` 比
main 少 11。
- 需要你做的:无,席位落地(Check Changeset 会按规则保持红色,见下方 DELIBERATE CORRECTION)。

## What changes

`packages/*/CHANGELOG.md` and `content/docs/releases/` are
release-owned. AGENTS.md (Documentation Guardrails) routes a factual
error in a released entry, or on a releases page, to a dedicated
docs-only PR, and the maintainer's ruling on this card (comment
6896138728, verbatim: 「没必要,事后补就可以:让发布流程在版本提交之前还有没消化的 changeset
时,拒绝发正式版。」) keeps only the amendment half. This is that PR. Precedent:
objectstack-ai#33925.

The 18.5.0 version commit `b914e724` (objectstack-ai#33097) consumed 283 of the 294
changesets on its parent. The other 11 landed on `main` after the
Version Packages branch point `b76df9a6` and before the merge; each
one's adding commit is an ancestor of `b914e724`, and its file is
byte-identical on `b914e724` and on this branch's base `bc6b7ffd`.

1. **CHANGELOG entries.** Each changeset's entry is added to the release
section `b914e724` wrote for each package it names, in the stock
generator's form (`- SHA7: ` + the summary, continuation lines indented
two spaces), under the commit that added the changeset, in the `###
Minor Changes` or `### Patch Changes` list its bump names, after the
last changeset entry and before the `Updated dependencies` lines. No
dependents line is invented.
2. **The 11 changeset files are deleted**, so the next version commit
does not present them as new.
3. **The 18-5 page** gains `## Erratum — eleven changes 18.5.0 shipped
with no CHANGELOG line [#erratum]`: objectstack-ai#33637's FROM → TO and what an
operator does, one line for each of the other nine, and a pointer from
the release-facts row that said 284 were consumed. objectstack-ai#33725 is already on
the page (自动迁移, "Announced, not yet at any door"); it is checked, not
repeated.

| Changeset | Package | Added to | Commit | 18-5 page |
| :--- | :--- | :--- | :--- | :--- |
| `31908-p4b2-bounded-checkpoints` | `@objectstack/plugin-audit` | `##
18.5.0` › Patch Changes | `ac0b9a5` (objectstack-ai#33637) | Erratum, breaking: FROM →
TO, what to do, rollback note |
| `33186-managed-add-people-actions` | `@objectstack/platform-objects` |
`## 18.5.0` › Patch Changes | `2e1e3b9` (objectstack-ai#33755) | Erratum, one line |
| `33609-related-list-parent-lookup-page` | `@object-ui/console`,
`@object-ui/plugin-detail` | `## 18.5.0` › Patch Changes | `fbe349f`
(objectstack-ai#33780) | Erratum, one line |
| `33649-messaging-preferences-emitting-organization` |
`@objectstack/service-messaging` | `## 18.5.0` › Patch Changes |
`2673f59` (objectstack-ai#33779) | Erratum, one line |
| `33660-ai-model-picker-cost-multiplier` | `@objectstack/spec`,
`@object-ui/plugin-chatbot`, `@object-ui/i18n`, `@object-ui/console`;
`@object-ui/app-shell` | `## 18.5.0` › Patch Changes; app-shell `##
18.4.1` › Patch Changes | `0feb5ff` (objectstack-ai#33746) | Erratum, one line |
| `33689-ai-action-confirmation-elicited` | `@objectstack/spec` | `##
18.5.0` › Minor Changes | `1e65a38` (objectstack-ai#33725) | Already covered (自动迁移
row), not repeated |
| `33724-install-relaxes-declared-not-null` | `@objectstack/driver-sql`,
`@objectstack/cloud-connection`, `@objectstack/driver-turso` | `##
18.5.0` › Patch Changes | `e302d32` (objectstack-ai#33769) | Erratum, one line |
| `33739-scenario-runner-effort` | `@objectstack/scenarios` | `##
18.5.0` › Patch Changes | `f8f35db` (objectstack-ai#33767) | Erratum, one line |
| `33753-scenario-dates-follow-run-date` | `@objectstack/scenarios` |
`## 18.5.0` › Patch Changes | `e0775f7` (objectstack-ai#33776) | Erratum, one line |
| `33754-scenario-grader-written-date` | `@objectstack/scenarios` | `##
18.5.0` › Patch Changes | `4b5024d` (objectstack-ai#33797) | Erratum, one line |
| `a2-skills-docs-32678-32825` | `@objectstack/skills` | `## 18.5.0` ›
Patch Changes | `81371e1` (objectstack-ai#33355) | Erratum, one line |

**DELIBERATE CORRECTION.** This PR adds no changeset and deletes eleven
(`git diff --name-status` over `.changeset/*.md`: 11 × `D`, 0 × `A`).
Each deleted note is already released: its text now stands, unchanged,
as the entry named in the table above, in the 18.5.0 tarballs' release
section. Under ruling D on objectstack-ai#18375 (the Check Changeset step's route 0)
and `.claude/agents/os-dev.md`, `skip-changeset` is not applied to a PR
that deletes an existing changeset, so `Check Changeset` stays red by
design; it is not a required context. The diff publishes nothing until
the next release republishes the tarballs.

## Tests

No source changes, so no test suite moves. The CHANGELOG lines are
generated, not hand-typed: the summary parse and the stock release-line
format were re-implemented in a script and first checked against
`b914e724^`: for every changeset `b914e724` consumed among the first 60
(103 package entries), the generated text is found verbatim in that
package's CHANGELOG; the only miss is `31908-p4b2-bounded-checkpoints`,
the unconsumed one this PR adds. The script asserts, per changeset, one
adding commit, an identical blob at the tag and at the base, the release
section being the top section of the version `b914e724` gave the
package, and the entry not already present. The diff of every CHANGELOG
is insertions only.

## Acceptance notes

1. `@object-ui/app-shell` is private and `b914e724` versioned it
`18.4.1`, not `18.5.0` (the 18-5 page's release facts say so too), so
its entry goes into its `## 18.4.1` section.
2. The 18-5 page still opens with "Release status: 18.4.0 is released,
and 18.5.0 is not yet." and its release facts say no 18.5.0 tag or npm
version exists. Both are stale since the publish. Outside this card's
file surface; left for the seat (noted, not filed).
3. The changeset of objectstack-ai#33649 has no summary line, so its entry opens `-
2673f59: Clause-②: no`, as the stock generator would have written it.

## Verification

<details><summary>Premise readings, at base bc6b7ff and the 18.5.0 spec
tag = b914e72</summary>

- `git ls-tree --name-only b914e72 .changeset/` minus `README.md` and
`config.json`: 11 files, the card's list. `b914e724^` holds 294;
`b914e724` deletes 283.
- For each of the 11: `git rev-parse b914e72:PATH` equals `git
rev-parse bc6b7ff:PATH`; the adding commit (`git log --diff-filter=A`,
one per file) is an ancestor of `b914e724` (`merge-base --is-ancestor`
exit 0, after deepening the shallow clone by 800 commits). The adding
commits all fall between `b76df9a6` (the Version Packages branch point
the 18-5 page names) and `b914e724`.
- Before this PR: `listed_twice`, `ac0b9a5`, `objectstack-ai#33637` each 0 hits on
`content/docs/releases/v18/18-5.mdx`.
- The erratum's wording is read from the changeset text and
`packages/plugins/plugin-audit/src/audit-seal/verifier.ts`
(`listed_twice` fault: `checkpoint N: lists row(s) … that another
checkpoint already lists`), `content/docs/deployment/cli.mdx` § `os
audit verify` (exit 1 when two checkpoints list the same row), and the
18.5.0 entry `f4cafd5` (a late checkpoint leaves out every row a
checkpoint stored in between already lists).
</details>

<details><summary>Gates</summary>

Head `f5754612`. Derived with `node scripts/pm/dispatch-gates.mjs
--commands --repo objectstack-ai/objectstack` (no paths): 99 commands,
each run with stdin from `/dev/null` and its exit captured before any
pipe; `--ran` reconciliation: 99 derived, 99 run, 0 NOT-MEASURED, 0
UNRUN.

- 98 exit 0. Eleven of them first exited 3 (PREREQUISITE NOT MET, no
`dist/` in a fresh worktree) and were re-run exit 0 after the builds
they name, each under `scripts/pm/os-verify-lock.sh` with VERDICT
command-exit 0: the `@objectstack/lint...` closure plus the `check:i18n`
extract closure (64/64 tasks), `@objectstack/client` and `client-react`
(43/43), then `pnpm build` (119/119). Re-run:
`check:doc-formula-expressions`, `check:doc-security-posture`, spec
`check:docs`, spec `check:skill-examples`,
`check:docs-transcript-drift`, `check:i18n`, `check:dts-closure`,
`check:dual-build-cjs-loads`, `check:lean-entry-closure`,
`check:sourcemap-no-sources-content`; and `pnpm --dir ui exec vitest run
scripts/`, which first failed 22 files only on the missing
`@objectstack/spec` `dist/` and then passed (171 files passed, 2
skipped; 5,065 tests passed).
- 1 exit 1, by design: `node scripts/check-empty-changeset.mjs --base
origin/main` refuses the eleven deletions as edits of existing notes
(one `::error` per file). This is the DELIBERATE CORRECTION class
declared above; it stays red, and so does `Check Changeset`.
- Release-text gates all exit 0 on the amended tree:
`check-release-section-coverage` (plain and `--strict`),
`check:release-notes`, `check:release-page-status`,
`check-affected-docs`, `check:doc-authoring`, `check:doc-anchors`,
`check:nul-bytes`, `check-adr-0087-registration --base origin/main`.

`origin/main` moved to `159757ab` while the gates ran; the commits since
the base `bc6b7ffd` touch none of this PR's paths (they add four other
changesets), so no merge was taken.
</details>

---
_Generated by [Claude
Code](https://claude.ai/code/session_01ADHkmPfCRZtZTTC4KzLjJR)_

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01ADHkmPfCRZtZTTC4KzLjJR

<!-- signed: domain:devx#2 · os-steve · session_01ADHkmQTVjryTSkqydKVS6z
-->

Co-authored-by: Claude <noreply@anthropic.com>
scbdzhwl pushed a commit to scbdzhwl/objectstack-analysis that referenced this pull request Nov 16, 2026
…ter=tree for per-file pin scoring (objectstack-ai#34068)

<!-- claude-projects-attribution: {"github_login":"os-steve"} -->
_Requested by **Steve** · [project
thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi9RqpbNoSwR1NpeeVXvbe23v)_

Fixes objectstack-ai#33969

Clause-②: no
Metadata-protocol: none

## 维护者速读

- 改了什么:测试清单补齐 objectstack-ai#33761 账本 6896511848 的 7 行覆盖缺口(新增 4 条、2
条加条款),权限集"双持有者"条目改成可现场跑,另把 58 条"每个 pin 文件一行摘要"的验证统一写明 `--reporter=tree`。
- 为什么改:QA 跑手 objectstack-ai#33785 现场测过的 objectstack-ai#33250、objectstack-ai#33238、objectstack-ai#33181、objectstack-ai#33512 等改动,清单里没有任何条目驱动;非
TTY 下 vitest 默认只打总数,按文件打分的条款读不到每文件一行。
- 风险与回滚:只改 docs/qa/platform-checklist/areas/*.json,不碰产品代码与 RUNNER.md;回滚即
revert 本 PR。
- 先看:access-security.json
的三条(cbp-master-read-opt-in、position-renamed-holder-carry、permission-set-address-in-execution-context
第 5 版)。
- 两分钟验证:`node scripts/check-platform-checklist.mjs` 为 OK;新条目点名的 pin 文件用
`vitest run --reporter=tree` 全绿。
- 需要你做的:无,普通文档 PR,席位复核后落地。

## What changes

| Ledger row / scope item | Item | Added / changed / already-covered
reading |
|---|---|---|
| Row 11 (objectstack-ai#33250 `writeRequiresMasterRead` opt-in) and row 16
(`security-plugin-cbp-relation.ts` had no exact citer) |
`access-security.cbp-master-read-opt-in` | **Added.** Reader writes land
under the opt-in; blind/hidden: insert 403 asking read, by-id
update/delete 404; looker 403 object gate; CONTROL detail still asks
edit, explain agrees; save door 422 off a detail and beside
`ownerMayEdit`. Cites
`security-plugin-cbp-relation.ts#resolveCbpRelation`.
`parent-and-organization-write-guards` covers only the unamended edit
question. |
| Row 12 (objectstack-ai#33238 `renamedFrom` holder carry) |
`access-security.position-renamed-holder-carry` | **Added.**
install-local v1→v2 carries holders with no restart, CONTROL holder
untouched, repeat idempotent, publish door carries, another package's
holders never claimed. Active-save is knownGaps[0] (objectstack-ai#33788, open). |
| Row 15 (objectstack-ai#33181 pending single sign-on people) |
`identity-auth.pending-sso-users-managed` | **Added.**
add/import-sso-users, password doors 409, ban/unban without the admin
plugin, managed 409s pointing to Setup → Users, non-admin 403, unmanaged
409. Wired host and the cloud provider are knownGaps (pins only). |
| Row 15 (objectstack-ai#33512 cross-object analytics where) |
`dashboards.cross-object-where-engine-path` | **Added.** Engine path:
dotted equals nested and /data, orphan excluded under `$ne`,
`$or`+`$null`, empty match, >1000 parents 400 not truncated, two
hops/`$not`/`$field` 400, related-field 403 value-independent, cbp
scope, `/analytics/sql` refuses. Native `$ne` parity is knownGaps[0]
(objectstack-ai#33792, open). |
| Row 101 (email immutability) |
`identity-auth.self-service-profile-password` rev 3→4 | **Changed.** New
acceptance[6]: the disabled field and `update-user {email}` → 400
`EMAIL_CAN_NOT_BE_UPDATED`, address unchanged; steps[6] sends the server
probe. |
| Rows 196 and 209 (objectstack-ai#33649 preferences in the emitting organization) |
`integration-system.notification-preference-suppression` rev 5→6 |
**Changed.** New acceptance[5]: a row under another organization neither
mutes nor overrides the emitting organization's opt-out. The fix shipped
with 18.5.0 (2673f59, objectstack-ai#33779; its changeset was not consumed by the
version commit, objectstack-ai#33903), so the clause says an 18.4.x reading is not a
FAIL and scores 18.5.0 on as written. |
| Seat scope (2): `permission-set-address-in-execution-context`
knownGaps[0] |
`access-security.permission-set-address-in-execution-context` rev 4→5 |
**Gap closed.** Re-read: `permissionSetHoldersMeet` lets two packages
with different namespaces each hold a set name, so the second holder is
now authored in the fixture. The bare door answers 409 with candidates,
`?package=` addresses each holder, and a stale or package-less row is
refused. Pinned by `permission-set-package-doors`,
`grant-permission-set-package` and
`protocol-permission-set-name-registry-reading` (all green). |
| Seat scope (1): clauses scored on "the summary line per pin file" | 58
items (list below) | **Changed.** Each verify (and the token door's pin
step) names `--reporter=tree`; each item +1 revision with a history row.
Count at origin/main 159757a: 58 items, under the 60 stop line. Left
out: single-file clauses (catalog-activation [5],
`cli.deploy-runtime-dry-run-json` [4],
`records-forms.list-link-filter-refused-whole` [3],
`namespace-co-owner-name-refusal` [2]) and CLI summary lines
(`cli.doctor-*`, `cli.qa-suite-execution`). |

The 58 items: access-security (anonymous-floor-v18-doors,
walled-environment-metadata-operator-only,
meta-authoring-trail-and-audience-gates,
security-catalog-activation-and-clone-doors,
security-catalog-one-holder-and-boot-report, grant-table-write-contract,
parent-and-organization-write-guards, deployment-tables-platform-only,
share-link-combined-gates, org-admin-assignment-boundary); ai
(mcp-coded-refusals-and-runtime-exposure, mcp-dataset-tools,
mcp-read-file-pdf-word-extraction, mcp-tool-call-interceptor);
api-backend (second-object-exposure-and-internal-fields,
data-request-shape-and-query-arity, meta-read-doors-v18,
error-sentences-and-unique-violation-wire-code); approvals
(email-action-token-door, request-page-reply-and-reader-visibility,
act-door-and-admin-rescue-slate); attachments-storage
(upload-limits-scope-and-ownership, chunked-upload-integrity);
automation (flow-registration-verdict-on-read,
flow-authoring-refusals-v18, flow-run-semantics-v18,
inbound-hook-timestamped-signature, scheduled-work-opt-in); cli
(migrate-meta-write-stored-and-all, organization-ownership-ceremony,
meta-package-flags-and-explain, validate-v18-authoring-verdicts,
verify-derived-proof-families, package-upgrade-plan-override-advice);
dashboards (analytics-exposure-gate-and-measure-aggregate); i18n
(flow-copy-translation-and-host-override); identity-auth
(auth-gate-held-session-raw-host-families, api-key-expiry-lifecycle,
cookie-session-renewal-in-process, default-organization-boot-invariant,
import-invitation-and-sso-domain-answers); integration-system
(inbound-mailbox-association,
notification-org-and-redeliver-eligibility, oracle-federated-read-write,
mssql-federated-read-write); platform-core (v18-boot-refusals,
protocol-18-handshake-and-stored-replay,
settings-organization-isolation-and-platform-rung,
serve-composition-v18); records-forms
(write-time-option-and-element-shape-judgement,
write-answer-advisories-rollback-and-tree-delete,
comment-reactions-and-edit-stamps, v18-semantic-defaults,
action-preflight-panel); studio-authoring
(meta-save-preconditions-and-draft-rows, multi-package-item-rows,
save-door-runs-authoring-rules, page-api-binding-reread-after-action).

Edits are literal text spans: every untouched item stays byte-identical,
and each edited file parses to exactly the intended value.

## Tests

No test changed. The new items' pins were run with `--reporter=tree` at
this branch, all green: plugin-security (3 files, 165 tests), spec (1,
26), lint (1, 40), cloud-connection (1, 6), runtime (1, 10), plugin-auth
(5, 186), service-analytics (6 files), rest (3, 34), service-messaging
(1, 14). The permission-set pins: runtime permission-set-package-doors
(40), permission-set-address + grant-permission-set-package (49),
protocol-permission-set-name-registry-reading (18).

## Acceptance notes

- History refs read `#PENDING-33969` in the first commits; a follow-up
commit swaps them to this PR's number.
- None of the new items was driven live in this PR. Their steps and
answers follow QA run objectstack-ai#33785's live run at a557fa3 (comments 6893194178
and 6893199839), and sources were re-read at main 159757a.

## Verification

- `pnpm check:platform-checklist`: OK (433 items), re-run on the
patch-round head `3b39e185`.
- `node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack
--ran`: 16 derived, 16 run, 0 NOT-MEASURED, all exit 0.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01ADHkmRVa2kpALN3irmcUCv

<!-- signed: domain:devx#2 · os-steve · session_01ADHkmQTVjryTSkqydKVS6z
-->

---------

Co-authored-by: Claude <noreply@anthropic.com>
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/m 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.

service-messaging: three follow-ups from the contract review of the role: audience fix (#33320)

1 participant