Skip to content

fix(cli)!: docs/metadata-embed-ref judges a package doc against its package and declared dependencies - #27204

Merged
objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/project-thread-uf717c
Oct 28, 2026
Merged

objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/project-thread-uf717c

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Leehom · project thread

Fixes #27090

Clause-②: yes (narrowing)
Metadata-protocol: none
Skills-docs: follow-up owed — skills/objectstack-ui/rules/pages.md (its "Inline metadata views" section says a referenced item "must exist in this package"; it should add "or a package it declares in manifest.dependencies")

维护者速读

  • 改了什么:os build / os validate / os lint 检查文档里的 ```metadata 嵌入(状态机、流程、权限集)时,不再拿整个产物的顶层去找被引用的对象,而是拿"发这篇文档的那个包"加上"它在 manifest.dependencies 里声明的包"去找。顶层 src/docs/ 的文档仍按栈自身的定义判,再加上产物 manifest.id 指向的那个包(这些文档就落在它身上)及其声明的依赖。
  • 为什么改:多包产物(composeStacks(…, { manifest: 'preserve' }))把定义都放在 packages[] 里,顶层是空的,所以包文档连自己包的对象都嵌不了(HotCRM 实测,被迫改用手写 mermaid)。分诊裁定:按发文档的包加它声明的依赖判,不是"产物里有就行"。
  • 风险与回滚:放宽为主;同时收紧两种原本能过的写法:包内联文档(defineStack({ docs }))里引用不存在的对象(以前根本没人检查),以及顶层保留扁平副本的产物里,包文档嵌入一个它没声明依赖的兄弟包的对象。只改构建期检查,不改元数据协议,也不改运行时渲染。回滚即 revert。
  • 先看:packages/cli/src/utils/collect-docs.ts 的 lintMetadataEmbeds(唯一的 map 构建,现在吃 own + dependencies)和 collectAndLintDocs 里的 embedScope;collect-docs.package-docs.test.ts 新增的 docs/metadata-embed-ref judges a package doc … 一组。
  • 两分钟验证:pnpm --filter @objectstack/cli exec vitest run --maxWorkers=2 src/utils/collect-docs.package-docs.test.ts,预期 49/49 通过;在 main 上同一文件 8 条失败。
  • 需要你做的:无,席位落地。

What changes

lintMetadataEmbeds (packages/cli/src/utils/collect-docs.ts) is the ADR-0051 embed check. It built its object, flow and permission maps from the stack it was handed, and collectAndLintDocs handed it the artifact's top level both times: for the stack-level docs, and for each package's directory docs. A composed multi-package artifact carries its definitions under packages[] and nothing at the top level (#14512), so every package-doc embed was refused, including one naming the package's own object.

Before (origin/main 6866e2e7) This head
A package's directory docs (src/PKG/docs/) judged against the artifact's top level judged against that package's body plus the bodies of the packages of this artifact its manifest.dependencies names
A package's inline body docs (packages[i].manifest.docs) judged only through a top-level copy, which a disjoint composed artifact does not carry, so never judged judged with the directory docs, in the same scope
Stack-level docs (src/docs/, unclaimed inline docs) judged against the stack's top level the stack's top level, plus, when the artifact's manifest.id names one of its packages (flatDocsOwner), that package's body and its declared dependencies. Those docs ship on that body (#22190) and the door registers the top level under that id.
The refusal's scope words "does not exist in this package" (false for a package doc) "does not exist in this package", or "in this package or its declared dependencies (IDS)" when the owner declares any
A stack with no packages[] its own collections unchanged: embedScope answers [stack] and no dependencies
  • One map builder. lintMetadataEmbeds(docs, own, dependencies = []). own is one record or a list of them (a stack, a body, or both). The maps are built once from [...dependencies' bodies, ...own], so an owner's object wins a name a dependency also carries. No second builder, and every existing one-stack caller is unchanged.
  • The declaration is the field the artifact already carries. declaredDependencyIds from @objectstack/core reads manifest.dependencies (the { [packageId]: range } record) for the artifact load order (ADR-0130 D5). An id the artifact does not carry is an installed package's business and is not judged here. The edge is one-way. No new manifest key.
  • The partition now matches lintDocs. The stack pass judges stackScoped, the package pass judges entry.all. A body doc's top-level copy (a reconciled composition keeps one) is no longer judged a second time against the whole artifact.
  • Comments made true. The collectAndLintDocs and lintDocs docblocks said embeds resolve artifact-wide, the same as links. Links still do. The docblocks now say why embeds do not: an embed renders another package's live metadata, and ADR-0051 resolves it through the dependency set only.

Tests

packages/cli/src/utils/collect-docs.package-docs.test.ts, a new block over a real composeStacks([service, app], { manifest: 'preserve' }) artifact (each package owns one object with a state_machine rule):

Case main head
service's directory doc embeds service's own object: builds (acceptance 1). The test also asserts the artifact's top level carries no objects. red green
...a dead reference in that doc is refused, and the message names "this package" red green
app's doc embeds service's object, app declares nothing: refused (acceptance 2) green green
...builds once app declares service red green
The declaration is one-way: service declares app, and app's embed of service's object stays refused red green
A refusal in a package that declares dependencies names them red green
Inline body docs are judged in the same scope red green
A flat src/docs/ doc resolves in the owner package's scope, and reaches service once app declares it red green
A stack with no packages[]: a stack object embeds, a dead name is refused with "this package" (acceptance 3) green green

The existing case metadata embeds and links are partitioned the SAME way — artifact-wide pinned the old artifact-wide resolution, which the triage ruling retires. It is restated in place as a link resolves artifact-wide while an embed resolves in its OWNER's scope (#27090): both links resolve, core's embed of the top-level flow builds (core owns the top level), and orders' embed is refused.

Red on main: 8 failed, 41 passed (collect-docs.ts restored from origin/main, tests at head)
× a link resolves artifact-wide while an embed resolves in its OWNER's scope (#27090)
× a package doc embedding its OWN package's object builds — the card's acceptance 1
× ...and a dead reference in that same doc is still refused, naming the scope it judged
× ...and builds once that package DECLARES the sibling in manifest.dependencies
× ⛔ a declaration is one-way: the declared package does not reach back
× a refusal in a package that declares dependencies names them as the scope it judged
× a package's INLINE body doc is judged in the same scope — it was not judged at all before
× a flat src/docs/ doc ships on the package the artifact manifest names, and resolves in its scope
Tests  8 failed | 41 passed (49)

Restore proven: the file's blob equals HEAD's and git diff HEAD is empty.

Ablations (scripts/ablation-replace.mjs, restored and verified each time)
  • The dependency arm replaced by return [];: anchor 1 → 0, blob f85d1bed → 85f76a70. 4 failed / 45 passed: the "declares", "one-way", "names them" and "flat doc reaches service" cases. Restored, blob == HEAD.
  • The owner's top-level arm (index === flatOwner?.index ? [stack, body] : [body] → [body]): 1 failed / 63 passed (collect-docs.package-docs + collect-docs.flat-docs-owner): the link/embed case. Restored, blob == HEAD.
Live: HotCRM (four packages, `preserve`), the card's own probe

HotCRM main 353dace, with src/service/docs/crm_probe_service.md and src/docs/crm_probe_app.md, each embedding state_machine crm_case / case_status_progression (crm_case is the service package's; service declares app.objectstack.hotcrm, and the app package declares nothing).

  • Published @objectstack/cli 18.2.0: exit 1, Package docs validation failed (2 issues), both docs refused with "does not exist in this package".
  • This head's cli (node packages/cli/bin/run.js build): exit 1, 1 issue, only docs/crm_probe_app (the app package does not declare the service package, which is the ruled refusal).
  • This head, with only the service probe: exit 0, Build complete, and dist/objectstack.json carries crm_probe_service on the app.objectstack.hotcrm.service body.

Other suites: cli unit project (--project unit) and cli typecheck are in Verification.

Acceptance notes

  • Direct dependencies only. A package reaches the packages it declares, not their dependencies. That matches ADR-0046 §3.3 ("the package's docs plus its dependencies' docs") and ADR-0051's "within the doc's own package, then its dependencies".
  • The flat-docs owner reaches the top level. In a reconciled composition (objectConflict: 'merge', or an input that keeps its own collections) the top level is the flattened union, so the owner's docs still resolve artifact-wide there. That follows the order's ruling that stack-level docs are judged against the stack's own definitions. A non-owner package in the same artifact gets its own scope.
  • The refused shapes, named in the changeset's BREAKING banner: (1) an inline body doc with a dead embed, never judged before; (2) in an artifact that keeps a flattened top level, a non-owner package doc embedding an undeclared sibling's item. No example or HotCRM doc carries either (HotCRM builds at this head with all 21 of its collected docs, the probe included; examples/app-multi-package ships no docs).
  • The census pin. test/normalized-call-sites.test.ts gets a top-level row for collect-docs' stack.books read (in lintDocNavTargets, untouched here). The read was on main already, and the census never saw it: its codeOnly masker loses its place in a template literal nested inside another one (the did-you-mean suffix of each embed refusal), and on main it blanked collect-docs' stack.objects / stack.flows / stack.permissions / stack.books reads, all four. This head's literals shifted the parity and exposed stack.books. The masker defect is reported to the seat, not fixed here.
  • Not in this diff: the skills page above (Skills-docs: follow-up owed).

Verification

Every reading below is at head 8149b3d2, after the last commit.

  • cli unit project: pnpm --filter @objectstack/cli exec vitest run --project unit --maxWorkers=2. Lock VERDICT command-exit 0, Test Files 344/344, Tests 4987/4987. The integration project is left to CI (no spawn entry or integration-tier file is touched).
  • cli typecheck: pnpm --filter @objectstack/cli run typecheck (tsc --noEmit && pnpm check:test-typecheck, which covers the test files). VERDICT command-exit 0.
  • eslint (pnpm exec eslint --no-inline-config on the three touched TS files): exit 0.
  • Derived gates: node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack gives 61 commands. Each was run with its exit code captured before any pipe, and all 61 exited 0. --ran: "61 derived famil(ies) accounted for — 61 run, 0 NOT-MEASURED". This was after a full turbo run build (VERDICT 0), so check:dual-build-cjs-loads, check:dts-closure and check:i18n-coverage measured, and the check-plugin-teardown-shape --self-test positive control was fetched.
  • Dogfood battery (owed by the (narrowing) arm): pnpm --filter @objectstack/dogfood test under the lock. VERDICT command-exit 0, Test Files 348 passed / 3 skipped (351), Tests 2804 passed / 20 skipped (2824), no failures.
  • Live: os build of examples/app-multi-package at this head: exit 0, "0 collected" docs (it ships none, so nothing moves there). HotCRM is in Tests.
  • CI-owned: the repo-wide pnpm lint, Test Core shards, Type Check lanes and the families dispatch-gates lists outside its derived total.

Human Minimum

  • 1. Schemas start as Zod; packages/spec holds no runtime logic. (packages/spec untouched)
  • 2. Every name I added uses the casing for its kind.
  • 3. No formatter ran; pnpm lint passes. (eslint on the touched files: exit 0; the repo-wide run is CI's)
  • 4. One issue, one branch off an up-to-date main, one pull request.
  • 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset.
  • 6. packages/spec touched: n/a.
  • 7. No hand edits to content/docs/references/, packages/*/CHANGELOG.md or content/docs/releases/.
  • 8. Title, body and comments are in English. (The 维护者速读 block is the repo's Chinese maintainer summary.)

Generated by Claude Code

…ckage and declared dependencies

A multi-package artifact carries its definitions under packages[] and
nothing at the top level, so the embed check, which read the artifact's
top level, refused a package doc embedding its own package's object.
Each owner's docs are now judged against that owner's body plus the
packages of the artifact it declares in manifest.dependencies; the
stack-level docs keep the stack's top level and add the package the
artifact manifest names. Body docs get the same pass.

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FEkQ5kKDkUCEhVR7RZ3Npk
…-owned read census

The read predates this branch; the census's codeOnly masker lost its
place in a nested template literal earlier in the file and blanked it,
along with the embed check's old stack.objects/flows/permissions reads.

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FEkQ5kKDkUCEhVR7RZ3Npk
@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 Oct 28, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

3 anchor(s) derived from 1 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run.

What this run could not see
  • 1 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 56 of 208 client-bound route-ledger rows — the other 152 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 152: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 55 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 97 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 — 32 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 4265176cf34d47055346443f483ba826bd117161 → packageMentionDocs.

Which tree this was computed on

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

node scripts/docs-audit/affected-docs.mjs --json 4265176cf34d47055346443f483ba826bd117161

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 8149b3d240e97680ab25dc5da74241c05816d87b
Local-runs: none
Scope: packages/cli/src/utils/collect-docs.ts, packages/cli/src/utils/collect-docs.package-docs.test.ts, packages/cli/test/normalized-call-sites.test.ts + packages/cli/src/utils/artifact-packages.ts (artifactPackages: the bodies[index] position IS the packages[i] position, 1:1 map), packages/core/src/artifact-packages.ts (declaredDependencyIds, resolveArtifactPackageEntries), packages/core/src/stack-collections.ts (declaredPackageEntries), packages/runtime/src/app-plugin.ts (the residual top-level rule the owner arm rests on), packages/spec/src/stack.zod.ts (manifest: 'preserve' copy-removal and its three conditions), docs/adr/0051-inline-metadata-views-in-docs.md §3.3 and §3.5 step 3, docs/adr/0046-package-docs-as-metadata.md §3.3, skills/objectstack-ui/rules/pages.md (the follow-up owed), .changeset/27090-embed-ref-package-scope.md

Face: narrowing (Clause-②: yes (narrowing) on the PR body and the changeset, identical). Inputs: card #27090 body and all three comments (triage 6461907878, claim 6465113081, os-dev-report 6466645930), PR #27204 body, file list and git diff origin/main...pr27204 (merge base 6866e2e7, 4 files, +259/-38), and the check-runs on this head. Nothing built, run or re-run.

① Derived judgments

Yardstick: triage 6461907878 — the embed is judged against the package that ships the doc, plus what that package declares it depends on; not "anything in the artifact".

  1. lintMetadataEmbeds(docs, own, dependencies = []) — one map builder over [...dependency bodies, ...own]. Right. One builder, no second map, no new manifest key (the claim's two ⛔s hold). Dependencies first and owner last is the correct Map precedence (owner wins a shared name). Every pre-existing one-stack caller (collect-docs.test.ts ×2) is unchanged in signature and scope.
  2. Dependency edge = declaredDependencyIds(body) over the artifact's own bodies, direct only, one-way, self excluded, an id the artifact does not carry dropped. Right. declaredDependencyIds reads manifest.dependencies (packages/core/src/artifact-packages.ts:196), the same field resolveArtifactPackageEntries orders the load by (ADR-0130 D5), and preserve writes the assembled body as manifest fields + collections, so body.dependencies and body.objects are on one record. Direct-only matches ADR-0051 §3.3 ("own package, then its dependencies") and ADR-0046 §3.3 ("the package's docs plus its dependencies' docs"). Read and confirmed in the diff's embedScope: dep.index !== index, bodyById.get(id) only.
  3. Widening arm — a package's directory docs and inline body docs (entry.all) judged against its body + declared deps. Right, and it is the card's acceptance 1 and 2 (pinned: own object builds; undeclared sibling refused; declared sibling builds; one-way). The measured premise is pinned too (artifact.objects undefined under preserve), so the test cannot pass vacuously against a flattened copy.
  4. Narrowing arm (a) — inline body docs with a dead embed now refuse. Right and real: on main the package pass judged entry.fromDisk only, and the stack pass judged the top-level docs, which a two-package preserve artifact does not carry (stack.zod.ts copy-removal, conditions 1–3). A dead body-doc embed was therefore unjudged. Correctly declared as BREAKING.
  5. Narrowing arm (b) — in an artifact that keeps a flattened top level (a reconciled composition, condition 3 failing), a non-owner package doc embedding an undeclared sibling's item now refuses. Right: that is the ruling's own sentence. Correctly declared.
  6. Stack-level docs (stackScoped) judged against [stack, ownerBody] + the owner's deps when flatDocsOwner resolves; [stack] alone otherwise. Right. The card's Target says stack-level docs are judged against the stack's own definitions; adding the owner body is the metadata: every boot of a multi-package artifact built by os build warns that its flat src/docs pages are "claimed by no package body" — the CLI puts them at the top level by its own rule, and the warning`s remedy cannot be followed #22190 consequence (those docs ship on that body). A single-package stack: flatDocsOwner is undefined, scope [stack], issue list unmoved — acceptance 3, pinned.
  7. The owner package's own docs reach the top level too (own = [stack, body] when index === flatOwner.index). Right for what the top level actually carries in an ADR-0130 artifact: residual items no body claims, which MetadataPlugin.registerUnclaimedTopLevel registers under the artifact's manifest.id, i.e. under this very package (app-plugin.ts docblock, read). The restated link/embed test pins exactly that shape (a top-level flow owned by nobody, core = manifest.id). One corner is wider than the ruling's sentence and the PR names it in its acceptance notes: in a reconciled composition the top level also holds the flattened copies of sibling items the bodies claim, so the owner's docs can still embed an undeclared sibling's item through that copy while a non-owner's cannot. That copy is registered under the sibling, not the owner, so render would resolve it only through a declared edge. Bounded (owner package only, objectConflict: 'merge'/'override' compositions only), strictly narrower than main (which admitted it for every package), and no fixture in this repo or HotCRM carries it. Not a FAIL; escalated in ③ with the sharper rule named.
  8. Refusal text names the judged scope ("this package" / "this package or its declared dependencies (IDS)"). Right; IDS lists carried deps only, which is the set judged. The did-you-mean suffix stays.
  9. Docblocks of collectDocsFromSrc, lintMetadataEmbeds, collectAndLintDocs rewritten to say links resolve artifact-wide and embeds do not. Right; the previous text ("the same scope lintMetadataEmbeds already uses") would have been false after this diff.
  10. Census row utils/collect-docs.ts :: stack.books → top-level. Right as a classification: lintDocNavTargets does addBooks(stack.books) AND addBooks(body.books) over artifactPackages(stack) (collect-docs.ts head :1134–1138), so the top-level read is one half of a union by design. The read is pre-existing on main; the row is needed at this head because the diff removed the stack.objects/flows/permissions reads (now source[key] over a non-stack receiver) and shifted codeOnly's quote parity. I read codeOnly (census.head.ts :156–187): it scans a backtick literal to the next unescaped backtick, so a template literal nested inside another's ${} does throw it out of phase — the dev's reading of the masker defect is credible and the gate was indeed false-green on main for this file. The masker is not fixed here (out of the claim's file surface, class a finding) — see ③.
  11. Public surface. @objectstack/cli: lintMetadataEmbeds is an export of an internal util, not a package entry; its second parameter widened to a union and a third optional parameter added — source-compatible for every existing caller. New exported interface EmbedDependency. Nothing in packages/spec; check:api-surface is not implicated. @objectstack/core is already a dependency of cli (workspace:*), and declaredDependencyIds is exported via export * from './artifact-packages.js'.

