src/features/local-draft-feature는 기능이 아니라 IndexedDB recipe의
소비자다. 시험 5개와 recipe가 쓰고, 그래서 생성기에 NOT_A_FEATURE
예외가 있었다(S4 3.1절 S-3).
코드를 tests/fixtures/indexeddb-consumer/로 옮기고 import만 고쳤다.
NOT_A_FEATURE 표식은 이 폴더만 썼고 다운스트림 둘에도 없어 생성기에서
지웠다. 선언 없는 폴더는 밖으로 옮기라는 메시지로 실패한다. 매뉴얼
오류표, README, starter-experience, capability-consumer-experience,
patterns를 고쳤다.
위험: fixture는 기능 폴더 밖이라 기능 계층 규칙(dependency-cruiser)이
걸리지 않는다. recipe가 tests/ 아래 파일을 type import한다.
검증(desktop): test:contract, test:recipes, test:browser-capabilities,
test:unit 통과.
문제
조립 루트 주석과 생성 뼈대 주석은 "기능은 needs에 적은 capability만 받는다"고
했지만, invokeContribution은 context 전체를 넘겼다. needs: ["telemetry"] 기여가
["telemetry","http"]를 받았다(E6). 제품 capability도 모든 기능에 갔다. 타입이
막고 있어 cast가 있어야 생기지만, 그러면 needs가 실제 의존을 다 말하지 않는다.
고른 방법
invokeContribution이 needs의 키만 골라 새 frozen 객체로 넘긴다. 주석을 "타입만
그렇다"로 고치는 대안은 생성 뼈대 주석(scripts/create-feature.ts)까지 모든
기능에 퍼진 설명을 바꿔야 해서 버렸다. 이제 두 주석이 실행과 맞는다.
위험·한계
needs에 적지 않은 capability를 cast로 쓰던 다운스트림 기능은 그 값이
undefined가 된다. repo 안에는 그런 기능이 없다.
검증
- RED: feature-adapter-composition.test.ts에 E6 행(받은 키가 ["telemetry"])을
더했고 수정 전 실패.
- tests/contract/reusable-capability, tests/features, runtime-adapters 계열,
product-composition-fixture → 27 files / 178 tests 통과.
- check:types, eslint 통과.
Refs: docs/reviews/2026-11-03-maturity-review/09-app-core.md 09-08
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>
composeFeatureAdapterInputs silently let a later contribution with the
same featureId overwrite the earlier one, and wrote an input under
whatever featureId createInput returned. A feature copied from
reference-feature without renaming its id replaced the original's API.
Composition now throws on a duplicate featureId and when
installed.featureId !== contribution.featureId, matching route codecs
and message catalogs.
Verified: two new tests in
tests/contract/reusable-capability/feature-adapter-composition.test.ts
(both RED before: no throw). test:contract passes; all gates pass
except the known tests/unit/removal-fixture.test.ts (artifacts/ absent).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>