Uh oh!
There was an error while loading. Please reload this page.
feat(spec): declare the viewItems channel — a portable home for non-container view artifacts in runtime-assembled manifests - #8564
Conversation
…facts in assembled manifests (#5320) Option B of the 2026-08-12 fork ruling on #5320: runtime-assembled manifests (package export, environment artifacts) get a DECLARED home for the view artifacts the authored stack vocabulary refuses — expanded viewKind items, tenant-authored standalone ViewItems, flattened overlays. - AssembledViewArtifactSchema: the non-container branches of the view metadata vocabulary, built from VIEW_METADATA_MEMBERS minus container (no drift). - partitionAssembledViewArtifacts: producer-side re-aggregation (A's mechanical half) — containers travel in views:, exactly-derivable expanded items fold away, everything else travels in viewItems:. - ObjectStackDefinition.viewItems: declared always-refusing (machine-assembled only) so a hand-authored viewItems fails tsc and parse with the prescription instead of being silently stripped. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012MNV7ZSCjNfA38eDCjsXQL
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
📓 Docs Drift CheckThis PR changes 1 package(s): 106 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
⛔ 7 release-owned page(s) also reference the affected code. These are read-only:
|
…lias, root re-exports, INVALID_METADATA provenance row (#5320) - isViewContainerShaped: ONE classifier for producers (partition) and the consumer (the registration loop's views: tighten) — two classifiers would let an assembler emit an entry the importer refuses. - AssembledViewArtifactParsed (ADR-0122 alias convention). - Root index re-exports the assembled-views vocabulary (the engine imports from the package root). - ERROR_CODE_LEDGER: INVALID_METADATA provenance row under @objectstack/objectql (third emitter — the views: tighten and the viewItems: channel refuse 422). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012MNV7ZSCjNfA38eDCjsXQL
…ws-vocabulary-and-tighten
…in/main (#5320) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012MNV7ZSCjNfA38eDCjsXQL
Uh oh!
There was an error while loading. Please reload this page.
Part of #5320. Part of #8070. (Deliberately not
Fixes— this PR lands only the vocabulary half; the tighten and the producer adoption land in the follow-up PR, which closes both cards.)What this is (step 1 of the ruled sequence)
The 2026-08-12 fork ruling on #5320 adopted option B plus A's mechanical half: before the runtime registration loop tightens
views:to the declared container-only contract, runtime-assembled manifests need a declared way to carry the three artifact classes the fork measured as stack-schema-refused yet metadata-door-legal — expandedviewKinditems, tenant-authored standalone ViewItems, and flattened overlays.This PR declares that home in
packages/spec:AssembledViewArtifactSchema(src/ui/assembled-views.zod.ts) — one entry of an assembled manifest'sviewItems:collection. Built fromVIEW_METADATA_MEMBERSminuscontainer, so the assembled channel and the metadata door cannot drift into two vocabularies. Strictly schema'd (the wire members.strip(); no passthrough bags).partitionAssembledViewArtifacts— the producer-side re-aggregation (A's mechanical half), shared by every manifest assembler for the same reasonexpandViewContainerlives in spec: the derivability question ("will the import side's expansion of this container reproduce this item exactly?") must run the expansion, not a re-implementation. Containers travel inviews:; exactly-derivable expanded items fold away (reported infolded); standalone items, overlays, and edited/personalised expanded items always travel inviewItems:.ObjectStackDefinition.viewItems— declared as an always-refusing key (theretiredKey()mechanism applied to a machine-only key): a hand-authoredviewItems:failstsc(input typenever) and fails parse with the prescription, instead of being silently stripped by the non-strict stack root. Decision documented in the module header: the channel is machine-assembled, not a second authoring spelling.Generated artifacts
api-surface/ui.jsonandexport-origins/ui.jsonregenerated (additions only — the new exports).check:generatedgreen;check:authorable-surfacegreen with no manifest/surface churn (the new export is a union, which mints no authorable object keys).check:stack-collection-mapsgreen with no new waivers (theviewItemskey is deliberately not az.array(XSchema)collection, so no enumeration site owes it a row).Verification
pnpm --filter @objectstack/spec test— 395 files / 10502 tests passed (14 new inassembled-views.test.ts, inverting theviews:数组的三个门形状判断不一致:栈级 schema 只收容器、授权 lint 按记录门映射、运行时注册循环全收 —— declared ≠ enforced 的「运行时更宽」向 #5320 fork's measured probes: the minimal single-container export set folds to the container alone; a standalone ViewItem travels; an edited or personalised expanded item is never folded away; authoredviewItems:is refused with the prescription).pnpm --filter @objectstack/spec typecheckgreen.dispatch-gates.mjsfor the changed paths:check:doc-formula-expressions,check:merge-driver,check:spec-parsed-alias(caught a missing ADR-0122…Parsedalias — added),check:stack-collection-maps,check:type-source-resolution— all green locally.For the landing relay
This PR carries regenerated spec artifacts — it should enter the spec landing relay ahead of the follow-up PR (
claude/issue-5320-views-vocabulary-and-tighten), which consumes these exports inpackages/runtime(export partition),packages/objectql(the tighten), andpackages/lint(third-gate alignment).Generated by Claude Code
Generated by Claude Code