Uh oh!
There was an error while loading. Please reload this page.
feat(objectql,runtime,lint): tighten views: to the container-only contract; assembled manifests travel non-container view artifacts in viewItems: - #8572
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
…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
…xport partition + lint alignment (#5320) - engine.ts registerMetadataCollections: non-container views: entries refused (INVALID_METADATA/422, wrap-it prescription); viewItems: entries validated against AssembledViewArtifactSchema and registered parsed (both seams, one body — #7163 kept). - runtime assemblePackageManifest: views partitioned via partitionAssembledViewArtifacts — containers in views:, derivable expansions folded, the rest in viewItems:. - lint validate-view-containers: viewKind entries in views: now error with the wrap-it prescription; hand-authored viewItems: flagged machine-assembled-only. - engine-nested-plugin-view-expansion.test.ts: the #7163 control block replaced WHOLESALE with the rejection pin (code+status), per the ruled fixture disposition; new engine-assembled-views-roundtrip.test.ts runs the fork's acceptance probes inverted (round trip end-to-end through the new channel). 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 3 package(s): 30 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
⛔ 2 release-owned page(s) also reference the affected code. These are read-only:
|
…ws-vocabulary-and-tighten
Uh oh!
There was an error while loading. Please reload this page.
Fixes#5320. Fixes#8070.
Stacked on #8564 (the spec vocabulary,
claude/issue-5320-spec-view-vocabulary) — this branch contains those commits; land #8564 first and this PR's diff reduces to the consumer half. TheFixes #8070claim is made because the export half is complete here: the exporter partitions, and the export→import round trip is probed end to end (below).The ruled sequence (2026-08-12 fork ruling: option B + A's mechanical half, then the tighten)
AssembledViewArtifactSchema,partitionAssembledViewArtifacts,isViewContainerShaped, the machine-onlyviewItems:key).packages/runtime/src/domains/packages.ts):GET /packages/:id/exportpartitions view artifacts — containers inviews:, expanded items the container re-derives exactly are folded away, standalone ViewItems / overlays / edited expansions travel inviewItems:.packages/objectql/src/engine.ts,registerMetadataCollections— the single body both seams run, [finding] the nested-plugin seam does not expand an aggregatedviewscontainer — a nested plugin's per-view items never reach the registry, sogetViewsByObject()/GET /meta/view?object=answer with the container alone #7163 kept): a non-containerviews:entry is refused with the ADR-0112 envelope (INVALID_METADATA/ 422) and the wrap-it prescription;viewItems:entries are validated againstAssembledViewArtifactSchemaand the parsed body registers — declared = enforced in both directions. The judgement is deliberately shape-class (the sameisViewContainerShapedthe producers partition with), not a fullViewSchema.parse: which class an entry belongs to is this seam's contract; container internals stay the authoring/publish doors' job.packages/lint/src/validate-view-containers.ts): aviewKind-bearingviews:entry is now an error with the wrap-it prescription (previously skipped as "registered as-is" — a description of the undeclared wider acceptance, not of the contract); a hand-authoredviewItems:is flagged machine-assembled-only, soos lint(which never parses) reaches the schema's verdict too.Fixture disposition (ruled, verbatim)
engine-nested-plugin-view-expansion.test.ts:204-226— the #7163 control block pinning "a standalone ViewItem registers as-is through both seams" — is replaced wholesale with the rejection pin: both seams refuse withcode+status+ prescription, the same artifact is accepted throughviewItems:, and an undeclared bag inviewItems:is refused with the envelope. Not deleted, not loosened.Fixture sweep by the rule's consumption radius: multiline grep for
views: [ … viewKind … ]acrosspackages/**,examples/**,apps/**,scripts/**— the only hits were the two files this PR updates. No other fixture feeds a non-container entry through the narrowed seam.Acceptance measurements (the fork's probes, inverted — executed against built dists, directions predicted first)
Also pinned as tests:
engine-assembled-views-roundtrip.test.ts(the end-to-end round trip through the real loop on both ends), and reverse verification run from the committed state — restoringorigin/main'sengine.tsturned exactly the predicted 7 tests red (3 refusal pins, 2 channel tests, 2 round-trip) and left the 9 expansion/parity tests green.Verification (real numbers)
@objectstack/spec— 395 files / 10502 tests + typecheck green (on the stacked base)@objectstack/objectql— 201 files / 3556 tests + typecheck green@objectstack/runtime— 154 files / 2366 tests + typecheck green@objectstack/lint— 72 files / 2017 tests + typecheck green@objectstack/cloud-connection(marketplace-install suites incl.marketplace-install-local-bundle) — 19 files / 138 tests greenapp-crm,app-showcase,app-todo— allValidation passeddispatch-gates.mjsover the changed paths):check:cross-package-test-inputs,check:durability-log-level,check:error-code-casing,check:route-envelope,check:stack-collection-maps,check:engine-split-ratio,check:query-options-erasure,check:type-check-coverage,check:doc-formula-expressions,check:merge-driver,check:spec-parsed-alias,check:type-source-resolution— all green locally.Migration consequence, stated plainly
A manifest assembled by an older runtime (an export product carrying expanded
viewKinditems insideviews:) is refused on import with the prescription (re-export with a runtime that writesviewItems:). The marketplace rehydrate loop catches per-entry errors, so a stale cached manifest logs an error at boot instead of aborting boot. Authored stacks are unaffected —defineStackalready refused every shape the loop now refuses. Cross-repo residual: the cloud repo's artifact-kernel-factory assembles env artifacts from the same registry reads; it must adoptpartitionAssembledViewArtifactsbefore cloud envs carrying expanded items boot against a runtime with this tighten — filed as a follow-up issue and flagged for the landing relay.Not addressed here, deliberately:
ARTIFACT_FIELD_TO_TYPE(thepackages/metadatacompiled-artifact ingest) does not mapviewItems— compiled artifacts come fromobjectstack buildover authored stacks (containers only, post-defineStack), so no producer emits the key on that path today; adding it there widens what a sealed runtime serves and per the #6242 gate's own waiver discipline needs its own measured change.Generated by Claude Code
Generated by Claude Code