문제
참조 기능의 생성 분류기가 모든 409를 NOT_APPLIED로 판정한다
(reference-feature-contract-contribution.ts:42-44). 결과 불명 쓰기를 같은
멱등 키로 다시 보냈을 때 첫 요청이 아직 처리 중이면 짝 백엔드 템플릿은
409 IDEMPOTENT_IN_FLIGHT를 준다. 그러면 코디네이터가 intent를 정리하고
conflict를 세우고(application-query.ts:584-589), 폼은 결과 불명 기록을
지운다(use-app-form.ts:227-230). 화면이 "충돌"로 바뀌고 저장 버튼이 다시
열려 다음 저장이 새 키로 나간다. 첫 요청이 끝나면 같은 리소스가 두 번
생긴다(키 [K, K, K']).
고른 방법
분류기가 409를 problem code로 나눈다. fixture가 선언한 충돌 code
(CREATE_NOT_APPLIED_CONFLICT_CODES, 지금은 MSW fixture가 내는 "CONFLICT"
하나)만 NOT_APPLIED다. IDEMPOTENT_IN_FLIGHT, code 없는 409, 모르는 code의
409는 MAYBE_APPLIED다. 결과 불명이 유지되므로 코디네이터가 intent를 들고
있고 다음 전송이 같은 키를 쓴다. 400·422 판정은 바꾸지 않았다.
시나리오 카탈로그에 in-flight-409를 더해 "처리 중 409 -> 결과 불명"과
"충돌 409 -> 적용 안 됨"(기존 conflict-409)을 둘 다 고정했다.
버린 대안
- IDEMPOTENT_IN_FLIGHT 하나만 MAYBE_APPLIED로 빼기: 모르는 409가 계속
NOT_APPLIED다. 백엔드가 처리 중 code를 바꾸거나 다른 백엔드를 붙이면
같은 결함이 조용히 돌아온다. "모르는 409는 안전한 쪽" 결정과 어긋난다.
- 플랫폼 방어(같은 intent의 재전송이 NOT_APPLIED를 받아도
APPLIED_CONFIRMED 전까지 키 결합을 유지, 리뷰 03 5절 A의 (b)): 분류기가
틀려도 막지만 application-query의 admission 수명 규칙을 바꾸는 구조
변경이다. 이번 범위를 넘어 뺐다.
- 계약 문서의 409 IDEMPOTENCY_KEY_REUSED(같은 키·다른 지문)를 NOT_APPLIED
목록에 넣기: 프론트는 canonical 입력이 같을 때만 같은 키를 쓴다. 이
응답은 서버와 클라이언트의 지문 기준이 어긋났다는 뜻이고 같은 키의 앞선
요청은 적용됐을 수 있다. NOT_APPLIED로 풀면 다음 저장이 새 키로 중복을
만든다. 그래서 모르는 409와 같이 MAYBE_APPLIED로 둔다.
위험·한계
- 백엔드 계약(이 repo에서 끝낼 수 없음): backend-api-and-server-state-
contract.md §6은 같은 키 동시 재전송을 "bounded IN_PROGRESS 결과"라고만
적고 status·code를 정하지 않는다(:299-300). 409 + IDEMPOTENT_IN_FLIGHT로
고정하고, 진짜 충돌을 뜻하는 409 code 목록을 계약에 적어야 한다. 짝
백엔드 템플릿(01a8a2a, 읽기만 함)은 OperationalError.IDEMPOTENT_IN_FLIGHT
(CONFLICT, 409, retryable=false)를 쓴다. 승인자: 템플릿 소유자, 백엔드
템플릿 소유자.
- problem 형태: 짝 백엔드 web 어댑터는 실패를 problem+json이 아니라
Envelope {success:false, error:{code,...}}로 보낸다(ErrorResponseFactory).
참조 fixture는 최상위 code가 있는 problem 형태다. 그 Envelope가 오면
referenceProblemSchema 검증이 실패해 MAYBE_APPLIED가 되므로 안전 쪽이지만
code 분류는 닿지 않는다. 제품 계약 패키지가 code 위치를 정해야 한다.
- 화면 종류는 여전히 mapProblem이 409 전부를 CONFLICT로 만든다
(reference-http-gateway.ts:38). 폼이 effect를 먼저 보므로 결과 불명이
이기지만, 효과와 화면 종류가 두 함수에 나뉜 문제(03-04)는 그대로다.
"처리 중" 전용 문구는 없고 일반 결과 불명 문구를 보인다.
- 다운스트림 tech-log 분류기는 4xx 전체를 NOT_APPLIED로 쓴다(지난 라운드
확인). 동기화 때 같은 수정이 필요하다.
- 카탈로그 실행 수가 54 -> 57이 된다. 문서 세 곳의 "19개"와
run-http-scenario-evidence.ts 출력 문구를 맞췄다.
- 초기 JS gzip +37 B(203,507 -> 203,544, 예산 204,800). 같은 build-frontend로
두 번 빌드해 gzipSync로 쟀다. 예산은 바꾸지 않았다.
검증
- RED(수정 전): reference-production-vertical "keeps the key when the
resend meets the first attempt still in flight" 실패, 키 [K, K, K'].
분류 단위 테스트 3건 "expected 'NOT_APPLIED' to be 'MAYBE_APPLIED'"
(IDEMPOTENT_IN_FLIGHT, 모르는 code, code 없음).
카탈로그 CREATE_REFERENCE_RESOURCE::in-flight-409 불일치.
- GREEN: 같은 세 파일 23/23 통과.
- 회귀: run-vitest tests/features tests/component tests/contract
tests/integration tests/unit(pnpm을 띄우는 security-followup-archive
제외) 233 files / 2817 tests 통과. tests/runtime-schema 56 통과.
tsc app/test/node rc=0. 바꾼 파일 eslint rc=0. check-adapter-inventory
PASS. verify-documentation-readiness PASS_SCOPED.
- 미실행: check:architecture(pnpm 필요). depcruise 직접 실행은 TS 7을
읽지 못해 0 modules라 사실상 미검증. src 변경은 import를 더하지 않는다.
check:ci 미실행.
Refs: docs/reviews/2026-11-01-maturity-review/03-adapters-http-state.md
The detail path /examples/reference-resources/:resourceId lost to the static
new and status routes, so an item with one of those ids opened the wrong
screen. The breaking route change carries registry evidence.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
zod probed Function("") on its first object schema, which the production CSP
(no unsafe-eval) reported on every boot. Schema code now imports z from
src/contracts/zod.ts, enforced by a dependency-cruiser rule, and the CSP smoke
drops its init-script workaround.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The count status said "checking results" next to a failure alert, and the
sample judged the state from `data` instead of `state.base`.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reference feature and home page rendered Korean literals, so en-US
still showed Korean. check:i18n now scans pages and every feature
presentation folder, and its fixture fails unless every fixture is rejected.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Revisions restart at 1 after a delete, so a reused draft id lets a stale tab
overwrite a new draft. The sample now states the fresh-id premise the port's
revision contract requires, and when tombstones are needed instead.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A feature directory without feature-module.ts vanished silently, registry
consumers listed only the sample's directories, and the removal gate only knew
the sample. The generator now fails unless a NOT_INSTALLED marker says so
(D-10), consumer directories are globs over every feature, and the removal
script takes --feature=<id>. starter-experience.md documents the current
ownership declarations and the files a new feature touches.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
createLocalDraft was never called, so blank titles and oversized bodies were
stored. saveDraft now builds the draft through it and returns
VALIDATION_REJECTED without touching the store.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The problem mapping had only kind and code and the reference problem schema
dropped everything else, so a server field error reached the form as a
generic message. Mappings may now return validationIssues and the reference
schema keeps a bounded issues list (path and code only).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The bundle applied the selection at runtime while Node build scripts and the
context router ignored it, and a typo only failed in the browser. The generator
now imports only the selected features and rejects unknown ids (D-9); declared
ids stay in the index for NOT_INSTALLED reporting. Default build modules are
unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The fixture relied on reference-feature and its context, so sample removal
failed on it. It now installs two synthetic features in its own context, and
the invalidation flatMaps get the same explicit element types as the other
composers (frozen empty arrays exposed the same union inference failure).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every non-input save failure became "unavailable" under the "review the entered
information" summary, with no sign-in button. useAppForm now reports
reauth-required, forbidden and retry-later with the failure, and
FormFailureStatus shows each one's copy and action outside ErrorSummary.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The two local-draft adapters imported the IndexedDB port that the browser
file/storage removal deletes, so that removal gate failed. The feature now
declares the repository slice it calls and receives it through the indexedDb
capability; the runtime satisfies it structurally.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
These statuses skipped the package classifier and always became
MAYBE_APPLIED, so an expired session ended in "contact support" or the
unknown-result screen. The descriptor gains optional classifyStatus, the
reference create declares NOT_APPLIED, and AUTH_REQUIRED keeps reauth.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
flatMap over the installed-module union, the route-registry cast and the
non-distributive locale types all failed once a second feature was installed.
A unit test installs a differently shaped second feature into a copy of src
and runs the app typecheck.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A save whose response was lost minted a new key on the next submit, and the
screen let the user declare "not applied" without evidence. The same canonical
input now reuses the unknown admission's intent; the screen offers "send the
same request again" and a list refresh link instead.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Delete src/features/reference-feature/presentation/reference-feature-runtime.tsx:
it only re-exported the same-named .ts and nothing imported it by the
.tsx path.
- Move promotion-readiness.ts and performance-budgets.ts from
src/application/policies to scripts/lib: only scripts and their unit
tests import them. Imports updated in 5 scripts and 2 tests.
config/testing/risk-coverage.json lists only src modules, so their two
criticalModules/highRiskPaths entries are removed; the synthetic
14-file summary fixture now names two other existing src modules.
- installed-feature-messages.ts composes one catalog per locale the
installed features declare (composeInstalledMessageCatalogs) instead
of a fixed ko-KR/en-US list that silently dropped other catalogs. The
exported type still maps each declared locale to its exact key set.
Verified: tests/unit/installed-feature-messages.test.ts (ko-KR/en-US
content pinned first; derived-locale and duplicate-key cases RED before);
app typecheck also passes with a zero-feature generated index; all gates
PASS; check:ci PASS; check-bundle resolves the moved module (stops later
on the absent artifacts/performance/bundle.json).
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>
createRuntimeAdapters computed activeFeatureIds and then composed feature
inputs for every installed feature, so a feature disabled by the kill
switch still got its API from application.features.get(); only the
router honoured the switch. createInstalledFeatureInputs now takes the
active ids (optional; the default stays "every installed feature" for
callers without runtime config) and the runtime passes them.
Verified: tests/unit/runtime-adapters.test.ts — disabled feature has no
features.has/get (RED before: has() was true); every installed feature
still resolves when nothing is switched off. All gates pass except the
known tests/unit/removal-fixture.test.ts (artifacts/ absent).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
D-15. `RuntimeValidator` and `MappingResult` in
external-contract-runtime.ts are the canonical validator protocol and
mapping result. The other shapes stay as public names over them:
- schema-registry.ts: `RuntimeSchemaCodec` is documented as the
registry adapter and gains `runtimeSchemaCodecFromValidator`.
- boundary-mapper.ts: the flat `{ ok: false, code }` result is named
`BoundaryMappingResult`; `MappingResult` stays as an alias, and
`toContractMappingResult` converts to the canonical shape.
The reference feature wrapped each zod schema twice (a RuntimeValidator
in the contract contribution and a separate `project`/`codec` in
reference-schemas.ts). It now has one `zodValidator`; the registry
codecs are a one-liner over it, and validateReferencePayload/Request
look up the codec with Object.hasOwn.
Verified: characterization test
tests/features/reference-feature/reference-validator-protocol.test.ts
passed before and after (array paths, dotted paths, codec ids,
SCHEMA_NOT_REGISTERED); adapter case added to boundary-mapper.test.ts;
gates green except the known removal-fixture test.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>