From c80320dfc72064e2e07db079fec8d10524f6b853 Mon Sep 17 00:00:00 2001 From: DongHyeonka Date: Tue, 29 Sep 2026 15:41:38 +0900 Subject: [PATCH] chore: sync the frontend template from ebea300 to af3d8e6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Carries 359 template commits, tag v0.2.0 plus one documentation commit: the generator-built feature index with its app, bounded-context and feature declarations, the src/platform kernel and scale tooling, the 2026-09-24 src review fixes, and the 2026-09-25 maturity review round with its CHANGELOG [보안]/[계약] rows. 691 of the 824 template paths are applied, 85 of them merged with product changes; 127 are not carried. Product identity is unchanged: name, version 0.1.0, routes, design and the TechLog domain. Three decisions worth naming. TechLog stays composed directly, as the last two syncs recorded; its directory carries a NOT_INSTALLED marker that says so, and every installed-* composer takes the template's projection with TechLog added on top. The reference sample is no longer installed: the template now installs a feature only through feature-module.ts and context-routes.ts, which load the screens this product deleted, so its three operations, six schemas and one topic leave the registries, recorded as registry change evidence. And AppRouter mounts the platform and TechLog routes only; the template's bounded-context route gateway waits for a generator-installed feature. Required fixes: readSubject on the BFF session owner (without it every HTTP Studio session would close as integration-failed), zod through the facade in nine TechLog files, noUnusedLocals, and public/config.json written out to match the local profile. Derived baselines were recomputed after reproducing both sides' values: CI contract 101 commands / 106 references / 141 artifacts, gate shape c9adcf85; registry approval 2dc6c3a3; the runtime config schema baseline equals the schema at 8210d48. Verified here: types, lint, architecture, adapter inventory, CI contract, i18n, design system, diagnostics, browser security, dev release manifest, TechLog contract and build pass; 220 component, 155 integration, 15 contract, 418 TechLog, 43 reference-feature, 18 recipe and 46 release-coherence tests pass, and 2381 of 2383 unit tests. Reproduced at 8210d48 first and unchanged: check:registries (byte-identical), test:runtime-schema, verify:documentation. Brought by the template and escalated rather than suppressed: check:request-fanout on TechLog's cursor pagination, check:remediation-ledger (fails upstream too), the shared-chunk hash test, and the registry-dependent sample removal and second-feature tests. Playwright suites were not run. Full record, the five open questions and the follow-ups in docs/operations/template-sync-2026-09-29.md. (cherry picked from commit b2170cf265dea45dc9cc05d3c61e627e97f31cdb) --- .dependency-cruiser.json | 169 +- .env.example | 2 +- .gitea/workflows/quality-gates.yml | 20 +- .gitignore | 3 + .npmrc | 4 +- README.md | 187 ++- config/architecture/layers.json | 38 - config/ci/contract-baseline.json | 11 + config/ci/gates.json | 235 ++- config/ci/ungated-scripts.json | 77 + config/ci/ungated-tests.json | 29 + config/compatibility/fixtures.json | 110 +- .../runtime-config.schema.baseline.json | 158 ++ .../contracts/registry-baseline.approval.json | 6 +- config/contracts/registry-baseline.json | 516 +----- .../contracts/registry-change-evidence.json | 420 +++-- config/contracts/registry-governance.json | 204 ++- config/hosting/cache-policy.json | 3 - .../recipes/frontend-capability-recipes.json | 8 +- config/runtime/development.json | 4 +- config/runtime/local.json | 4 +- config/runtime/production.json | 4 +- config/runtime/staging.json | 4 +- config/scale/benchmark-baseline.json | 135 ++ config/scale/feature-shape-ceilings.json | 41 + config/scale/feature-shape-growth.json | 210 +++ .../schemas/runbook-drill-record.schema.json | 28 +- config/testing/risk-coverage.json | 57 +- docs/README.md | 71 + docs/accessibility/manual-checklist.md | 6 + ...igned-implementation-closed-deep-design.md | 7 +- .../backend-api-and-server-state-contract.md | 19 +- .../browser-file-and-origin-storage.md | 34 +- .../capability-consumer-experience.md | 55 +- docs/architecture/client-cache-and-storage.md | 33 +- .../VD-01-typescript-lint-tooling.md | 5 +- .../decisions/VD-04-native-form-facade.md | 13 +- .../decisions/VD-05-icon-and-headless-ui.md | 15 +- .../VD-06-intl-typed-message-catalog.md | 12 +- ...D-07-diagnostics-and-telemetry-exporter.md | 13 +- ...ime-events-web-push-and-bounded-polling.md | 15 +- .../frontend-application-foundation.md | 11 + .../frontend-platform-capability-review.md | 2 +- docs/architecture/layers.md | 53 +- docs/architecture/optional-adapter-recipes.md | 33 + docs/architecture/overview.md | 5 +- .../presigned-transfer-and-image-cdn.md | 119 +- ...ime-events-web-push-and-bounded-polling.md | 146 +- .../routing-pages-and-patterns.md | 22 +- docs/architecture/starter-experience.md | 128 +- docs/architecture/static-delivery.md | 5 + .../typescript-state-and-data-flow.md | 6 +- docs/contracts/compatibility.md | 57 +- .../api-contract-and-server-state-recovery.md | 101 +- .../browser-file-storage-recovery.md | 122 +- docs/operations/ci-quality-gates.md | 126 +- .../client-cache-and-storage-recovery.md | 14 +- docs/operations/performance-evidence.md | 54 + docs/operations/release-cache-rollback.md | 91 +- docs/operations/template-sync-2026-09-29.md | 537 ++++++ docs/reviews/adapters/01-network-and-state.md | 11 +- .../adapters/02-realtime-and-browser-rpc.md | 33 +- .../adapters/03-storage-and-browser-files.md | 8 +- docs/reviews/adapters/04-browser-transfer.md | 5 +- .../05-service-worker-and-web-push.md | 1 + docs/reviews/adapters/INVENTORY.md | 260 +-- docs/runbooks/FE-RB-005.md | 5 + docs/security/browser-boundary.md | 17 +- docs/security/supply-chain.md | 69 + docs/styling/design-system-platform.md | 8 +- .../frontend-platform-testing-strategy.md | 56 +- docs/testing/taxonomy.md | 44 +- eslint.config.ts | 164 +- index.html | 13 +- package.json | 139 +- playwright.config.ts | 1 + playwright.storybook.config.ts | 1 + playwright.visual.config.ts | 1 + pnpm-workspace.yaml | 10 + public/config.json | 6 +- .../indexeddb-feature-capability.ts | 137 ++ scripts/build-frontend.ts | 30 +- scripts/check-adapter-inventory.ts | 13 +- scripts/check-app-build-input.ts | 143 ++ scripts/check-architecture.ts | 222 ++- scripts/check-bundle.ts | 2 +- scripts/check-ci-contract.ts | 72 +- scripts/check-compatibility.ts | 81 +- scripts/check-design-system.ts | 24 +- scripts/check-diagnostics.ts | 28 +- scripts/check-i18n.ts | 63 +- scripts/check-realtime-boundary-fixtures.ts | 1 - scripts/check-registries.ts | 27 +- scripts/check-release-admission.ts | 26 + scripts/check-remediation-ledger.ts | 2 +- scripts/check-request-fanout.ts | 185 +++ .../check-supply-chain-provider-fixtures.ts | 48 +- scripts/check-test-evidence.ts | 27 +- scripts/collect-web-vitals-evidence.ts | 2 +- scripts/contracts/ci-gates.ts | 308 ++-- scripts/contracts/release-artifacts.ts | 144 +- scripts/drill-runbook.ts | 434 ++--- scripts/generate-ci-workflow.ts | 56 +- scripts/generate-nginx-config.ts | 5 - scripts/generate-product-feature-index.ts | 427 +++++ scripts/generate-runtime-config.ts | 23 +- scripts/generate-service-worker-assets.ts | 3 +- scripts/generate-supply-chain.ts | 4 - scripts/lib/architecture-violation-message.ts | 17 + scripts/lib/ci-candidate-archive.ts | 1 - scripts/lib/classify-vite-bundle.ts | 10 +- scripts/lib/dist-permissions.ts | 18 + scripts/lib/exact-promotion-bundle.ts | 32 +- scripts/lib/fixture-node-modules.ts | 53 +- scripts/lib/hosting-probe.ts | 57 + scripts/lib/lab-performance.ts | 89 + scripts/lib/manual-a11y-evidence.ts | 64 +- scripts/lib/package-script-graph.ts | 31 + .../lib}/performance-budgets.ts | 0 .../lib}/promotion-readiness.ts | 9 +- scripts/lib/realtime-boundaries.ts | 16 +- scripts/lib/removal-fixture.ts | 96 +- .../lib/self-unregistering-service-worker.ts | 17 + scripts/lib/service-worker-build-input.ts | 12 +- scripts/lib/ungated-scripts.ts | 76 + scripts/lib/ungated-tests.ts | 108 ++ scripts/lib/vite-module-inventory.ts | 50 +- scripts/run-vitest.ts | 12 + scripts/scale/benchmark-result.ts | 69 + scripts/scale/benchmark.ts | 64 + scripts/scale/browser-soak.ts | 554 +++++++ scripts/scale/check-scale-baseline.ts | 113 ++ scripts/scale/collect-tsc-diagnostics.ts | 208 +++ scripts/scale/composition-workloads.ts | 108 ++ scripts/scale/measure-feature-shape-growth.ts | 259 +++ scripts/scale/memory-slope.ts | 66 + scripts/scale/run-composition-scale.ts | 136 ++ scripts/scale/run-scale-profile.ts | 195 +++ scripts/scale/scale-baseline.ts | 381 +++++ ...st-browser-file-storage-runtime-removal.ts | 212 ++- scripts/test-optional-recipe-removal.ts | 146 +- scripts/test-performance.ts | 217 ++- scripts/test-realtime-runtime-removal.ts | 186 ++- scripts/test-sample-removal.ts | 542 +++---- scripts/update-ci-contract-baseline.ts | 52 + scripts/verify-a11y-manual.ts | 22 + scripts/verify-documentation-readiness.ts | 21 + scripts/verify-exact-promotion-bundle.ts | 6 +- scripts/verify-extreme-scale.ts | 332 ++++ scripts/verify-hosting-headers.ts | 75 +- scripts/verify-release.ts | 1 - src/adapters/auth/external-session-adapter.ts | 18 + src/adapters/browser-file-storage/result.ts | 81 + .../storage-manager-adapter.ts | 49 +- .../browser-files/browser-file-picker.ts | 212 +-- .../browser-file-policy-registry.ts | 30 +- .../browser-files/browser-file-vault.ts | 88 +- .../create-browser-file-runtime.ts | 5 +- .../download-delivery-adapter.ts | 621 ++----- .../download-input-validation.ts | 367 +++++ src/adapters/browser-files/file-observer.ts | 21 +- src/adapters/browser-files/file-policy.ts | 52 +- .../browser-files/object-url-lease.ts | 62 +- .../browser-rpc/browser-rpc-runtime.ts | 134 +- .../browser-transfer/image-cdn/README.md | 5 +- .../image-cdn/browser-image-probe.ts | 172 +- .../image-cdn/image-cdn-policy.ts | 26 +- .../image-cdn/image-cdn-runtime.ts | 320 ++-- .../image-cdn/image-header-metadata.ts | 69 +- .../p256-image-capability-verifier.ts | 12 +- .../browser-transfer/presigned/http-common.ts | 257 +++ .../presigned/incremental-sha256.ts | 49 +- .../presigned-capability-http-provider.ts | 289 +--- .../presigned/presigned-capability-vault.ts | 16 +- .../presigned/presigned-transfer-executor.ts | 394 ++--- .../resumable-upload/checkpoint-schema.ts | 38 +- .../resumable-upload/fetch-json-transport.ts | 198 +-- .../http-control-plane-adapter.ts | 12 +- .../indexeddb-checkpoint-store.ts | 205 ++- .../presigned-upload-part-executor.ts | 4 +- .../resumable-upload-runtime.ts | 1117 ++++--------- .../resumable-upload/runtime-dependencies.ts | 378 +++++ .../resumable-upload/runtime-policy.ts | 39 +- .../resumable-upload/upload-byte-source.ts | 7 +- .../upload-response-validation.ts | 307 ++++ .../cache-storage/public-cache-codec.ts | 656 ++++++++ .../cache-storage/public-cache-policy.ts | 3 + .../public-cache-response-validation.ts | 239 +++ .../public-response-cache-adapter.ts | 994 ++---------- .../browser-cross-context-host.ts | 41 +- .../browser-cross-context-invalidation.ts | 42 +- .../cross-context-invalidation/index.ts | 1 + src/adapters/http/client.ts | 82 +- src/adapters/http/feature-http-binding.ts | 97 +- src/adapters/http/http-contract-bridge.ts | 33 +- src/adapters/http/http-effect-certainty.ts | 22 + src/adapters/http/http-execution-v3.ts | 388 +++-- src/adapters/http/http-retry-lifecycle.ts | 25 +- src/adapters/http/index.ts | 6 +- src/adapters/http/platform-error-mapping.ts | 45 + src/adapters/http/request-builder.ts | 3 + src/adapters/http/retry-policy.ts | 18 +- src/adapters/http/schema-registry.ts | 8 +- src/adapters/platform/abortable-operation.ts | 46 + src/adapters/platform/indexeddb-connection.ts | 20 +- .../platform/indexeddb-transaction.ts | 7 +- .../json-member-scanner.ts | 0 src/adapters/platform/retry-after.ts | 38 + .../conditional-validator-store.ts | 11 +- .../query-cache/cursor-pagination-runtime.ts | 12 +- .../query-cache/server-state-scope-runtime.ts | 65 +- .../query-cache/tanstack-cache-coordinator.ts | 17 +- src/adapters/realtime/event-codec.ts | 72 +- src/adapters/realtime/event-consumer.ts | 18 +- src/adapters/realtime/index.ts | 1 + .../realtime/live-poll-handoff-coordinator.ts | 138 +- .../polling/bounded-poll-coordinator.ts | 251 +-- src/adapters/realtime/polling/index.ts | 1 + .../realtime/reconnect-coordinator.ts | 491 +++--- src/adapters/realtime/reconnect-policy.ts | 47 +- src/adapters/realtime/result.ts | 130 +- .../realtime/sse/fetch-sse-connection.ts | 234 ++- src/adapters/realtime/sse/index.ts | 1 + src/adapters/realtime/sse/sse-parser.ts | 235 ++- src/adapters/realtime/stream-coordinator.ts | 185 +-- .../websocket/websocket-connection.ts | 284 +--- .../realtime/websocket/websocket-protocol.ts | 12 +- .../service-worker/service-worker-entry.ts | 32 +- .../service-worker-lifecycle.ts | 230 ++- .../service-worker-page-controller.ts | 190 ++- .../service-worker/service-worker-protocol.ts | 2 + .../service-worker-static-assets.ts | 95 +- src/adapters/storage/index.ts | 8 +- .../storage/indexeddb/indexeddb-failure.ts | 72 - .../storage/indexeddb/indexeddb-governance.ts | 181 +-- .../indexeddb/indexeddb-maintenance.ts | 260 +-- .../storage/indexeddb/indexeddb-records.ts | 188 +++ .../storage/indexeddb/indexeddb-runtime.ts | 509 +++--- .../storage/opfs/indexeddb-opfs-journal.ts | 158 +- .../storage/opfs/opfs-byte-store-adapter.ts | 719 +++++---- src/adapters/storage/opfs/opfs-policy.ts | 71 +- .../storage/opfs/opfs-prepared-object.ts | 163 ++ .../storage/opfs/opfs-worker-client.ts | 83 +- .../storage/opfs/opfs-worker-protocol.ts | 30 + .../storage/opfs/opfs-worker-runtime.ts | 320 ++-- .../telemetry/best-effort-telemetry.ts | 86 +- src/adapters/telemetry/feature-telemetry.ts | 115 ++ src/adapters/telemetry/index.ts | 11 + src/adapters/telemetry/telemetry-collector.ts | 178 ++ src/adapters/web-push/codec-primitives.ts | 101 ++ .../inbound/notification-click-adapter.ts | 175 +- .../web-push/push-association-fence-store.ts | 55 +- src/adapters/web-push/push-codec.ts | 128 +- .../web-push/push-registration-gateway.ts | 61 +- .../web-push/push-subscription-adapter.ts | 340 ++-- .../web-push/service-worker-runtime.ts | 14 +- .../web-push/service-worker-scope-host.ts | 2 + src/application/create-application.ts | 14 + src/application/ports/auth-session-port.ts | 12 + .../browser-file-storage/indexeddb-port.ts | 22 + .../ports/browser-file-storage/opfs-ports.ts | 47 +- .../ports/browser-file-storage/shared.ts | 40 +- .../ports/browser-transfer/image-cdn.ts | 8 + .../browser-transfer/resumable-upload.ts | 46 + src/application/ports/in/application-api.ts | 5 + src/application/ports/out/web-push-control.ts | 15 + .../ports/realtime/event-authority.ts | 6 + .../use-cases/decide-chunk-recovery.ts | 33 +- src/application/view-models/async-state.ts | 8 +- src/apps/deployable-app-module.ts | 34 + src/apps/template-app.ts | 14 + src/apps/template-app/app-module.ts | 7 + src/bootstrap/boot-release-recovery.ts | 88 + src/bootstrap/boot.tsx | 62 + src/bootstrap/create-runtime-composition.ts | 11 +- src/bootstrap/load-release-manifest.ts | 77 +- src/bootstrap/load-runtime-config.ts | 42 +- src/bootstrap/main.tsx | 54 +- src/bootstrap/optional-runtime-host.ts | 10 + src/bootstrap/register-service-worker.ts | 1 + src/bootstrap/render-boot-failure.tsx | 43 + src/bootstrap/runtime-adapters.ts | 92 +- src/bootstrap/runtime-application.tsx | 49 +- src/bootstrap/runtime-config-schema.ts | 11 +- src/contexts/bounded-context-module.ts | 45 + .../reference-context/context-module.ts | 10 + src/contracts/api-operations.ts | 11 +- src/contracts/boundary-mapper.ts | 36 +- src/contracts/browser-rpc.ts | 90 +- src/contracts/cache-invalidation.ts | 25 +- src/contracts/compatibility.ts | 63 +- src/contracts/contract-set.ts | 17 +- src/contracts/deployment-admission.ts | 49 +- src/contracts/diagnostics.ts | 91 +- src/contracts/env.ts | 47 +- src/contracts/errors.ts | 262 +-- src/contracts/exact-snapshot.ts | 166 +- src/contracts/external-contract-runtime.ts | 162 +- src/contracts/mutation-intent.ts | 25 +- src/contracts/offline-command.ts | 46 +- src/contracts/operation-id.ts | 11 + src/contracts/product-features.ts | 36 +- src/contracts/query-invalidation.ts | 9 +- src/contracts/query-keys.ts | 12 +- src/contracts/read-only-registry.ts | 72 +- src/contracts/realtime-streams.ts | 172 +- src/contracts/release-artifacts.ts | 32 +- src/contracts/release-tokens.ts | 14 +- src/contracts/rest-profiles.ts | 79 +- src/contracts/runtime-capabilities.ts | 91 +- src/contracts/schema-registry.ts | 40 +- .../service-worker-static-manifest.ts | 20 +- src/contracts/service-worker.ts | 29 + src/contracts/storage-keys.ts | 34 +- src/contracts/telemetry.ts | 15 +- src/contracts/validation-issues.ts | 56 + src/contracts/web-worker.ts | 58 +- src/contracts/zod.ts | 15 + src/features/feature-adapter-contribution.ts | 32 + src/features/feature-module.ts | 86 + .../installed-contract-contributions.ts | 32 +- src/features/installed-feature-adapters.ts | 58 +- src/features/installed-feature-contracts.ts | 124 +- src/features/installed-feature-messages.ts | 88 +- src/features/installed-feature-runtimes.tsx | 70 +- src/features/installed-product-manifest.ts | 76 +- .../local-draft-feature/NOT_INSTALLED | 6 + .../create-local-draft-feature-input.ts | 13 +- .../adapters/local-draft-indexeddb-store.ts | 48 +- .../application/local-draft-api.ts | 19 +- .../local-draft-feature/domain/local-draft.ts | 10 + src/features/reference-feature/NOT_INSTALLED | 9 + src/features/reference-feature/README.md | 3 +- .../create-reference-feature-input.ts | 9 +- .../adapters/reference-http-gateway.ts | 1 + .../application/reference-error.ts | 71 + .../application/reference-feature-api.ts | 70 +- ...reference-feature-contract-contribution.ts | 60 +- .../contracts/reference-feature-contract.ts | 3 +- .../contracts/reference-message-catalog.ts | 70 + .../contracts/reference-schemas.ts | 97 +- src/features/tech-log/NOT_INSTALLED | 11 + .../adapters/http/bff-session-owner.ts | 14 + .../adapters/http/http-management-gateway.ts | 5 - .../http/http-studio-asset-gateway.ts | 1 - .../tech-log-studio-contract-contribution.ts | 2 +- .../components/public-document-header.tsx | 3 - .../public/pages/profile-page.tsx | 2 - .../studio/components/case-fields.tsx | 2 +- .../components/catalog-property-picker.tsx | 1 - .../studio/components/concept-fields.tsx | 2 +- .../studio/components/document-list.tsx | 1 - .../studio/components/home-focus-editor.tsx | 2 +- .../studio/components/new-document-form.tsx | 2 +- .../studio/components/project-editor.tsx | 1 - .../studio/components/release-editor.tsx | 2 +- .../studio/components/release-manager.tsx | 2 +- .../studio/components/setup-fields.tsx | 2 +- .../use-project-editor-controller.ts | 2 +- .../controllers/use-taxonomy-controller.ts | 2 +- .../use-topic-editor-controller.ts | 2 +- .../studio/studio-management-server-state.ts | 3 - .../studio/studio-server-state-support.ts | 1 - .../studio/studio-workspace-server-state.ts | 1 - .../presentation/tech-log-route-codecs.ts | 2 +- .../cardinality/cardinality-budget.ts | 29 + .../cardinality/compose-unique-record.ts | 23 + src/platform/cardinality/growth-regression.ts | 87 + src/platform/cardinality/topology-capacity.ts | 71 + src/platform/errors/app-error.ts | 83 + .../errors/context-error-boundary.tsx | 33 + .../errors/feature-error-boundary.tsx | 32 + src/platform/errors/platform-errors.ts | 90 ++ src/platform/errors/scoped-error-boundary.tsx | 63 + src/platform/execution/execution-context.ts | 144 ++ src/platform/release/release-coherence.ts | 104 ++ .../release/release-mismatch-recovery.ts | 127 ++ src/platform/resilience/deadline.ts | 28 + src/platform/resilience/retry-budget.ts | 34 + src/platform/routing/context-route-module.ts | 54 + src/platform/telemetry/redact-telemetry.ts | 190 +++ src/platform/telemetry/telemetry-buffer.ts | 136 ++ .../telemetry/telemetry-deduplicator.ts | 78 + src/platform/telemetry/telemetry-event.ts | 52 + .../telemetry/telemetry-fingerprint.ts | 89 + src/platform/telemetry/telemetry-pipeline.ts | 379 +++++ src/platform/telemetry/telemetry-port.ts | 35 + src/platform/telemetry/telemetry-sampler.ts | 32 + src/platform/telemetry/trace-context.ts | 103 ++ src/platform/traffic/concurrency-budget.ts | 114 ++ src/platform/traffic/request-budget.ts | 54 + src/platform/traffic/request-fanout.ts | 31 + src/platform/traffic/traffic-budget.ts | 88 + src/platform/validation/bounded-json.ts | 117 ++ src/platform/validation/validation-budget.ts | 51 + .../adapters/query/application-query.ts | 109 +- .../boundaries/boot-error-shell.tsx | 56 +- .../boundaries/chunk-recovery-boundary.tsx | 73 +- .../boundaries/render-error-boundary.tsx | 53 +- src/presentation/components/async-surface.tsx | 96 +- src/presentation/components/page-header.tsx | 21 +- .../components/state-surfaces.tsx | 4 +- src/presentation/design-system/index.ts | 2 + .../design-system/primitives/core.tsx | 53 +- .../design-system/primitives/forms.tsx | 12 +- .../design-system/primitives/navigation.tsx | 290 +++- .../design-system/primitives/overlays.tsx | 38 +- src/presentation/forms/form-components.tsx | 29 + src/presentation/forms/form-contracts.ts | 4 + src/presentation/forms/use-app-form.ts | 224 ++- src/presentation/i18n/boot-messages.ts | 34 + src/presentation/i18n/catalog.ts | 27 +- src/presentation/i18n/locale-provider.tsx | 10 +- src/presentation/i18n/message-contract.ts | 3 +- src/presentation/layouts/app-shell.tsx | 59 +- .../providers/preference-providers.tsx | 23 + .../providers/session-provider.tsx | 35 + src/presentation/routes/app-router.tsx | 321 ++-- .../routes/platform-route-codecs.ts | 6 +- src/presentation/styles/theme.css | 1437 +---------------- src/presentation/styles/theme/base.css | 45 + src/presentation/styles/theme/pages.css | 223 +++ src/presentation/styles/theme/primitives.css | 719 +++++++++ src/presentation/styles/theme/responsive.css | 93 ++ src/presentation/styles/theme/shell.css | 195 +++ src/presentation/styles/theme/templates.css | 161 ++ src/presentation/templates/page-templates.tsx | 41 +- template.lock.json | 4 +- tests/architecture/app-build-input.test.ts | 93 ++ .../architecture/context-lazy-loading.test.ts | 45 + tests/architecture/module-hierarchy.test.ts | 20 + .../observability-boundaries.test.ts | 114 ++ tests/architecture/request-fanout.test.ts | 43 + .../architecture/topology-cardinality.test.ts | 116 ++ .../browser-files.spec.ts | 124 ++ .../chunk-load-error.spec.ts | 29 + .../indexeddb-runtime.spec.ts | 170 +- .../browser-capabilities/opfs-runtime.spec.ts | 190 +++ .../public-cache-storage.spec.ts | 139 ++ .../application-mutation-admission.test.tsx | 180 +++ .../application-query-bridge.test.tsx | 125 ++ tests/component/async-surface.test.tsx | 91 +- tests/component/boot-module-failure.test.tsx | 25 + .../boot-unexpected-failure.test.tsx | 52 + tests/component/bootstrap-shell.test.tsx | 37 +- .../chunk-recovery-boundary.test.tsx | 157 ++ tests/component/design-system-links.test.tsx | 156 ++ .../component/design-system-platform.test.tsx | 63 + tests/component/form-foundation.test.tsx | 189 +++ tests/component/locale-platform.test.tsx | 115 ++ tests/component/pagination.test.tsx | 118 ++ .../component/product-feature-switch.test.tsx | 39 +- tests/component/render-boundary.test.tsx | 101 ++ tests/component/router.test.tsx | 82 +- tests/component/runtime-application.test.tsx | 64 +- ...mposition-service-worker-telemetry.test.ts | 169 ++ tests/component/tooltip.test.tsx | 63 + .../fixtures/local-draft-feature.ts | 97 -- .../indexeddb-local-draft.test.ts | 69 +- .../feature-adapter-composition.test.ts | 62 + .../feature-http-binding.test.ts | 82 +- tests/e2e/app-shell.spec.ts | 35 + tests/e2e/boot-module-failure.spec.ts | 59 + tests/e2e/old-tab-chunk-recovery.spec.ts | 129 ++ tests/e2e/production-csp.spec.ts | 70 + tests/e2e/scroll-restoration.spec.ts | 39 + tests/e2e/service-worker-recovery.spec.ts | 151 ++ tests/e2e/service-worker-update.spec.ts | 271 ++++ tests/e2e/support/fixture-builds.ts | 97 ++ tests/e2e/support/service-worker-builds.ts | 252 +++ .../feature-installation-surface.test.ts | 8 + tests/features/feature-module.test.ts | 25 + tests/features/product-features-scale.test.ts | 11 + .../reference-feature/reference-error.test.ts | 62 + .../reference-request-deduplication.test.ts | 78 + .../reference-request-fanout.test.ts | 86 + .../reference-runtime-composition.test.ts | 93 +- .../reference-telemetry.test.ts | 77 + .../reference-traffic-kit.ts | 36 + .../reference-traffic-policy.test.ts | 26 + .../reference-validator-protocol.test.ts | 88 + .../tech-log/bff-session-owner.test.ts | 21 + .../features/tech-log/content-format.test.ts | 1 - tests/features/tech-log/feature-input.test.ts | 6 +- .../public-discovery-screens.test.tsx | 26 +- .../tech-log/runtime-composition.test.ts | 10 +- .../features/tech-log/studio-contract.test.ts | 4 +- .../tech-log/studio-editor-smoke.test.tsx | 1 - .../tech-log/studio-publication-flow.test.tsx | 8 +- .../tech-log/studio-save-navigation.test.tsx | 8 +- .../tech-log/studio-shell-smoke.test.tsx | 1 + .../barrel/adapters/http/internals/index.ts | 1 + .../adapters/storage/indexeddb/index.ts | 1 + .../bootstrap/compose-storage-sub-barrel.ts | 4 + .../barrel/bootstrap/compose-sub-barrel.ts | 4 + .../adapters/telemetry/index.ts | 1 + .../cross-boundary/contexts/admin/value.ts | 1 + .../contexts/customer/read-admin.ts | 2 + .../contexts/customer/telemetry.ts | 2 + .../features/alpha/read-beta.ts | 2 + .../features/alpha/telemetry.ts | 2 + .../cross-boundary/features/beta/value.ts | 1 + .../presentation/read-context.ts | 1 + .../presentation/read-feature-root.ts | 1 + .../adapters/realtime/index.ts | 1 + .../bootstrap/compose-realtime.ts | 4 + .../import-boundaries/contracts/zod.ts | 6 + .../presentation/components/ui/button.ts | 2 + .../presentation/design-system/index.ts | 1 + .../design-system/primitives/core.ts | 1 + .../presentation/pages/deep-import.ts | 4 + .../presentation/pages/direct-icon.ts} | 1 + .../presentation/pages/direct-zod.ts | 5 + .../presentation/pages/public-import.ts | 3 + .../presentation/pages/wrapped-zod.ts | 3 + .../unresolved/application/glob-value.ts | 2 + .../request-fanout/allowed/bulk-read.ts | 12 + .../forbidden/fetch-in-foreach.ts | 6 + .../request-fanout/forbidden/loop-dispatch.ts | 10 + .../forbidden/per-row-detail.ts | 6 + tests/fixtures/coverage/below-threshold.json | 16 +- .../coverage/repository-omission.json | 4 +- .../design-system/forbidden/deep-import.tsx | 3 - .../presentation/sample-feature-page.tsx | 3 + .../components}/backend-message.tsx | 0 .../components}/hardcoded-common.tsx | 0 .../presentation/components}/unsafe-html.tsx | 0 .../src/presentation/pages/sample-page.tsx | 3 + .../src/bootstrap/composed-realtime.ts | 3 - .../forbidden/expired-quarantine.fixture | 2 + .../forbidden/focused-test.fixture | 1 + .../typecheck/invalid-diagnostics-port.ts | 9 + tests/helpers/fixture-feature.tsx | 132 ++ tests/helpers/memory-indexeddb.ts | 320 +++- tests/helpers/traffic-test-kit.ts | 136 ++ tests/integration/auth-recovery.test.ts | 34 +- tests/integration/http-client.test.ts | 259 ++- .../http-execution-v3-live-authority.test.ts | 44 + .../http-execution-v3-observability.test.ts | 66 + .../security-followup-archive.test.ts | 6 +- tests/integration/vitest-collection.test.ts | 31 + tests/mocks/scenarios/catalog.ts | 6 +- .../cardinality/cardinality-budget.test.ts | 7 + .../cardinality/compose-unique-record.test.ts | 6 + .../extreme-scale-registry.test.ts | 112 ++ tests/platform/errors/app-error.test.ts | 57 + .../platform/errors/failure-boundary.test.tsx | 84 + tests/platform/errors/platform-errors.test.ts | 125 ++ .../execution/execution-context.test.ts | 114 ++ tests/platform/release/cache-policy.test.ts | 86 + .../release/release-coherence.test.ts | 87 + .../release/release-mismatch-recovery.test.ts | 179 ++ tests/platform/resilience/deadline.test.ts | 23 + .../platform/resilience/retry-budget.test.ts | 29 + .../routing/context-route-module.test.ts | 91 ++ .../telemetry/redact-telemetry.test.ts | 190 +++ .../telemetry/telemetry-buffer.test.ts | 120 ++ .../telemetry/telemetry-deduplicator.test.ts | 94 ++ .../telemetry/telemetry-pipeline.test.ts | 267 +++ .../platform/telemetry/telemetry-port.test.ts | 63 + .../platform/telemetry/trace-context.test.ts | 102 ++ .../traffic/concurrency-budget.test.ts | 94 ++ .../traffic/http-budget-integration.test.ts | 244 +++ .../traffic/operation-traffic-policy.test.ts | 80 + tests/platform/traffic/request-budget.test.ts | 28 + .../traffic/request-deduplication.test.ts | 89 + tests/platform/traffic/request-fanout.test.ts | 74 + .../traffic/traffic-amplification.test.ts | 101 ++ tests/platform/traffic/traffic-budget.test.ts | 59 + .../platform/validation/bounded-json.test.ts | 139 ++ .../validation/validation-budget.test.ts | 43 + .../indexeddb-feature-capability.test.ts | 54 + .../fixtures/R10/assets/app.aaaa.js.fixture | 1 + tests/release/fixtures/R10/config.json | 19 + tests/release/fixtures/R10/index.html | 10 + .../fixtures/R10/release-manifest.json | 16 + .../fixtures/R11/assets/app.bbbb.js.fixture | 1 + tests/release/fixtures/R11/config.json | 19 + tests/release/fixtures/R11/index.html | 10 + .../fixtures/R11/release-manifest.json | 16 + tests/release/mixed-replica.test.ts | 118 ++ tests/release/old-asset-reachability.test.ts | 50 + tests/release/release-fixture.ts | 273 ++++ tests/release/release-matrix.test.ts | 91 ++ tests/runtime-schema/http-schema.test.ts | 24 + tests/runtime-schema/runtime-config.test.ts | 131 +- tests/scale/benchmark.test.ts | 83 + tests/scale/browser-soak.contract.test.ts | 153 ++ tests/scale/composition-scale.test.ts | 60 + tests/scale/filesystem-topology.ts | 139 ++ .../typescript/extended-diagnostics.txt | 14 + tests/scale/global-local-independence.test.ts | 172 ++ tests/scale/growth-regression.test.ts | 91 ++ tests/scale/scale-artifact.ts | 20 + tests/scale/scale-baseline.test.ts | 173 ++ tests/scale/scale-profile.ts | 27 + tests/scale/session/long-session.test.ts | 154 ++ tests/scale/session/network-flap.test.ts | 128 ++ tests/scale/synthetic-topology.test.ts | 58 + tests/scale/synthetic-topology.ts | 207 +++ tests/scale/telemetry/telemetry-storm.test.ts | 165 ++ .../traffic/amplification-metrics.test.ts | 46 + tests/scale/traffic/amplification-metrics.ts | 34 + tests/scale/traffic/failure-scenarios.test.ts | 165 ++ .../scale/traffic/retry-after-jitter.test.ts | 73 + tests/scale/traffic/synthetic-traffic.ts | 92 ++ tests/scale/tsc-diagnostics-parser.test.ts | 45 + .../generate-product-feature-index.test.ts | 246 +++ tests/scripts/verify-extreme-scale.test.ts | 81 + tests/setup.ts | 5 +- tests/support/browser/strict-browser-test.ts | 19 +- tests/support/runtime/determinism.ts | 69 - .../ci-runner/ci-artifact-contract.test.ts | 33 +- .../ci-runner/ci-evidence-freshness.test.ts | 24 +- .../ci-workflow-generation.test.ts.snap | 20 +- tests/unit/abortable-operation.test.ts | 30 + tests/unit/api-operation-v2.test.ts | 55 + tests/unit/architecture-report.test.ts | 68 + .../architecture-violation-message.test.ts | 35 + tests/unit/archived-promotion.test.ts | 48 + tests/unit/auth-session-adapter.test.ts | 66 + tests/unit/boundary-mapper.test.ts | 13 + tests/unit/browser-file-content.test.ts | 314 ++++ tests/unit/browser-file-download.test.ts | 413 ++++- tests/unit/browser-file-picker.test.ts | 134 ++ tests/unit/browser-file-runtime.test.ts | 66 + .../browser-rpc-remediation.test.ts | 226 +++ .../browser-rpc/browser-rpc-runtime.test.ts | 1 - tests/unit/build-environment-bundle.test.ts | 89 + tests/unit/bundle-classification.test.ts | 25 + tests/unit/chunk-recovery.test.ts | 56 + tests/unit/ci-workflow-generation.test.ts | 205 ++- tests/unit/compatibility.test.ts | 77 + .../unit/conditional-validator-store.test.ts | 2 + .../unit/contract-index-immutability.test.ts | 124 ++ tests/unit/contract-registry-lookup.test.ts | 67 + tests/unit/contract-release-checks.test.ts | 83 + tests/unit/contract-snapshot-bypass.test.ts | 262 +++ tests/unit/cross-tab-invalidation.test.ts | 167 +- tests/unit/cursor-pagination-runtime.test.ts | 61 + .../unit/deletable-history-documents.test.ts | 65 + tests/unit/deployment-admission.test.ts | 119 +- tests/unit/diagnostics.test.ts | 31 + tests/unit/dist-permissions.test.ts | 38 + tests/unit/error-classification.test.ts | 75 +- tests/unit/external-contract-runtime.test.ts | 33 + .../unit/feature-override-diagnostics.test.ts | 126 ++ tests/unit/feature-removal-argument.test.ts | 20 + tests/unit/feature-shape-growth.test.ts | 128 ++ tests/unit/fixture-node-modules.test.ts | 206 ++- tests/unit/hosting-probe.test.ts | 73 +- tests/unit/http-contract-bridge.test.ts | 104 ++ tests/unit/http-execution-v3.test.ts | 565 ++++++- .../unit/http-operation-v2-v3-parity.test.ts | 56 + tests/unit/http-retry-lifecycle.test.ts | 5 +- tests/unit/i18n-contract.test.ts | 19 +- tests/unit/image-cdn-browser-probe.test.ts | 34 + tests/unit/image-cdn-runtime.test.ts | 170 ++ tests/unit/indexeddb-connection.test.ts | 91 ++ tests/unit/indexeddb-maintenance.test.ts | 158 +- tests/unit/indexeddb-opfs-journal.test.ts | 80 + tests/unit/indexeddb-runtime.test.ts | 417 ++++- tests/unit/indexeddb-transaction.test.ts | 52 +- tests/unit/installed-feature-messages.test.ts | 53 + tests/unit/lab-performance.test.ts | 106 ++ ...y-and-optional-network-remediation.test.ts | 21 +- tests/unit/local-draft-api.test.ts | 54 + tests/unit/manual-a11y-evidence.test.ts | 38 + tests/unit/memory-indexeddb-fidelity.test.ts | 120 ++ tests/unit/observability-cardinality.test.ts | 120 ++ tests/unit/opfs-byte-store.test.ts | 242 ++- tests/unit/opfs-worker-runtime.test.ts | 1215 +++++++++++++- tests/unit/optional-runtime-host.test.ts | 58 + tests/unit/performance-budgets.test.ts | 2 +- .../unit/presigned-transfer-delivery.test.ts | 11 - .../unit/presigned-transfer-download.test.ts | 235 ++- tests/unit/presigned-transfer-fixture.ts | 12 + tests/unit/presigned-transfer-upload.test.ts | 339 +++- tests/unit/presigned-transfer.test.ts | 128 +- .../product-feature-selection-build.test.ts | 109 ++ tests/unit/product-features.test.ts | 31 +- tests/unit/product-index-entrypoints.test.ts | 74 + tests/unit/promotion-readiness.test.ts | 4 +- .../unit/public-response-cache-codec.test.ts | 326 ++++ tests/unit/public-response-cache.test.ts | 335 +++- .../realtime/bounded-poll-coordinator.test.ts | 165 +- tests/unit/realtime/event-codec.test.ts | 51 +- tests/unit/realtime/event-consumer.test.ts | 194 ++- .../realtime/fetch-sse-connection.test.ts | 178 ++ .../live-poll-handoff-coordinator.test.ts | 35 + .../realtime-reconnect-coordinator.test.ts | 653 +++++++- .../realtime-reconnect-policy.test.ts | 32 +- tests/unit/realtime/result.test.ts | 79 +- tests/unit/realtime/sse-parser-reference.ts | 364 +++++ tests/unit/realtime/sse-parser.test.ts | 344 +++- .../unit/realtime/stream-coordinator.test.ts | 117 +- tests/unit/registry-governance.test.ts | 7 +- tests/unit/release-artifacts.test.ts | 6 +- tests/unit/release-coherence.test.ts | 78 +- tests/unit/removal-fixture.test.ts | 123 +- tests/unit/repository-file-inventory.test.ts | 16 +- tests/unit/request-builder.test.ts | 9 + tests/unit/rest-profile-contract.test.ts | 76 + .../unit/resumable-upload-checkpoint.test.ts | 69 + .../resumable-upload-fetch-transport.test.ts | 100 +- .../resumable-upload-runtime-contract.test.ts | 371 +++++ .../unit/resumable-upload-runtime-fixture.ts | 1 + .../resumable-upload-runtime-recovery.test.ts | 1030 ++++++++++++ .../resumable-upload-runtime-teardown.test.ts | 53 + tests/unit/resumable-upload-runtime.test.ts | 196 ++- tests/unit/retry-policy.test.ts | 34 + tests/unit/route-runtime.test.ts | 11 +- tests/unit/runbook-drill.test.ts | 129 ++ tests/unit/runtime-adapters.test.ts | 131 ++ .../second-api-feature-registries.test.ts | 183 +++ tests/unit/security-promotion-staging.test.ts | 1 - tests/unit/server-state-scope-runtime.test.ts | 263 ++- tests/unit/service-worker-build-input.test.ts | 86 +- tests/unit/service-worker-runtime.test.ts | 973 ++++++++++- ...ervice-worker-web-push-remediation.test.ts | 13 +- tests/unit/sub-path-deployment.test.ts | 66 + tests/unit/supply-chain.test.ts | 74 +- tests/unit/tanstack-cache-coordinator.test.ts | 36 +- .../unit/task3-selective-integration.test.ts | 31 +- tests/unit/telemetry.test.ts | 448 +++++ tests/unit/test-evidence-source-rules.test.ts | 70 + tests/unit/test-setup.test.ts | 14 + .../two-feature-install-typecheck.test.ts | 181 +++ tests/unit/ungated-scripts.test.ts | 103 ++ tests/unit/ungated-tests.test.ts | 99 ++ tests/unit/vite-module-inventory.test.ts | 31 + tests/unit/web-push-codec.test.ts | 163 ++ .../web-push-subscription-adapter.test.ts | 484 +++++- tests/unit/web-push-worker-runtime.test.ts | 187 ++- tsconfig.base.json | 1 + vite.config.ts | 91 +- vite.service-worker.config.ts | 13 +- vitest.config.ts | 10 + 738 files changed, 55027 insertions(+), 13567 deletions(-) delete mode 100644 config/architecture/layers.json create mode 100644 config/ci/contract-baseline.json create mode 100644 config/ci/ungated-scripts.json create mode 100644 config/ci/ungated-tests.json create mode 100644 config/compatibility/runtime-config.schema.baseline.json create mode 100644 config/scale/benchmark-baseline.json create mode 100644 config/scale/feature-shape-ceilings.json create mode 100644 config/scale/feature-shape-growth.json create mode 100644 docs/README.md create mode 100644 docs/operations/template-sync-2026-09-29.md create mode 100644 recipes/frontend-capabilities/indexeddb-feature-capability.ts create mode 100644 scripts/check-app-build-input.ts create mode 100644 scripts/check-request-fanout.ts create mode 100644 scripts/generate-product-feature-index.ts create mode 100644 scripts/lib/architecture-violation-message.ts create mode 100644 scripts/lib/dist-permissions.ts create mode 100644 scripts/lib/lab-performance.ts rename {src/application/policies => scripts/lib}/performance-budgets.ts (100%) rename {src/application/policies => scripts/lib}/promotion-readiness.ts (81%) create mode 100644 scripts/lib/self-unregistering-service-worker.ts create mode 100644 scripts/lib/ungated-scripts.ts create mode 100644 scripts/lib/ungated-tests.ts create mode 100644 scripts/scale/benchmark-result.ts create mode 100644 scripts/scale/benchmark.ts create mode 100644 scripts/scale/browser-soak.ts create mode 100644 scripts/scale/check-scale-baseline.ts create mode 100644 scripts/scale/collect-tsc-diagnostics.ts create mode 100644 scripts/scale/composition-workloads.ts create mode 100644 scripts/scale/measure-feature-shape-growth.ts create mode 100644 scripts/scale/memory-slope.ts create mode 100644 scripts/scale/run-composition-scale.ts create mode 100644 scripts/scale/run-scale-profile.ts create mode 100644 scripts/scale/scale-baseline.ts create mode 100644 scripts/update-ci-contract-baseline.ts create mode 100644 scripts/verify-extreme-scale.ts create mode 100644 src/adapters/browser-files/download-input-validation.ts create mode 100644 src/adapters/browser-transfer/presigned/http-common.ts create mode 100644 src/adapters/browser-transfer/resumable-upload/runtime-dependencies.ts create mode 100644 src/adapters/browser-transfer/resumable-upload/upload-response-validation.ts create mode 100644 src/adapters/cache-storage/public-cache-codec.ts create mode 100644 src/adapters/cache-storage/public-cache-response-validation.ts create mode 100644 src/adapters/http/platform-error-mapping.ts rename src/adapters/{realtime => platform}/json-member-scanner.ts (100%) create mode 100644 src/adapters/platform/retry-after.ts delete mode 100644 src/adapters/storage/indexeddb/indexeddb-failure.ts create mode 100644 src/adapters/storage/indexeddb/indexeddb-records.ts create mode 100644 src/adapters/storage/opfs/opfs-prepared-object.ts create mode 100644 src/adapters/telemetry/feature-telemetry.ts create mode 100644 src/adapters/telemetry/telemetry-collector.ts create mode 100644 src/adapters/web-push/codec-primitives.ts create mode 100644 src/apps/deployable-app-module.ts create mode 100644 src/apps/template-app.ts create mode 100644 src/apps/template-app/app-module.ts create mode 100644 src/bootstrap/boot-release-recovery.ts create mode 100644 src/bootstrap/boot.tsx create mode 100644 src/bootstrap/render-boot-failure.tsx create mode 100644 src/contexts/bounded-context-module.ts create mode 100644 src/contexts/reference-context/context-module.ts create mode 100644 src/contracts/operation-id.ts create mode 100644 src/contracts/validation-issues.ts create mode 100644 src/contracts/zod.ts create mode 100644 src/features/feature-module.ts create mode 100644 src/features/local-draft-feature/NOT_INSTALLED create mode 100644 src/features/reference-feature/NOT_INSTALLED create mode 100644 src/features/reference-feature/application/reference-error.ts create mode 100644 src/features/tech-log/NOT_INSTALLED create mode 100644 src/platform/cardinality/cardinality-budget.ts create mode 100644 src/platform/cardinality/compose-unique-record.ts create mode 100644 src/platform/cardinality/growth-regression.ts create mode 100644 src/platform/cardinality/topology-capacity.ts create mode 100644 src/platform/errors/app-error.ts create mode 100644 src/platform/errors/context-error-boundary.tsx create mode 100644 src/platform/errors/feature-error-boundary.tsx create mode 100644 src/platform/errors/platform-errors.ts create mode 100644 src/platform/errors/scoped-error-boundary.tsx create mode 100644 src/platform/execution/execution-context.ts create mode 100644 src/platform/release/release-coherence.ts create mode 100644 src/platform/release/release-mismatch-recovery.ts create mode 100644 src/platform/resilience/deadline.ts create mode 100644 src/platform/resilience/retry-budget.ts create mode 100644 src/platform/routing/context-route-module.ts create mode 100644 src/platform/telemetry/redact-telemetry.ts create mode 100644 src/platform/telemetry/telemetry-buffer.ts create mode 100644 src/platform/telemetry/telemetry-deduplicator.ts create mode 100644 src/platform/telemetry/telemetry-event.ts create mode 100644 src/platform/telemetry/telemetry-fingerprint.ts create mode 100644 src/platform/telemetry/telemetry-pipeline.ts create mode 100644 src/platform/telemetry/telemetry-port.ts create mode 100644 src/platform/telemetry/telemetry-sampler.ts create mode 100644 src/platform/telemetry/trace-context.ts create mode 100644 src/platform/traffic/concurrency-budget.ts create mode 100644 src/platform/traffic/request-budget.ts create mode 100644 src/platform/traffic/request-fanout.ts create mode 100644 src/platform/traffic/traffic-budget.ts create mode 100644 src/platform/validation/bounded-json.ts create mode 100644 src/platform/validation/validation-budget.ts create mode 100644 src/presentation/i18n/boot-messages.ts create mode 100644 src/presentation/providers/preference-providers.tsx create mode 100644 src/presentation/styles/theme/base.css create mode 100644 src/presentation/styles/theme/pages.css create mode 100644 src/presentation/styles/theme/primitives.css create mode 100644 src/presentation/styles/theme/responsive.css create mode 100644 src/presentation/styles/theme/shell.css create mode 100644 src/presentation/styles/theme/templates.css create mode 100644 tests/architecture/app-build-input.test.ts create mode 100644 tests/architecture/context-lazy-loading.test.ts create mode 100644 tests/architecture/module-hierarchy.test.ts create mode 100644 tests/architecture/observability-boundaries.test.ts create mode 100644 tests/architecture/request-fanout.test.ts create mode 100644 tests/architecture/topology-cardinality.test.ts create mode 100644 tests/browser-capabilities/chunk-load-error.spec.ts create mode 100644 tests/component/boot-module-failure.test.tsx create mode 100644 tests/component/boot-unexpected-failure.test.tsx create mode 100644 tests/component/design-system-links.test.tsx create mode 100644 tests/component/pagination.test.tsx create mode 100644 tests/component/runtime-composition-service-worker-telemetry.test.ts create mode 100644 tests/component/tooltip.test.tsx delete mode 100644 tests/contract/consumer-experience/fixtures/local-draft-feature.ts create mode 100644 tests/e2e/boot-module-failure.spec.ts create mode 100644 tests/e2e/old-tab-chunk-recovery.spec.ts create mode 100644 tests/e2e/production-csp.spec.ts create mode 100644 tests/e2e/scroll-restoration.spec.ts create mode 100644 tests/e2e/service-worker-recovery.spec.ts create mode 100644 tests/e2e/service-worker-update.spec.ts create mode 100644 tests/e2e/support/fixture-builds.ts create mode 100644 tests/e2e/support/service-worker-builds.ts create mode 100644 tests/features/feature-installation-surface.test.ts create mode 100644 tests/features/feature-module.test.ts create mode 100644 tests/features/product-features-scale.test.ts create mode 100644 tests/features/reference-feature/reference-error.test.ts create mode 100644 tests/features/reference-feature/reference-request-deduplication.test.ts create mode 100644 tests/features/reference-feature/reference-request-fanout.test.ts create mode 100644 tests/features/reference-feature/reference-telemetry.test.ts create mode 100644 tests/features/reference-feature/reference-traffic-kit.ts create mode 100644 tests/features/reference-feature/reference-traffic-policy.test.ts create mode 100644 tests/features/reference-feature/reference-validator-protocol.test.ts create mode 100644 tests/features/tech-log/bff-session-owner.test.ts create mode 100644 tests/fixtures/architecture/dependency-graph/barrel/adapters/http/internals/index.ts create mode 100644 tests/fixtures/architecture/dependency-graph/barrel/adapters/storage/indexeddb/index.ts create mode 100644 tests/fixtures/architecture/dependency-graph/barrel/bootstrap/compose-storage-sub-barrel.ts create mode 100644 tests/fixtures/architecture/dependency-graph/barrel/bootstrap/compose-sub-barrel.ts create mode 100644 tests/fixtures/architecture/dependency-graph/cross-boundary/adapters/telemetry/index.ts create mode 100644 tests/fixtures/architecture/dependency-graph/cross-boundary/contexts/admin/value.ts create mode 100644 tests/fixtures/architecture/dependency-graph/cross-boundary/contexts/customer/read-admin.ts create mode 100644 tests/fixtures/architecture/dependency-graph/cross-boundary/contexts/customer/telemetry.ts create mode 100644 tests/fixtures/architecture/dependency-graph/cross-boundary/features/alpha/read-beta.ts create mode 100644 tests/fixtures/architecture/dependency-graph/cross-boundary/features/alpha/telemetry.ts create mode 100644 tests/fixtures/architecture/dependency-graph/cross-boundary/features/beta/value.ts create mode 100644 tests/fixtures/architecture/dependency-graph/cross-boundary/presentation/read-context.ts create mode 100644 tests/fixtures/architecture/dependency-graph/cross-boundary/presentation/read-feature-root.ts create mode 100644 tests/fixtures/architecture/dependency-graph/import-boundaries/adapters/realtime/index.ts create mode 100644 tests/fixtures/architecture/dependency-graph/import-boundaries/bootstrap/compose-realtime.ts create mode 100644 tests/fixtures/architecture/dependency-graph/import-boundaries/contracts/zod.ts create mode 100644 tests/fixtures/architecture/dependency-graph/import-boundaries/presentation/components/ui/button.ts create mode 100644 tests/fixtures/architecture/dependency-graph/import-boundaries/presentation/design-system/index.ts create mode 100644 tests/fixtures/architecture/dependency-graph/import-boundaries/presentation/design-system/primitives/core.ts create mode 100644 tests/fixtures/architecture/dependency-graph/import-boundaries/presentation/pages/deep-import.ts rename tests/fixtures/{design-system/forbidden/direct-icon.tsx => architecture/dependency-graph/import-boundaries/presentation/pages/direct-icon.ts} (51%) create mode 100644 tests/fixtures/architecture/dependency-graph/import-boundaries/presentation/pages/direct-zod.ts create mode 100644 tests/fixtures/architecture/dependency-graph/import-boundaries/presentation/pages/public-import.ts create mode 100644 tests/fixtures/architecture/dependency-graph/import-boundaries/presentation/pages/wrapped-zod.ts create mode 100644 tests/fixtures/architecture/dependency-graph/unresolved/application/glob-value.ts create mode 100644 tests/fixtures/architecture/request-fanout/allowed/bulk-read.ts create mode 100644 tests/fixtures/architecture/request-fanout/forbidden/fetch-in-foreach.ts create mode 100644 tests/fixtures/architecture/request-fanout/forbidden/loop-dispatch.ts create mode 100644 tests/fixtures/architecture/request-fanout/forbidden/per-row-detail.ts delete mode 100644 tests/fixtures/design-system/forbidden/deep-import.tsx create mode 100644 tests/fixtures/i18n/forbidden/src/features/sample-feature/presentation/sample-feature-page.tsx rename tests/fixtures/i18n/forbidden/{ => src/presentation/components}/backend-message.tsx (100%) rename tests/fixtures/i18n/forbidden/{ => src/presentation/components}/hardcoded-common.tsx (100%) rename tests/fixtures/i18n/forbidden/{ => src/presentation/components}/unsafe-html.tsx (100%) create mode 100644 tests/fixtures/i18n/forbidden/src/presentation/pages/sample-page.tsx delete mode 100644 tests/fixtures/realtime-boundaries/forbidden/src/bootstrap/composed-realtime.ts create mode 100644 tests/fixtures/test-evidence/forbidden/expired-quarantine.fixture create mode 100644 tests/fixtures/test-evidence/forbidden/focused-test.fixture create mode 100644 tests/helpers/fixture-feature.tsx create mode 100644 tests/helpers/traffic-test-kit.ts create mode 100644 tests/integration/vitest-collection.test.ts create mode 100644 tests/platform/cardinality/cardinality-budget.test.ts create mode 100644 tests/platform/cardinality/compose-unique-record.test.ts create mode 100644 tests/platform/cardinality/extreme-scale-registry.test.ts create mode 100644 tests/platform/errors/app-error.test.ts create mode 100644 tests/platform/errors/failure-boundary.test.tsx create mode 100644 tests/platform/errors/platform-errors.test.ts create mode 100644 tests/platform/execution/execution-context.test.ts create mode 100644 tests/platform/release/cache-policy.test.ts create mode 100644 tests/platform/release/release-coherence.test.ts create mode 100644 tests/platform/release/release-mismatch-recovery.test.ts create mode 100644 tests/platform/resilience/deadline.test.ts create mode 100644 tests/platform/resilience/retry-budget.test.ts create mode 100644 tests/platform/routing/context-route-module.test.ts create mode 100644 tests/platform/telemetry/redact-telemetry.test.ts create mode 100644 tests/platform/telemetry/telemetry-buffer.test.ts create mode 100644 tests/platform/telemetry/telemetry-deduplicator.test.ts create mode 100644 tests/platform/telemetry/telemetry-pipeline.test.ts create mode 100644 tests/platform/telemetry/telemetry-port.test.ts create mode 100644 tests/platform/telemetry/trace-context.test.ts create mode 100644 tests/platform/traffic/concurrency-budget.test.ts create mode 100644 tests/platform/traffic/http-budget-integration.test.ts create mode 100644 tests/platform/traffic/operation-traffic-policy.test.ts create mode 100644 tests/platform/traffic/request-budget.test.ts create mode 100644 tests/platform/traffic/request-deduplication.test.ts create mode 100644 tests/platform/traffic/request-fanout.test.ts create mode 100644 tests/platform/traffic/traffic-amplification.test.ts create mode 100644 tests/platform/traffic/traffic-budget.test.ts create mode 100644 tests/platform/validation/bounded-json.test.ts create mode 100644 tests/platform/validation/validation-budget.test.ts create mode 100644 tests/recipes/indexeddb-feature-capability.test.ts create mode 100644 tests/release/fixtures/R10/assets/app.aaaa.js.fixture create mode 100644 tests/release/fixtures/R10/config.json create mode 100644 tests/release/fixtures/R10/index.html create mode 100644 tests/release/fixtures/R10/release-manifest.json create mode 100644 tests/release/fixtures/R11/assets/app.bbbb.js.fixture create mode 100644 tests/release/fixtures/R11/config.json create mode 100644 tests/release/fixtures/R11/index.html create mode 100644 tests/release/fixtures/R11/release-manifest.json create mode 100644 tests/release/mixed-replica.test.ts create mode 100644 tests/release/old-asset-reachability.test.ts create mode 100644 tests/release/release-fixture.ts create mode 100644 tests/release/release-matrix.test.ts create mode 100644 tests/scale/benchmark.test.ts create mode 100644 tests/scale/browser-soak.contract.test.ts create mode 100644 tests/scale/composition-scale.test.ts create mode 100644 tests/scale/filesystem-topology.ts create mode 100644 tests/scale/fixtures/typescript/extended-diagnostics.txt create mode 100644 tests/scale/global-local-independence.test.ts create mode 100644 tests/scale/growth-regression.test.ts create mode 100644 tests/scale/scale-artifact.ts create mode 100644 tests/scale/scale-baseline.test.ts create mode 100644 tests/scale/scale-profile.ts create mode 100644 tests/scale/session/long-session.test.ts create mode 100644 tests/scale/session/network-flap.test.ts create mode 100644 tests/scale/synthetic-topology.test.ts create mode 100644 tests/scale/synthetic-topology.ts create mode 100644 tests/scale/telemetry/telemetry-storm.test.ts create mode 100644 tests/scale/traffic/amplification-metrics.test.ts create mode 100644 tests/scale/traffic/amplification-metrics.ts create mode 100644 tests/scale/traffic/failure-scenarios.test.ts create mode 100644 tests/scale/traffic/retry-after-jitter.test.ts create mode 100644 tests/scale/traffic/synthetic-traffic.ts create mode 100644 tests/scale/tsc-diagnostics-parser.test.ts create mode 100644 tests/scripts/generate-product-feature-index.test.ts create mode 100644 tests/scripts/verify-extreme-scale.test.ts delete mode 100644 tests/support/runtime/determinism.ts create mode 100644 tests/unit/architecture-report.test.ts create mode 100644 tests/unit/architecture-violation-message.test.ts create mode 100644 tests/unit/archived-promotion.test.ts create mode 100644 tests/unit/build-environment-bundle.test.ts create mode 100644 tests/unit/contract-index-immutability.test.ts create mode 100644 tests/unit/contract-registry-lookup.test.ts create mode 100644 tests/unit/contract-release-checks.test.ts create mode 100644 tests/unit/contract-snapshot-bypass.test.ts create mode 100644 tests/unit/deletable-history-documents.test.ts create mode 100644 tests/unit/dist-permissions.test.ts create mode 100644 tests/unit/feature-override-diagnostics.test.ts create mode 100644 tests/unit/feature-removal-argument.test.ts create mode 100644 tests/unit/feature-shape-growth.test.ts create mode 100644 tests/unit/http-contract-bridge.test.ts create mode 100644 tests/unit/http-operation-v2-v3-parity.test.ts create mode 100644 tests/unit/installed-feature-messages.test.ts create mode 100644 tests/unit/lab-performance.test.ts create mode 100644 tests/unit/local-draft-api.test.ts create mode 100644 tests/unit/memory-indexeddb-fidelity.test.ts create mode 100644 tests/unit/observability-cardinality.test.ts create mode 100644 tests/unit/product-feature-selection-build.test.ts create mode 100644 tests/unit/product-index-entrypoints.test.ts create mode 100644 tests/unit/public-response-cache-codec.test.ts create mode 100644 tests/unit/realtime/sse-parser-reference.ts create mode 100644 tests/unit/resumable-upload-runtime-contract.test.ts create mode 100644 tests/unit/resumable-upload-runtime-recovery.test.ts create mode 100644 tests/unit/runbook-drill.test.ts create mode 100644 tests/unit/second-api-feature-registries.test.ts create mode 100644 tests/unit/sub-path-deployment.test.ts create mode 100644 tests/unit/test-evidence-source-rules.test.ts create mode 100644 tests/unit/test-setup.test.ts create mode 100644 tests/unit/two-feature-install-typecheck.test.ts create mode 100644 tests/unit/ungated-scripts.test.ts create mode 100644 tests/unit/ungated-tests.test.ts create mode 100644 tests/unit/vite-module-inventory.test.ts diff --git a/.dependency-cruiser.json b/.dependency-cruiser.json index f3ffd9d..7ab151c 100644 --- a/.dependency-cruiser.json +++ b/.dependency-cruiser.json @@ -2,6 +2,7 @@ "forbidden": [ { "name": "domain-is-framework-neutral", + "comment": "domain holds framework-neutral models and pure policies. Keep the dependency out: move the code to application, or pass the value in from there.", "severity": "error", "from": { "path": "^src/domain" @@ -12,6 +13,7 @@ }, { "name": "application-does-not-know-concrete-runtime", + "comment": "application owns use cases and the ports they need. Declare a port under src/application/ports and let src/bootstrap pass the concrete adapter.", "severity": "error", "from": { "path": "^src/application" @@ -22,6 +24,7 @@ }, { "name": "presentation-does-not-know-adapters", + "comment": "§4. Presentation talks to application ports, not concrete adapters, the composition root or the TanStack runtime. Exception: src/presentation/adapters/query is the TanStack Query binding, the one place @tanstack is imported (docs/architecture/frontend-ports-adapters-and-boundaries.md). It needs @tanstack only; concrete-adapters-compose-only-in-bootstrap still keeps it off src/adapters. Owner: frontend-platform. Revisit if the binding moves out of presentation.", "severity": "error", "from": { "path": "^src/presentation/(?!adapters/query)" @@ -32,6 +35,7 @@ }, { "name": "page-templates-own-layout-only", + "comment": "Page templates own layout only. Take data and actions as props from the page that uses the template.", "severity": "error", "from": { "path": "^src/presentation/templates" @@ -42,6 +46,7 @@ }, { "name": "icon-vendor-is-facade-only", + "comment": "VD-05. lucide-react is imported by the icon vendor facade only; product code uses the semantic icons from the design-system index, so replacing the vendor touches one file.", "severity": "error", "from": { "path": "^src", @@ -51,8 +56,34 @@ "path": "^lucide-react$" } }, + { + "name": "zod-is-reached-through-contracts-zod", + "comment": "F-7 (13-08). src/contracts/zod.ts sets zod jitless before any schema is built, so the production CSP never sees zod's Function probe. Schema code imports z from there.", + "severity": "error", + "from": { + "path": "^src", + "pathNot": "^src/contracts/zod\\.ts$" + }, + "to": { + "path": "^zod$" + } + }, + { + "name": "design-system-is-reached-through-its-index", + "comment": "VD-05, 12-08. Code outside src/presentation/design-system imports its public index.ts only, so the primitives can change behind it. Named facades: src/presentation/components/ui/*.ts re-export the canonical primitives under their pre-VD-05 paths (VD-05 Rollback). Exception: src/presentation/templates/page-templates.tsx reads PaginationLandmarkContext, which index.ts does not export. Owner: frontend-platform. Revisit: export it from index.ts or move the page templates into the design system.", + "severity": "error", + "from": { + "path": "^src/", + "pathNot": "^src/presentation/(design-system/|components/ui/[^/]+\\.ts$|templates/page-templates\\.tsx$)" + }, + "to": { + "path": "^src/presentation/design-system/", + "pathNot": "^src/presentation/design-system/index\\.ts$" + } + }, { "name": "adapters-do-not-know-presentation", + "comment": "An adapter implements an application port. It never imports UI or the composition root; pass what it needs through the port or its factory arguments.", "severity": "error", "from": { "path": "^src/adapters" @@ -63,6 +94,7 @@ }, { "name": "feature-domain-is-framework-neutral", + "comment": "A feature's domain is framework-neutral, like src/domain. Move the code to the feature's application, or pass the value in from there.", "severity": "error", "from": { "path": "^src/features/[^/]+/domain" @@ -73,6 +105,7 @@ }, { "name": "feature-application-does-not-know-runtime", + "comment": "A feature's application declares the ports it needs. Put the port in the feature's application and implement it in the feature's adapters/; bootstrap wires the two.", "severity": "error", "from": { "path": "^src/features/[^/]+/application" @@ -83,6 +116,7 @@ }, { "name": "feature-presentation-does-not-know-outbound-adapters", + "comment": "Feature presentation calls its application API. The feature's adapters/ are wired by bootstrap, so import the application facade instead.", "severity": "error", "from": { "path": "^src/features/[^/]+/presentation" @@ -93,6 +127,7 @@ }, { "name": "feature-adapters-do-not-know-presentation", + "comment": "A feature adapter implements the feature's ports and never imports UI or the composition root. Pass what it needs through the port.", "severity": "error", "from": { "path": "^src/features/[^/]+/adapters" @@ -103,6 +138,7 @@ }, { "name": "concrete-adapters-compose-only-in-bootstrap", + "comment": "Only src/bootstrap constructs concrete adapters. Depend on the application port or facade; bootstrap composes the adapter behind it.", "severity": "error", "from": { "path": "^src/(domain|application|presentation|contracts)" @@ -113,7 +149,7 @@ }, { "name": "external-contract-package-single-import-path", - "comment": "§4.1: a generated service package may only be imported from src/features//contracts/*-contract-contribution.ts", + "comment": "§4.1: a generated service package may only be imported from src/features//contracts/*-contract-contribution.ts. Owner: frontend-platform.", "severity": "error", "from": { "path": "^src", @@ -125,7 +161,7 @@ }, { "name": "presentation-does-not-fetch-directly", - "comment": "§9.2 / appendix B: a page or hook never opens a socket, worker or HTTP adapter itself", + "comment": "§9.2 / appendix B: a page or hook never opens a socket, worker or HTTP adapter itself. Call the application API; bootstrap composes the adapter behind it.", "severity": "error", "from": { "path": "^src/(presentation|features/[^/]+/presentation)" @@ -134,9 +170,20 @@ "path": "^src/adapters/(http|realtime|service-worker|web-worker|storage)" } }, + { + "name": "unselected-realtime-runtime-is-not-composed", + "comment": "§9.2 / 12-10. Realtime and Web Push are NOT_SELECTED in the template (src/features/installed-runtime-capabilities.ts), so the composition root and the installed-feature registries do not import their concrete adapters. A project that selects one replaces this rule when it wires the runtime. Owner: frontend-platform.", + "severity": "error", + "from": { + "path": "^src/(bootstrap/|features/installed-feature-)" + }, + "to": { + "path": "^src/adapters/(realtime|web-push)/" + } + }, { "name": "generic-worker-has-no-network-or-credentials", - "comment": "§16.13 / §21.10: a CPU worker never imports HTTP, realtime or auth", + "comment": "§16.13 / §21.10: a CPU worker never imports HTTP, realtime or auth. Do the network call on the page side and post the data to the worker.", "severity": "error", "from": { "path": "^src/adapters/web-worker" @@ -167,9 +214,20 @@ "path": "^src/(application|features)" } }, + { + "name": "contracts-do-not-know-presentation-or-bootstrap", + "comment": "Q-6.7-12. `src/contracts` is shared vocabulary read by every layer, including the service worker and web worker builds. Importing presentation or the composition root from it would pull React and the whole app into those builds. There is no such import today; this keeps it that way.", + "severity": "error", + "from": { + "path": "^src/contracts" + }, + "to": { + "path": "^src/(presentation|bootstrap)" + } + }, { "name": "generic-presentation-does-not-compose-the-product", - "comment": "§4 / §9. Which features are installed is a product decision that belongs to bootstrap. Generic presentation reads the installed registries directly today; the paths below are the exact set that does so, frozen so the coupling cannot spread while the assembly is lifted into bootstrap.", + "comment": "§4 / §9. Which features are installed is a product decision that belongs to bootstrap. Exception: the generic presentation modules in pathNot read the installed registries today. The list names exact files, so a new module that reads a registry fails the gate. Owner: frontend-platform. Revisit when the assembly is lifted into bootstrap; remove each file from the list as it stops reading the registries.", "severity": "error", "from": { "path": "^src/presentation/", @@ -181,7 +239,7 @@ }, { "name": "adapters-do-not-know-other-concrete-adapters", - "comment": "docs/architecture/layers.md §4: a concrete adapter never depends on another concrete adapter. Only the adapter kernel is shared — `src/adapters/platform` (clock, abort primitive, capacity guard) and the browser-data result helpers. `query-cache` still reads two collaborator types from `cross-context-invalidation`; that edge is named here rather than left silent, and closes when those types are lifted to a port.", + "comment": "docs/architecture/layers.md §4: a concrete adapter never depends on another concrete adapter. The adapter kernel is shared on purpose and any adapter may import it: src/adapters/platform/** (clock, abort primitive, capacity guard), src/adapters/browser-file-storage/result.ts (browser-data result helpers) and src/adapters/cross-context-invalidation/index.ts (the cross-context invalidation transport and its types). Owner: frontend-platform. No new file-level exception is added here; a new shared primitive goes into src/adapters/platform/.", "severity": "error", "from": { "path": "^src/adapters/([^/]+)/" @@ -193,7 +251,7 @@ }, { "name": "adapter-groups-are-reached-through-their-barrel", - "comment": "어댑터 그룹의 공개 표면은 그 그룹의 index.ts다. 그룹 바깥(bootstrap, features, presentation)은 배럴만 import한다. 배럴이 없던 시절 bootstrap은 어댑터 내부 파일 15곳을 직접 겨눴고, 그래서 어떤 파일이 공개이고 어떤 파일이 내부 헬퍼인지 아무 데도 적혀 있지 않았다. 출발점에서 src/adapters를 뺀 이유는 어댑터끼리의 간선은 바로 위 adapters-do-not-know-other-concrete-adapters가 이미 담당하고, 커널(platform/**)은 파일 단위로 공유되기 때문이다 — scripts/check-adapter-inventory.ts가 네 소비자에게 platform/abortable-operation.ts로 해석되는 specifier를 직접 요구한다. 도착점에서 1단계 중첩 index.ts를 허용한 이유는 storage/indexeddb와 storage/opfs가 각자 독립적으로 제거 가능한 런타임이고(scripts/test-browser-file-storage-runtime-removal.ts), 그래서 각자의 배럴이 곧 경계이기 때문이다.", + "comment": "어댑터 그룹의 공개 표면은 그 그룹의 index.ts다. 그룹 바깥(bootstrap, features, presentation)은 배럴만 import한다. 배럴이 없던 시절 bootstrap은 어댑터 내부 파일 15곳을 직접 겨눴고, 그래서 어떤 파일이 공개이고 어떤 파일이 내부 헬퍼인지 아무 데도 적혀 있지 않았다. 출발점에서 src/adapters를 뺀 이유는 어댑터끼리의 간선은 바로 위 adapters-do-not-know-other-concrete-adapters가 이미 담당하고, 커널(platform/**)은 파일 단위로 공유되기 때문이다 — scripts/check-adapter-inventory.ts가 네 소비자에게 platform/abortable-operation.ts로 해석되는 specifier를 직접 요구한다. 예외: 도착점에서 storage/indexeddb/index.ts와 storage/opfs/index.ts만 서브배럴로 허용한다. 두 폴더는 browser-file-storage 번들의 런타임이고, 제거 드릴(scripts/test-browser-file-storage-runtime-removal.ts)은 그 번들 전체(browser-file-storage, browser-files, browser-transfer, cache-storage, storage/indexeddb, storage/opfs)를 함께 지운다. 최상위 storage 배럴(Web Storage)은 그 뒤에도 남아야 하므로 두 폴더를 재수출하지 않고, 그래서 각 서브배럴이 그 런타임의 공개 경계다. 다른 2단계 index.ts는 공개 배럴이 아니다(리뷰 12-07). 담당: frontend-platform. 재검토: 새 런타임을 따로 제거할 수 있게 만들 때 그 서브배럴을 이 목록에 추가한다.", "severity": "error", "from": { "path": "^src/", @@ -201,38 +259,89 @@ }, "to": { "path": "^src/adapters/[^/]+/", - "pathNot": "^src/adapters/[^/]+/index\\.ts$|^src/adapters/[^/]+/[^/]+/index\\.ts$" + "pathNot": "^src/adapters/[^/]+/index\\.ts$|^src/adapters/storage/(indexeddb|opfs)/index\\.ts$" + } + }, + { + "name": "features-do-not-import-other-features", + "comment": "A feature may depend on shared contracts/ports, but never on another feature concrete implementation.", + "severity": "error", + "from": { + "path": "^src/features/([^/]+)/" + }, + "to": { + "path": "^src/features/[^/]+/", + "pathNot": "^src/features/$1/" + } + }, + { + "name": "contexts-do-not-import-other-contexts", + "comment": "A bounded context may compose its own features and shared platform contracts, but not another context concrete implementation.", + "severity": "error", + "from": { + "path": "^src/contexts/([^/]+)/" + }, + "to": { + "path": "^src/contexts/[^/]+/", + "pathNot": "^src/contexts/$1/" + } + }, + { + "name": "feature-and-app-roots-do-not-reach-adapters", + "comment": "12-03. The graph checks one edge at a time, so a module that presentation may import must not re-export a concrete adapter: presentation would then reach it with every direct rule passing. That covers the files outside a feature's layer folders (src/features/*.ts, src/features//*.ts), src/contexts and src/apps. Inside a feature, only its adapters/ folder reaches src/adapters; the product composes adapters in bootstrap. Exception: src/features/feature-adapter-contribution.ts imports the InstalledHttpOperationExecutor type that bootstrap hands to feature adapters (type only). Owner: frontend-platform. Revisit when that type moves to an application port.", + "severity": "error", + "from": { + "path": "^src/(features/[^/]+\\.tsx?$|features/[^/]+/[^/]+\\.tsx?$|contexts/|apps/)", + "pathNot": "^src/features/feature-adapter-contribution\\.ts$" + }, + "to": { + "path": "^src/adapters/" + } + }, + { + "name": "presentation-does-not-import-apps-or-contexts", + "comment": "12-03. Apps and contexts compose features, including their runtime, so presentation importing them is a path around presentation-does-not-know-adapters. Exception: src/presentation/routes/app-router.tsx mounts the deployable app's route tree (src/apps/template-app.ts). Owner: frontend-platform. Revisit when the router is assembled in bootstrap together with the frozen generic-presentation-does-not-compose-the-product list.", + "severity": "error", + "from": { + "path": "^src/(presentation/|features/[^/]+/presentation/)", + "pathNot": "^src/presentation/routes/app-router\\.tsx$" + }, + "to": { + "path": "^src/(apps|contexts)/" + } + }, + { + "name": "observability-vendors-live-behind-adapters", + "comment": "Spec §24. Features, platform, application, domain, contracts and presentation emit observability only through the provider-neutral TelemetryPort. A vendor telemetry SDK may be imported only by an adapter-side transport under src/adapters.", + "severity": "error", + "from": { + "path": "^src/", + "pathNot": "^src/adapters/" + }, + "to": { + "path": "^(@sentry|@datadog|@opentelemetry|@newrelic|newrelic|@honeycombio|@bugsnag|bugsnag-js|@rollbar|rollbar|logrocket|@logrocket|@amplitude|posthog-js|mixpanel-browser|@segment|@elastic/apm-rum|@grafana/faro-web-sdk|@microsoft/applicationinsights-web)(/|$)" + } + }, + { + "name": "platform-kernel-is-product-neutral", + "comment": "Spec §4. src/platform holds product-neutral primitives (budgets, execution, telemetry pipeline, validation, error envelopes). It never reaches up into a concrete feature, context, adapter, bootstrap or presentation module. Exception: src/platform/routing composes deployable-app descriptors by type. Owner: frontend-platform. Revisit if routing gains a product-specific import.", + "severity": "error", + "from": { + "path": "^src/platform/", + "pathNot": "^src/platform/routing/" + }, + "to": { + "path": "^src/(features|contexts|apps|adapters|bootstrap|presentation|application)/" } }, { "name": "no-circular-dependencies", + "comment": "A cycle makes the modules impossible to load or remove one at a time. Move the shared part into a lower module that both import.", "severity": "error", "from": {}, "to": { "circular": true } } - ], - "options": { - "doNotFollow": { - "path": "node_modules" - }, - "exclude": { - "path": "^(dist|artifacts|tests/fixtures)" - }, - "enhancedResolveOptions": { - "exportsFields": [ - "exports" - ], - "conditionNames": [ - "import", - "require", - "node", - "default" - ] - }, - "tsConfig": { - "fileName": "tsconfig.app.json" - } - } + ] } diff --git a/.env.example b/.env.example index cae5252..47d6297 100644 --- a/.env.example +++ b/.env.example @@ -6,7 +6,7 @@ # Runtime configuration — API endpoints, auth mode, telemetry, capability # switches — is NOT here. It lives in `config/runtime/.json` and is # materialized into `dist/config.json` at build time, so it can be changed -# without rebuilding. See docs/architecture/layers.md. +# without rebuilding. See the "Runtime configuration" section of README.md. # # Copy to `.env.local` (git-ignored) to override locally. diff --git a/.gitea/workflows/quality-gates.yml b/.gitea/workflows/quality-gates.yml index 7ee13c9..893afdd 100644 --- a/.gitea/workflows/quality-gates.yml +++ b/.gitea/workflows/quality-gates.yml @@ -83,16 +83,14 @@ jobs: if: ${{ startsWith(gitea.ref, 'refs/tags/v') || (gitea.event_name == 'workflow_dispatch' && (inputs.stage == 'release' || inputs.stage == 'production' || inputs.stage == 'field')) }} runs-on: ubuntu-latest timeout-minutes: 45 - env: - HOSTING_BASE_URL: "${{ vars.HOSTING_BASE_URL }}" strategy: fail-fast: false matrix: include: - { gate: FE-GATE-012, name: bundle, browser: false } - { gate: FE-GATE-014, name: config-compatibility, browser: false } - - { gate: FE-GATE-019, name: hosting-header, browser: false } - { gate: FE-GATE-026, name: lab-performance, browser: true } + - { gate: FE-GATE-028, name: manual-accessibility-review, browser: false } steps: - uses: https://github.com/actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 with: @@ -142,6 +140,8 @@ jobs: corepack pnpm install --frozen-lockfile --ignore-scripts - name: Build candidate once and verify local evidence run: corepack pnpm ci:gate -- FE-GATE-015 + - name: Admit the candidate to the declared release target + run: corepack pnpm ci:gate -- FE-GATE-027 - name: Archive and validate the exact candidate file set id: candidate run: | @@ -369,15 +369,18 @@ jobs: production_gate: name: "${{ matrix.gate }} / ${{ matrix.name }}" - needs: promotion + needs: [immutable_build, promotion] if: ${{ gitea.event_name == 'workflow_dispatch' && (inputs.stage == 'production' || inputs.stage == 'field') }} runs-on: ubuntu-latest timeout-minutes: 45 + env: + HOSTING_BASE_URL: "${{ vars.HOSTING_BASE_URL }}" + CANDIDATE_ARCHIVE_SHA256: "${{ needs.immutable_build.outputs.archive_sha256 }}" strategy: fail-fast: false matrix: include: - - { gate: FE-GATE-016, name: rollback-drill } + - { gate: FE-GATE-019, name: hosting-header } - { gate: FE-GATE-021, name: runbook-boot-config } - { gate: FE-GATE-022, name: runbook-chunk-mismatch } - { gate: FE-GATE-023, name: runbook-api-degradation } @@ -394,6 +397,13 @@ jobs: run: | corepack enable corepack pnpm install --frozen-lockfile --ignore-scripts + - name: Download promoted release + uses: https://github.com/ChristopherHX/gitea-download-artifact@75635f32b4c1c41c4b3d64e8f85210112ed4c9c7 + with: + name: "promoted-release-${{ gitea.run_id }}-${{ gitea.run_attempt }}" + path: .release/promoted + - name: Verify and extract the candidate through one inode-bound operation + run: node scripts/verify-ci-candidate-archive.ts --archive ".release/promoted/release-candidate.tar.gz" --extract-to ".release/promoted-release" - name: Run blocking gate run: corepack pnpm ci:gate -- ${{ matrix.gate }} - name: Upload production gate evidence diff --git a/.gitignore b/.gitignore index 5376ded..80cdec8 100644 --- a/.gitignore +++ b/.gitignore @@ -37,3 +37,6 @@ artifacts/tests/visual/ # 다시 들어오지 못하게 막는다. 시험 기준 그림(tests/visual/**)과 # 화면에 쓰는 그림(public/**)은 각자 자리에 있으므로 여기 걸리지 않는다. /*.png + +# graphify knowledge-graph output (local analysis, not part of the product). +graphify-out/ diff --git a/.npmrc b/.npmrc index d9ca886..bb2997b 100644 --- a/.npmrc +++ b/.npmrc @@ -1,2 +1,2 @@ -engine-strict=true -save-exact=true +# pnpm 11 reads engineStrict and saveExact from pnpm-workspace.yaml, not from +# this file (review 13-09). Keep only npm-level settings such as registry auth here. diff --git a/README.md b/README.md index af69d01..b564535 100644 --- a/README.md +++ b/README.md @@ -25,8 +25,54 @@ corepack pnpm install --frozen-lockfile corepack pnpm dev ``` -Runtime-public settings live in `public/config.json` and are validated before -the product tree mounts. Client secrets are forbidden. +## Runtime configuration + +Runtime-public settings are validated against one schema before the product +tree mounts (`runtimeConfigV2ArtifactSchema` in +`src/contracts/release-artifacts.ts`). Client secrets are forbidden. + +The source of truth is `config/runtime/.json`, one file per +environment: `local`, `development`, `staging`, `production`. `corepack pnpm +build` writes `dist/config.json` from the selected profile +(`scripts/generate-runtime-config.ts`). `public/config.json` is only the local +profile for `corepack pnpm dev`; the build replaces it, so settings put there +never reach a deployment. Keep it equal to `config/runtime/local.json` plus +`BUILD_ID: local-build` and `RELEASE_ID: local-release`; +`tests/unit/deployment-admission.test.ts` fails when the two differ. + +Build and deploy variables, lowest precedence first: + +| Variable | Sets | Default | +| --- | --- | --- | +| `APP_PROFILE` | which `config/runtime/.json` is used | `local`; an empty value fails the build | +| `RUNTIME_API_BASE_URL` | `API_BASE_URL`, overriding the profile | the profile value | +| `RUNTIME_TELEMETRY_ENDPOINT` | `TELEMETRY_ENDPOINT`, overriding the profile | the profile value | +| `VITE_BUILD_ID` | `BUILD_ID` in the runtime config and the release manifest | `local-build` | +| `RELEASE_ID` | `RELEASE_ID` in the runtime config and the release manifest | `local-release` | +| `RELEASE_TARGET` | the environment FE-GATE-027 admits the build to; must equal `APP_PROFILE` | none; admission refuses without it | + +`verify:documentation` fails if this table stops naming a variable the build or +admission reads (`scripts/verify-documentation-readiness.ts`). + +Only the two `RUNTIME_*` values can differ from the reviewed profile. Anything +else changes by editing the profile file. Staging and production reject demo +auth and non-HTTPS endpoints. + +A production build and its admission check: + +```bash +APP_PROFILE=production \ +RUNTIME_API_BASE_URL=https://api.example.com/ \ +RUNTIME_TELEMETRY_ENDPOINT=https://telemetry.example.com/v1/events \ +VITE_BUILD_ID= RELEASE_ID= \ +corepack pnpm build +APP_PROFILE=production RELEASE_TARGET=production corepack pnpm check:release-admission +``` + +With `CI=true` the gate runner (`corepack pnpm ci:gate`) also requires +`VITE_COMMIT_SHA`, `SOURCE_DATE_EPOCH` and `CI_RUNNER_IMAGE` before it runs a +gate (`scripts/lib/build-environment.ts`, `scripts/run-ci-gate.ts`). The CI variable +list is in [`docs/operations/ci-quality-gates.md`](docs/operations/ci-quality-gates.md). ## TechLog experience @@ -130,6 +176,46 @@ hand-written: this sandbox. Run it any time to confirm the vendored contract has not drifted from what was last generated. +## Support scope + +Four tiers. The status words on the right are the ones the catalogs and +design documents use; the next table maps them. + +| Tier | What it covers | Status words | +| --- | --- | --- | +| Default | In the default build and covered by the merge gates: the TechLog Public and Studio shells and routes, the REST HTTP executor, TanStack Query server state, Local/Session Storage registries, cross-tab invalidation, runtime config profiles and the release manifest check, `AUTH_MODE=external` (`demo` only in local/development), and the typed message catalog. `dist/` is served by a static host ([`docs/architecture/static-delivery.md`](docs/architecture/static-delivery.md)) | `COMPOSED` | +| Optional (recipe) | Not installed. A project copies one of the recipes in `config/recipes/frontend-capability-recipes.json` and narrows it ([`docs/architecture/optional-adapter-recipes.md`](docs/architecture/optional-adapter-recipes.md)). `realtime`, `offline-indexeddb`, `service-worker-pwa` and `file-transfer` also ship a tested reference runtime that the default build leaves out | `RECIPE_AVAILABLE`, `NOT_INSTALLED`, `AVAILABLE_NOT_COMPOSED` | +| Experimental | Designed and decided, but the runtime is missing or unfinished; finish it before building on it. GraphQL, gRPC-Web, Connect-Web and Protobuf adapters, Range resumable download, IndexedDB query persistence, the local preview decode-safety probe. `src/features/local-draft-feature` is an architecture sample, not installed; so is `src/features/reference-feature`, the template's removable sample, whose screens this product deleted | `DESIGNED_NOT_IMPLEMENTED` | +| Not supported | Deliberately not selected, or browsers cannot guarantee it: SSR, app-managed background upload and download, directory selection, persistent file handles, product query persistence, exactly-once delivery between tabs | `NOT_SELECTED`, `PLATFORM_LIMITED` | + +The rows come from +[`docs/architecture/browser-data-capability-completion-ledger.md`](docs/architecture/browser-data-capability-completion-ledger.md), +[`docs/architecture/client-cache-and-storage.md`](docs/architecture/client-cache-and-storage.md) +and +[`docs/architecture/api-contract-schema-mapper-and-server-state.md`](docs/architecture/api-contract-schema-mapper-and-server-state.md). + +| Status word | Where it appears | Meaning | Tier | +| --- | --- | --- | --- | +| `COMPOSED` | capability ledger, design documents | wired into the default production path | Default | +| `INSTALLED` | a project's own recipe catalog (step 10 of the recipe procedure) | the project added the recipe | Default, for that project | +| `RECIPE_AVAILABLE` | recipe catalog `status` | a recipe exists to copy; nothing is installed | Optional | +| `NOT_INSTALLED` | recipe catalog `defaultStatus`; a `src/features//NOT_INSTALLED` marker file | not part of the build | Optional (recipe) or Experimental (feature) | +| `AVAILABLE_NOT_COMPOSED` | capability ledger; recipe `referenceRuntime.status` | code and tests exist; the default build leaves it out | Optional | +| `DESIGNED_NOT_IMPLEMENTED` | capability ledger, design documents | design approved, runtime missing | Experimental | +| `NOT_SELECTED` | capability ledger, design documents | deliberately not chosen | Not supported | +| `PLATFORM_LIMITED` | capability ledger | browsers cannot guarantee it; offered only behind a probe and a fallback, if at all | Not supported as a guarantee | + +Gate results (`PASS`, `PASS_SCOPED`, `UNVERIFIED`, `FAIL_UNVERIFIED`) are +verdicts on evidence, not support tiers. + +Browsers: the build targets Chrome and Edge 111, Firefox 128, and Safari and +iOS 16.4. That is the higher of Vite 8's default JavaScript target +(`baseline-widely-available`; `vite.config.ts` sets no `build.target`) and +the CSS targets of Tailwind CSS 4. There is no browserslist. The end-to-end +suite runs on the desktop Chromium, Firefox and WebKit builds that Playwright +1.62 pins, plus one Chromium phone-size smoke (`playwright.config.ts`). Older +versions inside the target range and real mobile browsers are not tested. + ## Architecture This repository is a **Frontend Application Foundation**: a starter/composition @@ -184,6 +270,31 @@ project-owned integrations. They are target designs and review findings; a capability is not treated as implemented until its branch acceptance criteria and executable gates pass. +## Documentation + +[`docs/README.md`](docs/README.md) sorts the documents into current contracts, +target designs and work history. + +### Files you can delete after copying + +These record how the template and this product were built. Nothing in the +build or the gates reads them, except the one file noted below +(`tests/unit/deletable-history-documents.test.ts` checks this). + +| Path | Contents | +| --- | --- | +| `docs/superpowers/` | past plans and specs | +| `docs/reviews/` | reviews. Keep `docs/reviews/adapters/INVENTORY.md`: `check:adapter-inventory` (FE-GATE-010) reads it | + +The template's own `SPEC.md`, `tasks/` and `CLAUDE.md` were never carried +into this repository (`docs/operations/template-sync-2026-09-29.md`). + +The reference feature is not in this list: deleting its directory alone +leaves tests, policy entries and CI scripts behind that fail the gates. +`scripts/test-sample-removal.ts` removes it from a copy of +the repository and lists everything that has to go with it (its header comment +and `SAMPLE_EXTRAS`); do the same in your project and run the gates. + ## Verification Common local checks: @@ -212,6 +323,11 @@ corepack pnpm exec playwright test tests/e2e/tech-log-public-discovery.spec.ts t corepack pnpm test:visual ``` +`drill:runbooks` stops at the first drill that is not `PASS`. Without provider +evidence every drill ends `UNVERIFIED` (exit 3), because a drill never reports +a check it could not run locally as `PASS`; see "Runbook jobs" in +[`docs/operations/ci-quality-gates.md`](docs/operations/ci-quality-gates.md). + `test:all` is the ordinary product-development loop and intentionally excludes host-level CI-runner assurance. Run `corepack pnpm test:system` only on the compatible Linux assurance host described in @@ -241,8 +357,8 @@ corepack pnpm exec playwright install --with-deps chromium firefox webkit Two gates intentionally need external evidence: -- `review:a11y-manual` needs a signed human keyboard/focus/screen-reader review - for all 27 registered routes: +- `review:a11y-manual` (release gate FE-GATE-028) needs a signed human + keyboard/focus/screen-reader review for all 27 registered routes: `NOT_FOUND`, `TECH_LOG_CASE`, `TECH_LOG_EXPLORE`, `TECH_LOG_EXPLORE_KIND`, `TECH_LOG_HOME`, `TECH_LOG_PROFILE`, `TECH_LOG_PROJECT`, `TECH_LOG_PROJECTS`, `TECH_LOG_PROJECT_ACTIVITY`, @@ -255,15 +371,19 @@ Two gates intentionally need external evidence: `TECH_LOG_STUDIO_NOT_FOUND`, `TECH_LOG_STUDIO_PUBLICATIONS`, `TECH_LOG_STUDIO_PUBLICATION_PREVIEW`, `TECH_LOG_TOPIC`. `verify:documentation` derives that list from the route registry and fails if - this paragraph falls behind it. + this paragraph falls behind it. The merge gate FE-GATE-009 runs only + `review:a11y-manual -- --format-only`, which checks that every route record + keeps the template's fields, reviewed or still pending. - `collect:web-vitals-evidence` stays `FAIL_UNVERIFIED` until a reviewed minimum eligible-sample threshold and 28 days of production data exist. -Live release verification additionally requires `HOSTING_BASE_URL`. +Live hosting verification (FE-GATE-019, production stage) requires +`HOSTING_BASE_URL` and a deployed promoted release; without it the result is +`UNVERIFIED`, not `PASS`. ## CI and evidence -The 27-gate registry is `config/ci/gates.json`; the Gitea workflow is +The gate registry is `config/ci/gates.json`; the Gitea workflow is `.gitea/workflows/quality-gates.yml`. It follows: ```text @@ -271,8 +391,61 @@ MERGE_READY -> RELEASE_READY -> PROD_PROMOTION_READY -> FIELD_SLO_READY ``` `DOCUMENTATION_READY` is independent. No gate is downgraded to a warning. + +The workflow runs on pull requests, pushes to `main`, and `v*` tags. The Git host of this repository may not have Actions enabled, so a pull +request can show no gate status at all; no status is not a pass. Until the +host runs the workflow and marks the merge gates as required checks, run the 13 +merge gates locally before merging (FE-GATE-008 and 009 need Playwright +browsers): + +```bash +for gate in 001 002 003 004 005 006 007 008 009 010 011 013 020; do + corepack pnpm ci:gate -- "FE-GATE-$gate" || break +done +``` Machine-readable evidence is written below `artifacts/`; generated evidence is ignored by Git while `.gitkeep` files preserve the taxonomy. Operational details are in `docs/operations/`, with incident procedures in `docs/runbooks/`. + +## Updating a copied project + +Template versions are Git tags `vX.Y.Z`. The template repository's +`CHANGELOG.md` lists the changes between tags, marks security fixes **[보안]** and contract changes +**[계약]** (backend, deployment, CI or feature code must change too), and names +the affected paths. + +Record where you started. The template suggests a one-line `.template-origin` +file; this repository records the same thing, more precisely, in +`template.lock.json` (`sourceRevision` and `sourceTree`), and every sync is +written up in `docs/operations/template-sync-*.md`. + +Take a template fix with Git. `cherry-pick` works even when your repository +does not share the template's history, because it merges against the picked +commit's parent: + +```bash +git remote add template