Nothing in the diff lands outside the three hits plus the changeset; no governed path (Queue Guard green).

② Semver level

  • Changeset .changeset/27090-embed-ref-package-scope.md: '@objectstack/cli': patch, BREAKING banner, both declaration lines, one ADR-0087 marker not-required (no-migration-prescription) with a reason. Right: a non-protocol accept-set change, widening or breaking, ships patch with its banner and disposition (AGENTS.md Post-Task Checklist 3). cli is the only package the diff moves (core is read, not changed). Check Changeset concluded success on this head.
  • Clause-②: yes (narrowing) on the PR body and the changeset — identical, and the narrowing is real (①4, ①5). yes (widening) would have been false.
  • Metadata-protocol: none — accepted. No Zod key, accepted value or metadata type moves; the docs item's content schema is unchanged; what moves is the build-time liveness check's resolution scope, which ADR-0051 §3.5 step 3 already specified as "the package and its dependencies". The narrowing is carried, correctly, by the Clause-② arm.
  • ADR-0087 no-migration-prescription: the body carries a remedy (declare the dependency / move the doc / fix the name), which is a doc-authoring fix, not a consumer-code rewrite; consistent with the marker's own rule (statement-against-statement).

③ Boundary flags

  • Skills-docs: follow-up owed — skills/objectstack-ui/rules/pages.md :396–398 says the referenced item "must exist in this package — a dead same-package reference fails the build". After this PR that sentence is incomplete (declared dependencies now resolve). skills/** is Tier H, outside this claim: escalated to the seat — a docs card on skills/objectstack-ui/rules/pages.md is owed; no other prose surface states the old rule (grep of content/docs, skills, apps/docs for "exist in this package" / "metadata-embed-ref": only this page).
  • os-dev-report out_of_scope_findings [0], class a — the census masker. codeOnly in packages/cli/test/normalized-call-sites.test.ts loses its place on a nested template literal, so every top-level read of a package-owned key in src is classified was green on main while blanking four reads in collect-docs.ts. Pre-existing, not introduced here; the PR's new row is correct at this head but the gate's coverage of OTHER files is equally parity-dependent. Escalated to the seat — a card for the masker (fix codeOnly to track ${…} nesting, with a --self-test/fixture case). Not a FAIL: the gate is a test, not a required-check rename, and the defect is reachable from main.
  • ①7 corner (owner package + reconciled composition). The sharper rule is "the top level's unclaimed items" — the exact set registerUnclaimedTopLevel registers under manifest.id — rather than the whole top level. Escalated to the seat as a follow-up question, not a defect of this PR: it is the card's own "stack-level docs against the stack's own definitions" applied to the body those docs ship on, it is narrower than main, and the PR declares it in writing.
  • open_questions: [] on the report. Nothing further to answer.
  • Draft state: the PR is a draft, owned by the seat; nothing here arms it.

Check-runs on 8149b3d2… (read after every run concluded; 52 runs, 0 pending, 0 failed): Lint & Repo Gates, TypeScript Type Check, Test Core (8/8 shards), Build Core, Governed Surface Queue Guard, Check Changeset, Dogfood Regression Gate, PR-body guards all success; Lint UI, Type Check UI, Build & E2E UI skipped (no ui/ path in the diff); the opt-in and scheduled runs skipped. The gate verdicts are green.

Implemented-by: claude/project-thread-uf717c
Reviewed-by: session_0186vfjHHMsRXC9EUT9hTFMo

VERDICT: PASS


Generated by Claude Code

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

席位核对

ACCEPT · domain:server seat 2 · os-project-manager · session_0186vfjHHMsRXC9EUT9hTFMo · 2026-10-28T10:45Z · head 8149b3d2 · #27090

The maintainer's standing authorisation for landing reviewed PRs, verbatim: 「按照 pm-dispatch 规则复核过的都授权」.

  1. Shape:

    • A draft against main, assignee os-project-manager, title with !.
    • Fixes #27090, Clause-②: yes (narrowing), Metadata-protocol: none and Skills-docs: follow-up owed are line-initial.
    • The changeset is a patch on @objectstack/cli with the BREAKING banner and the ADR-0087 not-required marker.
    • check-governed-merges --pr 27204 reads NOT governed, 297 changed lines.
    • The claim (6465113081) names this PR's branch.
  2. Against the order and triage 6461907878:

    • The one map builder is parameterised, lintMetadataEmbeds(docs, own, dependencies), with no second builder and no new manifest key.
    • A package's docs (directory and inline body) are judged against that package's body plus the packages its manifest.dependencies declares. The edge is direct, one-way and self-excluded, read through declaredDependencyIds.
    • The arm was measured, not assumed. The dev declared yes (narrowing) instead of the expected widening, and both narrowing arms are real:
      • a dead embed in an inline body doc, never judged before, now refuses;
      • a non-owner package doc embedding an undeclared sibling's item in a flattened composition now refuses. That is the ruling's own sentence.
    • The dogfood battery the narrowing arm owes ran at this head: 2,804 tests, 0 failures.
  3. Contract review: PASS at CONTRACT_REVIEW_TIER on this head (narrowing face, 6466927164).

  4. Gates:

    • Locally 61 of 61 derived families exit 0, with 0 NOT-MEASURED. The cli unit suite passed 4,987 of 4,987.
    • CI on head 8149b3d2: 35 success, 17 skipped, 0 red.
  5. Overlap: git merge-tree reports no conflict against main 9dacccf9.

  6. Follow-ups filed for triage:

    The review's ①7 note (an owner package in a reconciled composition could be judged against the top level's unclaimed items rather than the whole top level) is narrower than main and declared in the PR. It is noted here and not filed.


Generated by Claude Code

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review October 28, 2026 10:46
@objectstack-fleet
objectstack-fleet Bot enabled auto-merge October 28, 2026 10:46
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Oct 28, 2026
@objectstack-fleet objectstack-fleet Bot removed the needs:contract-review Marker only — PR awaits its at-tier Contract review PASS; no check reads it, the record decides label Oct 28, 2026
Merged via the queue into main with commit 91a4036 Oct 28, 2026
56 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-uf717c branch October 28, 2026 11:01
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

2 participants