Summary
A capability listed in requires: [...] is fail-fast at serve time when its provider package is missing. But when the provider has no installable version in the current edition, this is not an install mistake the developer can fix by adding a dependency — and nothing in the static gate (os validate / os build) or in a validate && build && test CI script ever surfaces it, because none of them resolve provider packages or boot the runtime. The failure appears only at os start / os dev, with a generic message that does not mention the edition boundary.
Surfaced upgrading a production (open-edition) app from 14.7 to 16.0.0-rc.1.
Repro
requires: ['ai', ...]. At boot:
✗ [AI] required but @objectstack/service-ai is not installed.
Add it to the app's dependencies, or drop the capability from `requires`.
ELIFECYCLE Command failed with exit code 1.
But @objectstack/service-ai was removed from the open edition (11.3.0 / ADR-0025 S2) — the AI runtime is cloud-only now, and the package's last open-registry version is 10.3.0. So under 16 there is no version to install; the "add it to your dependencies" advice cannot be followed on the open edition.
os validate passes (its "Checking capability references (ADR-0066)" only checks the token against the known-capability vocabulary, not whether a provider is resolvable). os build passes (it never resolves providers). A typical verify = validate && typecheck && build && test never boots, so CI never catches it either.
Proposed check (os build, or a new os preflight)
Resolve each requires capability's provider package and classify:
- installed → ok.
- absent but installable in the current edition → actionable hint:
run pnpm add @objectstack/<pkg>. - no installable version in the current edition (e.g.
service-ai on open) → error with edition context, not the generic "not installed":
ai resolves to @objectstack/service-ai, which is not available in the open edition (cloud-only since 11.3.0 / ADR-0025 S2). Remove ai from requires, or run under a cloud runtime that provides the ai tier.
Category (3) requires the resolver to know each capability's edition/availability — the same knowledge serve's CAPABILITY_PROVIDERS map + tier gating already encode; this just reads it earlier and reports instead of aborting.
Acceptance criteria
os build (or os preflight) fails fast on a requires entry whose provider has no installable version in the active edition, with the edition-aware message above.- An installable-but-absent provider yields a
pnpm add hint rather than a hard error. - A satisfied
requires list passes unchanged. - Ideally the same classification backs the
serve-time message so boot and preflight read identically.
Related shift-left checks from the same 14.7 → 16 upgrade: #3365, #3366, #3367.
Summary
A capability listed in
requires: [...]is fail-fast atservetime when its provider package is missing. But when the provider has no installable version in the current edition, this is not an install mistake the developer can fix by adding a dependency — and nothing in the static gate (os validate/os build) or in avalidate && build && testCI script ever surfaces it, because none of them resolve provider packages or boot the runtime. The failure appears only atos start/os dev, with a generic message that does not mention the edition boundary.Surfaced upgrading a production (open-edition) app from
14.7to16.0.0-rc.1.Repro
requires: ['ai', ...]. At boot:But
@objectstack/service-aiwas removed from the open edition (11.3.0 / ADR-0025 S2) — the AI runtime is cloud-only now, and the package's last open-registry version is10.3.0. So under 16 there is no version to install; the "add it to your dependencies" advice cannot be followed on the open edition.os validatepasses (its "Checking capability references (ADR-0066)" only checks the token against the known-capability vocabulary, not whether a provider is resolvable).os buildpasses (it never resolves providers). A typicalverify = validate && typecheck && build && testnever boots, so CI never catches it either.Proposed check (
os build, or a newos preflight)Resolve each
requirescapability's provider package and classify:run pnpm add @objectstack/<pkg>.service-aion open) → error with edition context, not the generic "not installed":Category (3) requires the resolver to know each capability's edition/availability — the same knowledge
serve's CAPABILITY_PROVIDERS map + tier gating already encode; this just reads it earlier and reports instead of aborting.Acceptance criteria
os build(oros preflight) fails fast on arequiresentry whose provider has no installable version in the active edition, with the edition-aware message above.pnpm addhint rather than a hard error.requireslist passes unchanged.serve-time message so boot and preflight read identically.Related shift-left checks from the same 14.7 → 16 upgrade: #3365, #3366, #3367.