Finding — contract drift inside packages/spec
packages/spec/src/system/constants/platform-object-names.ts declares the curated cloud list with this contract:
Objects contributed by the CLOUD runtime (@objectstack/service-tenant, defined in the separate cloud repository). … Listed here so a cloud-targeted stack is not told its references are fictional.
CLOUD_PROVIDED_OBJECT_NAMES carries sys_package and sys_package_installation — but not sys_package_version, the middle table of the same family that packages/spec/src/cloud/package.zod.ts declares:
sys_package — identity (one row per logical package)
sys_package_version — immutable release snapshots (see package-version.zod.ts)
sys_package_installation — env ↔ version pairing (see environment-package.zod.ts)
packages/spec/src/cloud/package-version.zod.ts is the row schema for it ("One row in sys_package_version — a sealed, versioned release of a package").
Where it bites
Shipped platform metadata references the object: packages/metadata-core/src/objects/sys-metadata.object.ts:76 — package_version_id: Field.lookup('sys_package_version', …) on sys_metadata.
The object-reference ladder (packages/lint/src/validate-object-references.ts, isPlatformProvidedObjectName) classes that name as rung 4 — platform-prefixed, registered by nothing — i.e. the object-reference-unregistered-platform advisory that exists for fictional names like sys_approval_process. Measured while enrolling field references in that ladder for #16611 (branch claude/issue-16611-lookup-reference-target-gate, commit c9164c0d, corpus: every *.object.ts under packages/ + examples/ at origin/main 5e53d73, 116 objects, 137 relationship fields): exactly one finding across the whole universe, and it is this one —
WARNING object-reference-unregistered-platform · objects[34].fields.package_version_id.reference :: lookup target "sys_package_version" carries a platform namespace prefix, but no platform package, official plugin, or cloud runtime object registers that name
Today the same misclassification would hit any dataset object, action param reference, dashboard filter optionsFrom.object or nav requiresObject naming sys_package_version.
Prescription
Add sys_package_version to CLOUD_PROVIDED_OBJECT_NAMES (one line), with the cloud repo's conformance half confirming that @objectstack/service-tenant registers it — the header says that half is owned there and cannot be tested from this repo. Same class as the closed finding on sys_license (#13842).
Filed unassigned from the #16611 measurement; not part of that card.
Generated by Claude Code
Finding — contract drift inside
packages/specpackages/spec/src/system/constants/platform-object-names.tsdeclares the curated cloud list with this contract:CLOUD_PROVIDED_OBJECT_NAMEScarriessys_packageandsys_package_installation— but notsys_package_version, the middle table of the same family thatpackages/spec/src/cloud/package.zod.tsdeclares:packages/spec/src/cloud/package-version.zod.tsis the row schema for it ("One row insys_package_version— a sealed, versioned release of a package").Where it bites
Shipped platform metadata references the object:
packages/metadata-core/src/objects/sys-metadata.object.ts:76—package_version_id: Field.lookup('sys_package_version', …)onsys_metadata.The object-reference ladder (
packages/lint/src/validate-object-references.ts,isPlatformProvidedObjectName) classes that name as rung 4 — platform-prefixed, registered by nothing — i.e. theobject-reference-unregistered-platformadvisory that exists for fictional names likesys_approval_process. Measured while enrolling field references in that ladder for #16611 (branchclaude/issue-16611-lookup-reference-target-gate, commitc9164c0d, corpus: every*.object.tsunderpackages/+examples/atorigin/main5e53d73, 116 objects, 137 relationship fields): exactly one finding across the whole universe, and it is this one —Today the same misclassification would hit any dataset
object, action paramreference, dashboard filteroptionsFrom.objector navrequiresObjectnamingsys_package_version.Prescription
Add
sys_package_versiontoCLOUD_PROVIDED_OBJECT_NAMES(one line), with the cloud repo's conformance half confirming that@objectstack/service-tenantregisters it — the header says that half is owned there and cannot be tested from this repo. Same class as the closed finding onsys_license(#13842).Filed unassigned from the #16611 measurement; not part of that card.
Generated by Claude Code