Repository navigation
Commit 5b3afcf
docs(adr): ADR-0019 records that a flat composeStacks and a packages[] body are judged since 2026-11-13 (#33502)
<!-- claude-projects-attribution: {"github_login":"os-project-manager"}
-->
_Requested by **Leehom** · [project
thread](https://claude.ai/code/project/chan_01TenzsRopZj4jMbvjX8uz1X?thread=cmsg_01TenzsRopZj4jMbvjX8uz1X4e82tcKptpRRoyvCJDwBeL)_
Fixes #33135
domain:skills#1 · os-project-manager · session_01FEkQ5obDWQ7NdtH2f9iZXC
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 改了什么:ADR-0019 在 2026-11-12 的执行记录里写着「两种形状不受检查:扁平的 `composeStacks`,和手工拼的
`packages[]` 包体」。这句改成当日的读数(过去时),并在其后新增一段「自 2026-11-13 起,组合与 `packages[]`
包体都受检查」,逐条写明 #32898、#33074、#33122 三次合并各自检查了什么;状态行的「已落地」也补上这三次合并及其提交号。
- 为什么改:这句话两半在 `main` 上都已不成立:扁平组合把两个以上应用放到同一个 app/module
包名下会被拒(`STACK_SINGLE_APP_VIOLATION`,422),手工拼的包体也按包分别检查单应用和命名空间前缀。照着旧文字读的作者或
AI 会以为这些形状不受检查。
- 风险与回滚:只改决策记录文字,不动代码、协议和技能包;回滚即还原本 PR。
- 先看:`docs/adr/0019-app-as-consumer-unit.md` D3 修订说明下的「Enforced for
compositions and `packages[]` bodies since 2026-11-13」一段;再看第 3
行状态行新增的那半句。
- 两分钟验证:`pnpm check:adr-symbol-anchors`,预期 exit 0、「anchors across 156
records resolve」。
- 需要你做的:受管面 Tier H(`docs/adr/**`):请批准或合并。
## What changes
- **`docs/adr/0019-app-as-consumer-unit.md`, D3, the 2026-11-12 note
"Enforced for modules since 2026-11-12".** Its sentence "The check reads
one `defineStack` call. Two shapes are not judged (#32810): a flat
`composeStacks` … and a hand-built `packages[]` body." is rewritten as
the reading at that merge, in the past tense, and points to the next
paragraph: "At this merge the check read one `defineStack` call, and two
shapes were not judged (#32810): … Both are judged since 2026-11-13; see
the next paragraph." The rest of that paragraph is unchanged.
- **New dated paragraph "Enforced for compositions and `packages[]`
bodies since 2026-11-13."**, following the file's own convention (the
2026-11-12 note keeps the paragraph before it "as written" and adds a
dated note). One bullet per merge:
- #32898 (`0b23b2a0c4`): `composeStacks` refuses a flat composition
(`'last'`, `'first'` or an index) whose kept manifest is an `app` or
`module` package and that brings two or more apps,
`STACK_SINGLE_APP_VIOLATION` (422), naming each app and its input; the
remedy is `manifest: 'preserve'`; every `packages[]` body of a
composition is held to one app; a one-input composition is handed back
unjudged.
- #33074 (`2c98485db5`): changes only how strict `defineStack` counts
the top level of a `packages[]` stack. Before, every top-level app
counted against `manifest.id`; since, the residual rule #32898 gave
`composeStacks` (top-level apps no body declares count against
`manifest.id` beside that id's own body). Bodies are judged as before,
per body since #32898.
- #33122 (`5b2ec820c8`): strict `defineStack` judges namespace prefixes
per body against the body's own namespace, residual top-level objects
against `manifest.namespace`, `STACK_NAMESPACE_PREFIX_INVALID`; a body
with no namespace is not judged.
- What stays unjudged at `defineStack` (other package types, no
manifest, `strict: false`, the last now judged at `composeStacks`), and
the placement sentence, which stands (measured, below).
- **Status line, "Landed in spec".** After the #32586 clause: "and the
same rule on a flat `composeStacks` and on every `packages[]` body
(#32898, merged 2026-11-13 as `0b23b2a0c4`; #33074, merged 2026-11-13 as
`2c98485db5`), and the namespace-prefix rule judged per `packages[]`
body (#33122, merged 2026-11-13 as `5b2ec820c8`)."
- Not touched: the D3 reasons, the 2026-11-12 "Enforced today, and not
yet." paragraph, ADR-0130 (the order's surface is this file only), and
`skills/**` (PR #33475 teaches the flat-compose fact there).
## Why
Read on `origin/main` `b392ff7b`, not from the card:
- `packages/spec/src/stack.zod.ts`: `collectComposedSingleAppErrors` and
`flatSingleAppFinding` (flat result: every app counts against the one
kept manifest), `SINGLE_APP_PACKAGE_TYPES` = `app`, `module`,
`SINGLE_APP_COMPOSE_REMEDY` (names `manifest: 'preserve'`),
`collectPackageBodySingleAppErrors` (each body by its own `type`, `id`,
`apps`), `validateSingleApp` and `residualSingleAppFinding` (one judge
for both doors), `namespacePrefixErrors` (per body, residual top level),
`composeStacks`' `stacks.length === 1` early return.
- `examples/app-multi-package/objectstack.config.ts` composes with
`manifest: 'preserve'`.
- Attribution per PR, read from each merge commit's tree:
`residualSingleAppFinding`, `flatSingleAppFinding` and
`collectPackageBodySingleAppErrors` exist at `0b23b2a0c4` (#32898),
where `validateSingleApp` does not call the residual judge; it does at
`2c98485db5` (#33074); `namespacePrefixErrors` first exists at
`5b2ec820c8` (#33122).
- Each merge commit is an ancestor of `origin/main` (`git merge-base
--is-ancestor`, exit 0 for all three, after deepening the shallow
clone).
- One probe against `packages/spec/dist` built from `b392ff7b`, not kept
as a test:
| Shape | Answer |
|:--|:--|
| flat `composeStacks` (default `'last'`) of two module stacks with one
app each | refused, `STACK_SINGLE_APP_VIOLATION` 422 |
| the same under `manifest: 'preserve'` | accepted |
| hand-built `packages[]` body (module) with two apps, `defineStack` |
refused, `STACK_SINGLE_APP_VIOLATION` 422 |
| hand-built body, namespace `svc`, object `crm_case` | refused,
`STACK_NAMESPACE_PREFIX_INVALID` 422 |
| control: same body with `svc_case` | accepted |
| placement: module with no objects, app names `crm_case` | accepted |
| placement: object-less body's app names a sibling body's object,
`defineStack` and `'preserve'` compose | accepted |
The placement sentence therefore stands, as the order asked to measure.
Ruling: Leehom 2026-11-14T21:21:06Z 「开放 p3卡认领」 (p3 cards open for
claiming); scope widened to both halves by the skills seat's note
6884985712 on the card.
## Acceptance notes
- **The 2026-11-12 paragraph is edited, not kept verbatim.** The order
asks for both "rewrite the whole sentence" and "keep the dated paragraph
as the reading at that date". Rewriting the one sentence into the past
tense, with a pointer to the new note, does both: the paragraph still
reads as at #32586's merge, and no present-tense sentence on the page is
false.
- No out-of-scope findings.
## Verification
Head `691fe886` (round 1, after contract review 6885553305; round 0 was
`c72ef404`), base `origin/main` `b392ff7b`.
<details><summary>Derived gates: 21 derived, 21 run, all exit
0</summary>
`node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack` derived 21 families for the one path. Each
ran on head `c72ef404` (round 0) and again on `691fe886`, 21 of 21 exit
0 (`33135-gates-ran-r1.txt`) with its exit code captured before any
pipe, after building `@objectstack/lint...` under the verify lock
(VERDICT command-exit 0, 86s):
- exit 0: `check-adr-links` (scan and `--self-test`),
`check-closing-keyword-parity` (scan and `--self-test`),
`check-comment-mask-corpus`, `plan-test-core-shards --self-test`,
`@objectstack/lint check:doc-formula-expressions`, `check:adr-anchors`,
`check:adr-index`, `check:adr-symbol-anchors` ("3594 anchors across 156
records resolve"), `check:ci-filter-parity`,
`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`.
- `--ran` reconciliation: "21 derived famil(ies) accounted for — 21 run,
0 NOT-MEASURED".
- The path-less symbol continuations (`#flatSingleAppFinding`,
`#SINGLE_APP_COMPOSE_REMEDY`, `#collectPackageBodySingleAppErrors`,
`#validateSingleApp`, `#residualSingleAppFinding`,
`#namespacePrefixErrors`) are not judged by `check:adr-symbol-anchors`
(that spelling is off in this corpus); each was found by `grep` as a
declaration in `packages/spec/src/stack.zod.ts` on `b392ff7b`.
- CI families are read from this PR's check-runs, not re-run here.
</details>
<details><summary>Tier and governed readings</summary>
- `dispatch-gates --tier`: MANDATORY contract-review tier for
`docs/adr/**`; no one-line exit for this surface. This thread ran at the
claim's default model; the seat's in-seat contract review is the owed
record.
- `node scripts/pm/check-governed-merges.mjs --branch
claude/project-thread-bd7546`: GOVERNED, landing tier H (人合),
`docs/adr/**` x1. Size +50 / -4, under the 3000 threshold.
- `node scripts/pm/check-skill-line-ratchet.mjs`: exit 0 (no skill file
touched). No changeset: `docs/adr/**` ships in no package
(`skip-changeset`).
</details>
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01FEkQ5obDWQ7NdtH2f9iZXC
<!-- signed: domain:skills#1 · os-project-manager ·
session_01FEkQ5pjSPT7ui2EUcunaVb -->
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent acac1ea commit 5b3afcf
1 file changed
Lines changed: 50 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
205 | | - | |
| 205 | + | |
206 | 206 | | |
207 | 207 | | |
208 | | - | |
209 | | - | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
210 | 256 | | |
211 | 257 | | |
212 | 258 | | |
| |||
0 commit comments