fix(features): check declared needs and show the IndexedDB capability assembly (09-05)
A missing capability reached the feature factory as an anonymous TypeError. The composer now names the feature and the capability, and the IndexedDB provider example moves from a browser spec into an opt-in recipe with a test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
30cf71b249
commit
bc7c46b2d5
@@ -138,6 +138,17 @@ browser-capability test composes the feature over the real
|
||||
`createIndexedDbRuntime` and native IndexedDB, proving that this seam is not
|
||||
limited to an in-memory contract fixture.
|
||||
|
||||
The bootstrap does not build `indexedDb`: IndexedDB is an opt-in reference
|
||||
runtime (`productionComposition: false` in
|
||||
`config/recipes/frontend-capability-recipes.json`). The composition example is
|
||||
`recipes/frontend-capabilities/indexeddb-feature-capability.ts`
|
||||
(`createLocalDraftIndexedDbCapability`, exercised by
|
||||
`tests/recipes/indexeddb-feature-capability.test.ts`). A product that installs a
|
||||
feature with `needs: ["indexedDb"]` copies it and adds `indexedDb` to the feature
|
||||
capabilities in `src/bootstrap/runtime-adapters.ts`. Until it does, that object
|
||||
fails the app typecheck, and `composeFeatureAdapterInputs()` rejects the
|
||||
composition with `feature <id> needs indexedDb, which the host did not provide`.
|
||||
|
||||
## Presentation consumer surface
|
||||
|
||||
`ApplicationProvider` remains the composition root for presentation, but new
|
||||
|
||||
Reference in New Issue
Block a user