조립 루트의 attachCredentials가 operation의 인증 프로필을 보지 않고
세션 상태만 본다. 그래서 auth: "none" operation(ANONYMOUS 프로필)이
로그아웃이면 UNAUTHENTICATED, 로그인이면 세션 헤더가 붙어
CREDENTIAL_HEADER_NOT_ALLOWED로 거절되고, 외부 owner가 없으면
CREDENTIAL_OWNER_UNAVAILABLE로 끝난다. 어느 상태에서도 fetch가 0회다.
scope 확인 바로 다음에 INSTALLED_REST_AUTH_PROFILES에서
operation.authProfileId의 transport를 읽고, ANONYMOUS면 세션을 보지
않고 빈 헤더로 READY를 돌려준다. executor에 넘기는 레지스트리와 같은
값을 같은 객체 안에서 읽는다. 그 밖의 프로필은 기존 경로 그대로다.
버린 대안:
- executor(http-execution-v3.ts)가 ANONYMOUS면 attachCredentials를
부르지 않게 하기. adapter 공개 동작이 바뀐다. 지금 executor는 익명
프로필에도 협력자를 부르고 헤더를 내면 거절하며, 이 동작을 고정한
계약 테스트가 있다. 세션을 아는 쪽은 조립 루트라서 판단도 거기 둔다.
- 리뷰 R1(attachCredentials를 createCredentialAttacher로 꺼내기).
구조 변경이라 이번 범위를 넘는다. 09-02에서 함께 다룬다. 새 테스트가
실제 createRuntimeAdapters를 거치므로 그때도 그대로 쓸 수 있다.
- 새 케이스를 tests/unit/runtime-adapters.test.ts에 넣기. vi.mock은
파일 단위라 설치된 계약 묶음을 바꾸면 그 파일의 기존 테스트에도
번진다. 그래서 runtime-adapters-auth-profile.test.ts를 따로 만들었다.
위험·한계:
- 로그인 상태의 익명 호출에 토큰이 붙지 않고 owner에게도 가지 않는다.
ANONYMOUS 프로필이 자격증명 헤더를 하나도 허용하지 않으니 의도한
결과다. 인증 통합이 실패한 상태에서도 공개 읽기는 나간다.
- scope fence는 익명 분기보다 먼저 본다. 모르는 프로필 id는 executor가
attachCredentials 전에 UNKNOWN_AUTH_PROFILE로 막는다.
- 브라우저 화면은 보지 않았다. test:sample-removal도 돌리지 않았다.
새 테스트는 템플릿 소유 fixture와 src/contracts의 프로필만 쓴다.
- tech-log 제품 쪽 우회는 다음 동기화 때 지운다.
검증:
- RED(수정 전): 새 테스트 11건 중 5건 실패. ANONYMOUS 4개 상태가
expected 'UNAUTHENTICATED' to be 'SUCCESS'(demo 로그아웃),
expected 'AUTH_INTEGRATION_FAILURE' to be 'SUCCESS'(demo 로그인,
외부 owner 로그인, owner 없음)로 실패. owner의 attachCredential이
1회 불림. 인증 필요 프로필의 UNAUTHENTICATED, CREDENTIAL_OWNER_
UNAVAILABLE 2건, fence 중 ABORTED_BY_SCOPE, 로그인 후 bearer 전송,
익명 요청의 SCOPE_FENCED 6건은 수정 전후 모두 통과.
- GREEN: 새 테스트 11/11 통과.
- 회귀: runtime-adapters, http-execution-v3(unit·integration),
auth-recovery, legacy-http-credential-authority, tests/features,
tests/component, 영역 R1 목록 71 files / 485 tests 통과.
- tsc(tsconfig.app.json, tsconfig.test.json) 오류 0. 바꾼 두 파일
eslint 통과. check:architecture(pnpm 대신 exec 대행) 통과,
376 modules.
Refs: docs/reviews/2026-11-01-maturity-review/09-app-core.md 09-01
VD-01 decision 3 hands unused diagnostics to tsc and turns off ESLint's
no-unused-vars for TS files, but tsconfig.base.json never enabled the
tsc check (D-19). The flag found 46 unused imports, types and helpers
across 22 files; none of them were read, so removing them changes no
behaviour.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A misspelt kill-switch key was ignored without a trace, so the feature kept
running. Boot now records feature.override.unknown once per such key, and
release admission lists them as warnings in its record without refusing the
artifact (a shared document may still name another build's features).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With no credential V3 sends nothing and returns UNAUTHENTICATED without a
status, yet it was counted as an API failure, so signed-out states raised
the failure rate. Diagnostics still record it once; telemetry does not.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
API failure telemetry had no build or release identity, so a failure rate
could not be split by release while old and new tabs coexist. The collector
now stamps both on every event of both ports from the release manifest.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
V3 read the response x-correlation-id and dropped it, and untraced requests
sent no id, so a support reference could not be matched to a server log.
Each logical execution now sends one x-correlation-id; failures carry the
echoed value as requestId and diagnostics record it as correlation_id.
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>
An external owner without readSubject made every authenticated
notification (every token refresh) abort requests and clear the
server-state cache. readSubject is now a required owner method and
getSubject a required SessionGateway method.
- ExternalSessionOwner.readSubject(): required; the host owner check
(EXTERNAL_OWNER_METHODS) rejects an owner without it, so the session
fails closed as integration-failed like any other missing method.
- SessionGateway.getSubject(): required. Anonymous and unavailable
adapters return null; demo already returned its fixed user.
- Scope runtime: same (state, subject) still skips the fence; a state
or subject change still fences. An authenticated session with a
null/empty subject still fences (fail closed) and now records
cache.operation.failed {operation: SCOPE_FENCE, reason:
SUBJECT_MISSING} once per fence. Bootstrap passes diagnostics in.
- Docs: starter-experience external owner section and port comments
describe what readSubject returns, the fail-closed diagnostic and a
migration note.
RED before the change (vitest tests/unit/server-state-scope-runtime.test.ts
tests/unit/runtime-adapters.test.ts): 4 failed | 31 passed
- fails closed when the owner lacks readSubject:
expected 'authenticated' to be 'integration-failed'
- fences and reports SUBJECT_MISSING ... null / empty subject, and the
external owner whose readSubject returns null:
expected [] to deeply equal [[{ level: 'warn', ... }]]
- type level: an owner literal without readSubject compiled (tsc exit
0). The new @ts-expect-error pin fails check:types:test with TS2578
if readSubject becomes optional again.
Pins that stayed green: same-subject token refresh keeps the cache,
subject change fences, sign-out fences, owner missing readState is
rejected.
GREEN: check:architecture, check:types:app, check:types:test, lint,
test:unit (2084), test:component (182), test:reference-feature (59),
test:integration (151), verify:documentation, check:diagnostics,
check:ci all pass.
BREAKING: external auth owners must implement readSubject(); code that
implements AuthSessionPort/SessionGateway directly must implement
getSubject().
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>
The application port (best-effort-telemetry) and the feature port
(feature-telemetry pipeline) each posted to TELEMETRY_ENDPOINT on their
own: 20+20 sends per minute, cookies on the application side, no
pagehide flush or dispose abort on the feature side, and no deadline on
any fetch, so a hung collector held activeFlush forever (6.3-10).
New src/adapters/telemetry/telemetry-collector.ts is the one transport:
shared send-rate window (createTelemetrySendRate, now in the platform
pipeline and injectable via `sendRate`), credentials "omit", cache
"no-store", a per-request deadline through the kernel
createAbortableOperation, and one pagehide fan-out. runtime-adapters
builds one collector and passes it to both ports. Body projections are
unchanged and pinned by characterization tests first.
Verified: new tests in tests/unit/telemetry.test.ts (5 RED before
wiring: credentials/cache, hung collector timeout, shared rate,
feature pagehide flush, feature dispose abort); all gates pass except
the known tests/unit/removal-fixture.test.ts (artifacts/ absent);
check:adapter-inventory 137/137; FE-RB-004 drill PASS.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The V2 client only attempted 401 session recovery while the physical
attempt count was under maxRetryAttempts + 1. With MAX_RETRY_ATTEMPTS=0,
or when a 503 retry had already used the budget, a recoverable 401 went
straight to onUnauthenticated() and logged the user out. Recovery is
already bounded to one replay by recoveryUsed and by the deadline, so
the budget check is removed.
The comments in runtime-adapters.ts and adapters/http/index.ts said V2
works as a rollback path for V3 once its four slots are injected. That
is wrong: V2 validates the {success,data,meta} envelope and V3 the bare
DTO, so the same backend fails every V2 response with
ENVELOPE_MISMATCH. The comments and the client.ts ledger row in
docs/reviews/adapters/01-network-and-state.md now say a rollback also
needs a V2-envelope server. No docs/architecture page made the claim.
V2 code is kept.
Verified: two new auth-recovery cases (retries disabled; 503 then 401)
failed RED with ok:false and now recover. All lane gates pass except
the known removal-fixture test; verify:documentation passes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
createBrowserCrossContextInvalidationFromHost returned undefined without any
diagnostic when the cache epoch was invalid or secure random was missing, and
bootstrap built the epoch as `release.${releaseId}`, so any release ID with
`+`, `/`, `@` or over the length limit silently turned cross-tab
invalidation off.
- The host factory now reports OPEN/FAILED/NONE with the new reasons
INVALID_CACHE_EPOCH or SECURE_RANDOM_UNAVAILABLE before returning
undefined (the zero-topic build still probes nothing and reports nothing).
- New crossContextCacheEpochForRelease() derives `release.<fnv1a-64 hex>`
from the release ID; bootstrap uses it (one call-site change in
src/bootstrap/runtime-adapters.ts).
- The observation reason union gains two members (additive); the ops runbook
lists them.
Verified: two new unit tests failed before (no observation; missing epoch
helper) and pass now. Lane gates, reference-feature and V3 integration tests,
and check:diagnostics pass.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
V3 returned the same UNAUTHENTICATED outcome for "no credential, nothing
sent" and for a server 401, and the composition root called
onUnauthenticated() for both. With the demo owner that overwrote a
recovery-pending session with "unauthenticated", and the demo setState
notified even when the value did not change, which fed the scope-fence loop.
- V3: the server-401 UNAUTHENTICATED outcome now carries its response
`metadata` (additive optional field). The pre-dispatch one does not.
- runtime-adapters: onUnauthenticated() only when metadata is present.
- demo session: setState is a no-op for the current value.
RED before fix: reference-runtime-composition.test.ts "does not report a
request refused before dispatch as a sign-out" (state became
"unauthenticated"), auth-session-adapter.test.ts "does not notify when the
demo state is set to its current value" (1 notification),
http-execution-v3.test.ts "tells a missing credential apart from a server
401" (no metadata). Pinned: "still signs out when the server answers 401".
Gates: check:architecture, check:types:app, check:types:test, lint,
test:component, test:integration, test:reference-feature, test:contract
pass. test:unit passes except removal-fixture.test.ts (needs generated
artifacts/ release evidence absent in a fresh worktree; unrelated).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>