chore(review): 1103 게이트·드릴 조치 브랜치를 합친다

Refs: docs/reviews/2026-11-03-maturity-review/README.md 02-06 11-06 12-09 10-01 11-03~11-05 12-02 12-04 12-05 12-08 14-04 16-02

# Conflicts:
#	docs/manual/01-add-a-feature.md
#	docs/manual/02-decision-tables.md
#	docs/manual/reference/patterns.md
This commit is contained in:
DongHyeonka
2026-11-04 23:08:05 +09:00
106 changed files with 1180 additions and 992 deletions
+3
View File
@@ -12,6 +12,9 @@ artifacts/**/*.json
artifacts/**/*.xml
artifacts/**/*.txt
artifacts/**/*.sarif
# 1103/12-08. Step logs from check:scale:* and verify:extreme-scale. They were
# committed once, and every local merge-gate run rewrote them.
artifacts/**/*.log
artifacts/tests/e2e/
artifacts/tests/browser-capabilities/
artifacts/storybook/
+1 -1
View File
@@ -174,7 +174,7 @@ See
`docs/architecture/frontend-application-foundation.md`,
`docs/architecture/overview.md`, `docs/architecture/layers.md`, and
`docs/architecture/starter-experience.md`. The removable vertical slice is
under `src/features/reference-feature`; its domain, application input, HTTP
the reference sample, src/features/reference-feature; its domain, application input, HTTP
binding, contracts, route runtime, and presentation own their contributions.
The central installed catalogs only aggregate selected contributions. The
generic starter routes continue to typecheck, test, and build after that
-5
View File
@@ -1,5 +0,0 @@
$ node scripts/check-architecture.ts
Static import graph: 330 modules, 984 dependencies, all imports resolved
Architecture graph fixtures: 16 regression checks PASS
TypeScript-only source policy: PASS (src, scripts, tests, .storybook, recipes; no fixture exceptions)
Architecture fixtures: allowed PASS, 9 forbidden rejected
-1
View File
@@ -1 +0,0 @@
$ tsc --project tsconfig.app.json
-1
View File
@@ -1 +0,0 @@
$ tsc --project tsconfig.test.json
-20
View File
@@ -1,20 +0,0 @@
 RUN  v4.1.10 /shared/codebase/clean-architecture-frontend-template
✓ tests/unit/http-retry-lifecycle.test.ts (4 tests) 4ms
✓ tests/unit/realtime/bounded-polling-policy.test.ts (3 tests) 6ms
✓ tests/unit/realtime/realtime-reconnect-policy.test.ts (7 tests) 6ms
✓ tests/unit/retry-policy.test.ts (4 tests) 5ms
✓ tests/unit/realtime/bounded-poll-coordinator.test.ts (16 tests) 25ms
✓ tests/unit/realtime/live-poll-handoff-coordinator.test.ts (13 tests) 71ms
✓ tests/unit/resumable-upload-runtime.test.ts (18 tests) 87ms
✓ tests/unit/realtime/realtime-reconnect-coordinator.test.ts (25 tests) 32ms
✓ tests/unit/tanstack-cache-coordinator.test.ts (8 tests) 168ms
✓ tests/unit/resumable-upload-runtime-teardown.test.ts (4 tests) 163ms
✓ tests/unit/realtime/stream-coordinator.test.ts (36 tests) 625ms
 Test Files  11 passed (11)
 Tests  138 passed (138)
 Start at  08:27:14
 Duration  1.40s (transform 1.56s, setup 3.50s, import 2.09s, tests 1.19s, environment 2ms)
@@ -1,37 +0,0 @@
contract set: 0 package(s) sha256:ad6aab71fea6a9ff87cbd170b984b339965afc90d85bb57f87801c9e0c020da2
vite v8.1.5 building client environment for production...

transforming...✓ 2113 modules transformed.
rendering chunks...
computing gzip size...
dist/index.html 1.12 kB │ gzip: 0.45 kB
dist/.vite/manifest.json 8.11 kB │ gzip: 1.04 kB
dist/.vite/module-inventory.json 21.94 kB │ gzip: 3.15 kB
dist/assets/index-C0p5zoj4.css 39.62 kB │ gzip: 8.51 kB
dist/assets/installed-contract-contributions-CFHdeDEf.js 0.16 kB │ gzip: 0.15 kB
dist/assets/not-found-page-CHQA5rw5.js 0.45 kB │ gzip: 0.30 kB
dist/assets/reference-resource-status-page-t3RWROLD.js 0.51 kB │ gzip: 0.45 kB
dist/assets/use-reference-failure-action-BYb2UYeT.js 0.57 kB │ gzip: 0.37 kB
dist/assets/session-provider-CIR3Mmin.js 0.60 kB │ gzip: 0.39 kB
dist/assets/application-provider-_OkSTAcq.js 0.61 kB │ gzip: 0.34 kB
dist/assets/reference-resource-page-1-Q0DGen.js 1.21 kB │ gzip: 0.77 kB
dist/assets/reference-resource-detail-page-D5mbWw2a.js 1.23 kB │ gzip: 0.72 kB
dist/assets/async-state-CfvFHl3I.js 1.53 kB │ gzip: 0.49 kB
dist/assets/auth-example-page-htVwyPYW.js 1.78 kB │ gzip: 0.94 kB
dist/assets/context-routes-CEM0c3Wb.js 1.80 kB │ gzip: 0.70 kB
dist/assets/server-state-DQADfngu.js 2.24 kB │ gzip: 0.90 kB
dist/assets/home-page-a_jMrdst.js 2.37 kB │ gzip: 1.27 kB
dist/assets/state-gallery-page-CunviFji.js 2.70 kB │ gzip: 1.22 kB
dist/assets/reference-resource-form-page-BHq_gRJf.js 2.77 kB │ gzip: 1.50 kB
dist/assets/installed-feature-contracts-DgTAlLr2.js 4.52 kB │ gzip: 1.43 kB
dist/assets/ui-gallery-page-Ru0CrH32.js 8.09 kB │ gzip: 2.90 kB
dist/assets/platform-overview-page-BgxC-c_W.js 11.90 kB │ gzip: 4.08 kB
dist/assets/route-input-DpW3PpRj.js 19.72 kB │ gzip: 6.27 kB
dist/assets/use-reference-feature-DkrwJNPz.js 23.75 kB │ gzip: 8.06 kB
dist/assets/preload-helper-ChbRSsLi.js 101.06 kB │ gzip: 27.93 kB
dist/assets/design-system-Bd1NzELd.js 213.52 kB │ gzip: 65.78 kB
dist/assets/index-zhAbJ8ef.js 294.86 kB │ gzip: 91.72 kB
✓ built in 361ms
runtime config: local profile written to dist/config.json (APP_ENV=local, AUTH_MODE=demo)
service worker mode null: skipping worker build
@@ -1,2 +0,0 @@
app build input: app=template-app contexts=1 features=1 generatedImports=1 bundle=1 feature dirs PASS
$ node scripts/check-app-build-input.ts --require-bundle
@@ -1,2 +0,0 @@
app build input: app=template-app contexts=1 features=1 generatedImports=1 bundle=not checked PASS
$ node scripts/check-app-build-input.ts
@@ -1,5 +0,0 @@
Static import graph: 363 modules, 1043 dependencies, all imports resolved
Architecture graph fixtures: 16 regression checks PASS
TypeScript-only source policy: PASS (src, scripts, tests, .storybook, recipes; no fixture exceptions)
Architecture fixtures: allowed PASS, 9 forbidden rejected
$ node scripts/check-architecture.ts
@@ -1,2 +0,0 @@
Diagnostics contract: 8 diagnostics and 5 telemetry producers PASS
$ node scripts/check-diagnostics.ts
@@ -1 +0,0 @@
$ node scripts/generate-product-feature-index.ts --check
@@ -1,23 +0,0 @@
 RUN  v4.1.10 /shared/codebase/clean-architecture-frontend-template
✓ tests/platform/telemetry/telemetry-port.test.ts (3 tests) 8ms
✓ tests/platform/telemetry/redact-telemetry.test.ts (14 tests) 17ms
✓ tests/platform/telemetry/telemetry-buffer.test.ts (8 tests) 22ms
✓ tests/platform/validation/validation-budget.test.ts (7 tests) 10ms
✓ tests/platform/telemetry/telemetry-deduplicator.test.ts (8 tests) 13ms
✓ tests/architecture/observability-boundaries.test.ts (4 tests) 142ms
✓ tests/platform/errors/platform-errors.test.ts (16 tests) 23ms
✓ tests/platform/telemetry/trace-context.test.ts (6 tests) 63ms
✓ tests/platform/validation/bounded-json.test.ts (10 tests) 107ms
✓ tests/platform/errors/app-error.test.ts (10 tests) 7ms
✓ tests/platform/errors/failure-boundary.test.tsx (4 tests) 55ms
✓ tests/platform/telemetry/telemetry-pipeline.test.ts (9 tests) 785ms
✓ bounds network sends during a repeated error storm  718ms
 Test Files  12 passed (12)
 Tests  99 passed (99)
 Start at  13:29:27
 Duration  1.58s (transform 1.38s, setup 3.81s, import 1.84s, tests 1.25s, environment 902ms)
$ node scripts/run-vitest.ts run tests/platform/errors tests/platform/validation tests/platform/telemetry tests/architecture/observability-boundaries.test.ts --reporter=default
@@ -1,2 +0,0 @@
Registry governance: 11 registries PASS; compatibility=breaking
$ node scripts/check-registries.ts
@@ -1,16 +0,0 @@
 RUN  v4.1.10 /shared/codebase/clean-architecture-frontend-template
✓ tests/platform/release/release-coherence.test.ts (10 tests) 9ms
✓ tests/platform/release/release-mismatch-recovery.test.ts (10 tests) 14ms
✓ tests/release/old-asset-reachability.test.ts (4 tests) 8ms
✓ tests/platform/release/cache-policy.test.ts (5 tests) 39ms
✓ tests/release/release-matrix.test.ts (7 tests) 48ms
✓ tests/release/mixed-replica.test.ts (7 tests) 69ms
 Test Files  6 passed (6)
 Tests  43 passed (43)
 Start at  13:29:30
 Duration  914ms (transform 1.31s, setup 1.45s, import 2.18s, tests 187ms, environment 1ms)
$ node scripts/run-vitest.ts run tests/platform/release tests/release --reporter=default
@@ -1,3 +0,0 @@
request fan-out: 77 files scanned, 0 per-row dispatches PASS
request fan-out fixtures: forbidden 3 rejected in 3 files, allowed 0 violations PASS
$ node scripts/check-request-fanout.ts && node scripts/check-request-fanout.ts --fixture
@@ -1,4 +0,0 @@
compatibility: structural=true compiler=true timing=true
axes: absolute 28 (ok), growth 8 (ok), relative 16 compiler + 12 timing
scale baseline gate: PASSED (artifacts/scale/baseline-comparison.json)
$ node scripts/scale/check-scale-baseline.ts
@@ -1,10 +0,0 @@
PASSED main:architecture-topology (3173ms)
PASSED main:traffic-budgets (1489ms)
PASSED main:scale-units (2433ms)
PASSED main:composition-s0-s1 (91ms)
PASSED main:composition-s0-s2 (232ms)
PASSED main:composition-scale-suite (941ms)
PASSED main:typescript-diagnostics (1543ms)
PASSED main:baseline-regression (1739ms)
scale tier main: PASSED (artifacts/scale/main/summary.json)
$ node scripts/scale/run-scale-profile.ts main
@@ -1,14 +0,0 @@
PASSED nightly:architecture-topology (3175ms)
PASSED nightly:traffic-budgets (1393ms)
PASSED nightly:scale-units (2435ms)
PASSED nightly:composition-s0-s1 (90ms)
PASSED nightly:composition-s0-s2 (226ms)
PASSED nightly:composition-scale-suite (861ms)
PASSED nightly:typescript-diagnostics (1552ms)
PASSED nightly:baseline-regression (1750ms)
PASSED nightly:topology-s3-s4 (6995ms)
PASSED nightly:telemetry-storm (3703ms)
PASSED nightly:session-cycles (1703ms)
PASSED nightly:browser-soak (121407ms)
scale tier nightly: PASSED (artifacts/scale/nightly/summary.json)
$ node scripts/scale/run-scale-profile.ts nightly
@@ -1,6 +0,0 @@
PASSED pr:architecture-topology (4307ms)
PASSED pr:traffic-budgets (1446ms)
PASSED pr:scale-units (2377ms)
PASSED pr:composition-s0-s1 (87ms)
scale tier pr: PASSED (artifacts/scale/pr/summary.json)
$ node scripts/scale/run-scale-profile.ts pr
@@ -1,13 +0,0 @@
PASSED release:release-coherence (1123ms)
PASSED release:architecture-topology (3142ms)
PASSED release:traffic-budgets (1432ms)
PASSED release:scale-units (2318ms)
PASSED release:composition-s0-s1 (95ms)
PASSED release:composition-s0-s2 (235ms)
PASSED release:composition-scale-suite (843ms)
PASSED release:typescript-diagnostics (1499ms)
PASSED release:baseline-regression (1820ms)
PASSED release:topology-s3-s4 (7137ms)
PASSED release:telemetry-storm (3364ms)
scale tier release: PASSED (artifacts/scale/release/summary.json)
$ node scripts/scale/run-scale-profile.ts release
@@ -1,19 +0,0 @@
 RUN  v4.1.10 /shared/codebase/clean-architecture-frontend-template
✓ tests/platform/cardinality/cardinality-budget.test.ts (3 tests) 7ms
✓ tests/platform/cardinality/compose-unique-record.test.ts (2 tests) 9ms
✓ tests/architecture/context-lazy-loading.test.ts (1 test) 6ms
✓ tests/platform/routing/context-route-module.test.ts (3 tests) 9ms
✓ tests/architecture/topology-cardinality.test.ts (9 tests) 13ms
✓ tests/platform/cardinality/extreme-scale-registry.test.ts (3 tests) 2363ms
✓ keeps 10k -> 100k composition growth below a quadratic regression budget  391ms
✓ keeps one million lookups bounded on a 100k-entry runtime registry  1515ms
✓ selects and resolves 100k feature ids within the membership budget  455ms
 Test Files  6 passed (6)
 Tests  21 passed (21)
 Start at  13:29:21
 Duration  2.94s (transform 231ms, setup 1.63s, import 305ms, tests 2.41s, environment 1ms)
$ node scripts/run-vitest.ts run tests/architecture/topology-cardinality.test.ts tests/architecture/context-lazy-loading.test.ts tests/platform/cardinality tests/platform/routing --reporter=default
@@ -1,21 +0,0 @@
 RUN  v4.1.10 /shared/codebase/clean-architecture-frontend-template
✓ tests/platform/traffic/request-budget.test.ts (7 tests) 17ms
✓ tests/platform/resilience/retry-budget.test.ts (6 tests) 7ms
✓ tests/platform/resilience/deadline.test.ts (3 tests) 6ms
✓ tests/platform/traffic/concurrency-budget.test.ts (6 tests) 11ms
✓ tests/platform/execution/execution-context.test.ts (10 tests) 11ms
✓ tests/platform/traffic/traffic-budget.test.ts (9 tests) 11ms
✓ tests/platform/traffic/operation-traffic-policy.test.ts (7 tests) 10ms
✓ tests/platform/traffic/request-fanout.test.ts (6 tests) 49ms
✓ tests/platform/traffic/request-deduplication.test.ts (3 tests) 47ms
✓ tests/platform/traffic/http-budget-integration.test.ts (9 tests) 130ms
✓ tests/platform/traffic/traffic-amplification.test.ts (3 tests) 391ms
 Test Files  11 passed (11)
 Tests  69 passed (69)
 Start at  13:29:25
 Duration  1.34s (transform 858ms, setup 4.17s, import 1.44s, tests 690ms, environment 2ms)
$ node scripts/run-vitest.ts run tests/platform/execution tests/platform/traffic tests/platform/resilience --reporter=default
@@ -1 +0,0 @@
$ tsc --project tsconfig.app.json
@@ -1 +0,0 @@
$ tsc --project tsconfig.test.json
@@ -1,7 +0,0 @@
$ corepack pnpm check:types:app && corepack pnpm check:types:node && corepack pnpm check:types:test && corepack pnpm check:types:recipes && corepack pnpm check:types:web-worker && corepack pnpm check:types:service-worker
$ tsc --project tsconfig.app.json
$ tsc --project tsconfig.node.json
$ tsc --project tsconfig.test.json
$ node scripts/check-optional-recipe-types.ts
$ tsc --project tsconfig.web-worker.json
$ tsc --project tsconfig.service-worker.json
@@ -1 +0,0 @@
$ eslint src scripts tests recipes .storybook vite.config.ts vitest.config.ts playwright*.config.ts --max-warnings=0
@@ -1,23 +0,0 @@
 RUN  v4.1.10 /shared/codebase/clean-architecture-frontend-template
✓ tests/scripts/generate-product-feature-index.test.ts (8 tests) 41ms
✓ tests/platform/traffic/request-deduplication.test.ts (3 tests) 54ms
✓ tests/platform/traffic/request-fanout.test.ts (6 tests) 56ms
✓ tests/architecture/request-fanout.test.ts (4 tests) 194ms
✓ tests/features/reference-feature/reference-request-deduplication.test.ts (3 tests) 50ms
✓ tests/features/reference-feature/reference-request-fanout.test.ts (8 tests) 68ms
✓ tests/architecture/app-build-input.test.ts (4 tests) 2380ms
✓ accepts the production generator's output and an app-local bundle  771ms
✓ rejects a generator regression that imports every discovered feature  673ms
✓ rejects a production bundle that contains another app's feature  643ms
✓ tests/scale/global-local-independence.test.ts (7 tests) 7755ms
✓ keeps App A's generated indexes and reachable source graph identical from S0 to S2 on disk  5260ms
✓ selects another app from the same repository without App A's features  982ms
 Test Files  8 passed (8)
 Tests  43 passed (43)
 Start at  13:29:12
 Duration  8.30s (transform 919ms, setup 1.94s, import 1.61s, tests 10.60s, environment 1ms)
$ node scripts/run-vitest.ts run tests/scale/global-local-independence.test.ts tests/architecture/app-build-input.test.ts tests/architecture/request-fanout.test.ts tests/platform/traffic/request-fanout.test.ts tests/platform/traffic/request-deduplication.test.ts tests/features/reference-feature/reference-request-fanout.test.ts tests/features/reference-feature/reference-request-deduplication.test.ts tests/scripts/generate-product-feature-index.test.ts --reporter=default
@@ -1,55 +0,0 @@
 RUN  v4.1.10 /shared/codebase/clean-architecture-frontend-template
✓ tests/architecture/app-build-input.test.ts (4 tests) 9429ms
✓ accepts the production generator's output and an app-local bundle  1340ms
✓ rejects a generator regression that imports every discovered feature  5122ms
✓ rejects a production bundle that contains another app's feature  2464ms
✓ tests/platform/cardinality/extreme-scale-registry.test.ts (3 tests) 3975ms
✓ keeps 10k -> 100k composition growth below a quadratic regression budget  634ms
✓ keeps one million lookups bounded on a 100k-entry runtime registry  2331ms
✓ selects and resolves 100k feature ids within the membership budget  1007ms
✓ tests/platform/telemetry/telemetry-pipeline.test.ts (9 tests) 1077ms
✓ bounds network sends during a repeated error storm  961ms
✓ tests/platform/traffic/traffic-amplification.test.ts (3 tests) 558ms
✓ keeps physical requests bounded when every dispatch fails  307ms
✓ tests/architecture/request-fanout.test.ts (4 tests) 344ms
✓ finds no per-row dispatch in feature code or application use cases  330ms
✓ tests/architecture/observability-boundaries.test.ts (4 tests) 235ms
✓ tests/platform/traffic/http-budget-integration.test.ts (9 tests) 133ms
✓ tests/platform/validation/bounded-json.test.ts (10 tests) 140ms
✓ tests/platform/telemetry/trace-context.test.ts (6 tests) 82ms
✓ tests/platform/errors/failure-boundary.test.tsx (4 tests) 87ms
✓ tests/platform/traffic/request-fanout.test.ts (6 tests) 75ms
✓ tests/platform/traffic/request-deduplication.test.ts (3 tests) 74ms
✓ tests/platform/release/cache-policy.test.ts (5 tests) 40ms
✓ tests/platform/errors/platform-errors.test.ts (16 tests) 19ms
✓ tests/platform/telemetry/telemetry-buffer.test.ts (8 tests) 20ms
✓ tests/platform/telemetry/redact-telemetry.test.ts (14 tests) 14ms
✓ tests/platform/traffic/request-budget.test.ts (7 tests) 7ms
✓ tests/platform/release/release-mismatch-recovery.test.ts (10 tests) 12ms
✓ tests/architecture/topology-cardinality.test.ts (9 tests) 10ms
✓ tests/platform/telemetry/telemetry-deduplicator.test.ts (8 tests) 9ms
✓ tests/platform/traffic/concurrency-budget.test.ts (6 tests) 11ms
✓ tests/platform/execution/execution-context.test.ts (10 tests) 12ms
✓ tests/platform/traffic/traffic-budget.test.ts (9 tests) 8ms
✓ tests/platform/validation/validation-budget.test.ts (7 tests) 11ms
✓ tests/platform/traffic/operation-traffic-policy.test.ts (7 tests) 11ms
✓ tests/platform/routing/context-route-module.test.ts (3 tests) 10ms
✓ tests/platform/release/release-coherence.test.ts (10 tests) 13ms
✓ tests/platform/cardinality/compose-unique-record.test.ts (2 tests) 5ms
✓ tests/platform/telemetry/telemetry-port.test.ts (3 tests) 6ms
✓ tests/platform/resilience/retry-budget.test.ts (6 tests) 5ms
✓ tests/platform/errors/app-error.test.ts (10 tests) 6ms
✓ tests/platform/cardinality/cardinality-budget.test.ts (3 tests) 7ms
✓ tests/architecture/context-lazy-loading.test.ts (1 test) 6ms
✓ tests/platform/resilience/deadline.test.ts (3 tests) 7ms
✓ tests/architecture/module-hierarchy.test.ts (1 test) 6ms
 Test Files  35 passed (35)
 Tests  223 passed (223)
 Start at  13:29:32
 Duration  33.44s (transform 977ms, setup 7.36s, import 2.52s, tests 16.46s, environment 1.01s)
JUNIT report written to /shared/codebase/clean-architecture-frontend-template/artifacts/tests/platform.xml
$ node scripts/run-vitest.ts run tests/platform tests/architecture --no-file-parallelism --reporter=default --reporter=junit --outputFile.junit=artifacts/tests/platform.xml
@@ -1,30 +0,0 @@
 RUN  v4.1.10 /shared/codebase/clean-architecture-frontend-template
✓ tests/features/reference-feature/reference-error.test.ts (3 tests) 102ms
✓ tests/features/reference-feature/reference-telemetry.test.ts (4 tests) 55ms
✓ tests/features/reference-feature/reference-http-problem-mapping.test.ts (6 tests) 12ms
✓ tests/features/reference-feature/reference-request-deduplication.test.ts (3 tests) 112ms
✓ tests/features/reference-feature/reference-request-fanout.test.ts (8 tests) 189ms
✓ tests/features/reference-feature/reference-traffic-policy.test.ts (1 test) 9ms
✓ tests/features/reference-feature/installed-context-routing.test.ts (2 tests) 108ms
✓ tests/features/reference-feature/reference-contract.test.ts (7 tests) 35ms
✓ tests/features/reference-feature/feature-module.test.ts (1 test) 6ms
✓ tests/features/reference-feature/reference-http-gateway.test.ts (2 tests) 8ms
✓ tests/features/reference-feature/reference-installed-executor.test.ts (1 test) 7ms
✓ tests/features/reference-feature/reference-diagnostics.test.ts (1 test) 81ms
✓ tests/features/reference-feature/reference-runtime-composition.test.ts (3 tests) 201ms
✓ tests/features/reference-feature/reference-production-vertical.test.tsx (1 test) 1243ms
✓ traverses bootstrap, router, application, HTTP schema/mapper and query cache  1237ms
✓ tests/features/reference-feature/reference-page.test.tsx (11 tests) 3248ms
✓ mounts list and detail keys under the installed governed namespace  1035ms
✓ renders backend forbidden even when the client access hint allowed entry  423ms
✓ deduplicates create, preserves input and surfaces a conflict  584ms
 Test Files  15 passed (15)
 Tests  54 passed (54)
 Start at  13:30:06
 Duration  7.80s (transform 13.26s, setup 7.90s, import 20.03s, tests 5.42s, environment 2.84s)
JUNIT report written to /shared/codebase/clean-architecture-frontend-template/artifacts/tests/reference-feature.xml
$ node scripts/run-vitest.ts run tests/features/reference-feature --reporter=default --reporter=junit --outputFile.junit=artifacts/tests/reference-feature.xml --passWithNoTests
@@ -1,25 +0,0 @@
 RUN  v4.1.10 /shared/codebase/clean-architecture-frontend-template
✓ tests/platform/cardinality/cardinality-budget.test.ts (3 tests) 6ms
✓ tests/platform/cardinality/compose-unique-record.test.ts (2 tests) 7ms
✓ tests/architecture/module-hierarchy.test.ts (1 test) 5ms
✓ tests/architecture/context-lazy-loading.test.ts (1 test) 6ms
✓ tests/platform/routing/context-route-module.test.ts (3 tests) 10ms
✓ tests/architecture/topology-cardinality.test.ts (9 tests) 11ms
✓ tests/architecture/observability-boundaries.test.ts (4 tests) 97ms
✓ tests/architecture/request-fanout.test.ts (4 tests) 206ms
✓ tests/platform/cardinality/extreme-scale-registry.test.ts (3 tests) 2005ms
✓ keeps 10k -> 100k composition growth below a quadratic regression budget  407ms
✓ keeps one million lookups bounded on a 100k-entry runtime registry  1229ms
✓ selects and resolves 100k feature ids within the membership budget  366ms
✓ tests/architecture/app-build-input.test.ts (4 tests) 2215ms
✓ accepts the production generator's output and an app-local bundle  714ms
✓ rejects a generator regression that imports every discovered feature  626ms
✓ rejects a production bundle that contains another app's feature  613ms
 Test Files  10 passed (10)
 Tests  34 passed (34)
 Start at  13:30:24
 Duration  2.82s (transform 645ms, setup 2.94s, import 949ms, tests 4.57s, environment 2ms)
@@ -1,3 +0,0 @@
compatibility: structural=true compiler=true timing=true
axes: absolute 28 (ok), growth 8 (ok), relative 16 compiler + 12 timing
scale baseline gate: PASSED (artifacts/scale/main/baseline-regression.json)
@@ -1,5 +0,0 @@
PASS registry-composition:growth (exponents 0.00)
PASS product-feature-selection:growth (exponents 0.00)
PASS product-feature-resolution:growth (exponents 0.00)
PASS context-hierarchy-composition:growth (exponents 0.00)
composition scale artifact: /shared/codebase/clean-architecture-frontend-template/artifacts/scale/main/composition-s0-s1.json
@@ -1,5 +0,0 @@
PASS registry-composition:growth (exponents 0.00, 0.64)
PASS product-feature-selection:growth (exponents 0.00, 0.83)
PASS product-feature-resolution:growth (exponents 0.00, 0.83)
PASS context-hierarchy-composition:growth (exponents 0.00, 0.34)
composition scale artifact: /shared/codebase/clean-architecture-frontend-template/artifacts/scale/main/composition-s0-s2.json
@@ -1,11 +0,0 @@
 RUN  v4.1.10 /shared/codebase/clean-architecture-frontend-template
✓ tests/scale/tsc-diagnostics-parser.test.ts (3 tests) 7ms
✓ tests/scale/composition-scale.test.ts (6 tests) 232ms
 Test Files  2 passed (2)
 Tests  9 passed (9)
 Start at  13:30:31
 Duration  596ms (transform 94ms, setup 326ms, import 114ms, tests 239ms, environment 0ms)
-17
View File
@@ -1,17 +0,0 @@
 RUN  v4.1.10 /shared/codebase/clean-architecture-frontend-template
✓ tests/scale/growth-regression.test.ts (7 tests) 6ms
✓ tests/scale/traffic/retry-after-jitter.test.ts (5 tests) 38ms
✓ tests/scale/traffic/amplification-metrics.test.ts (6 tests) 5ms
✓ tests/scale/benchmark.test.ts (4 tests) 8ms
✓ tests/scale/synthetic-topology.test.ts (8 tests) 8ms
✓ tests/scale/scale-baseline.test.ts (11 tests) 11ms
✓ tests/scale/traffic/failure-scenarios.test.ts (5 tests) 1420ms
✓ bounds physical requests when all upstream calls fail  896ms
 Test Files  7 passed (7)
 Tests  46 passed (46)
 Start at  13:30:29
 Duration  2.04s (transform 695ms, setup 1.76s, import 808ms, tests 1.50s, environment 1ms)
-20
View File
@@ -1,20 +0,0 @@
 RUN  v4.1.10 /shared/codebase/clean-architecture-frontend-template
✓ tests/platform/resilience/deadline.test.ts (3 tests) 4ms
✓ tests/platform/traffic/request-budget.test.ts (7 tests) 5ms
✓ tests/platform/resilience/retry-budget.test.ts (6 tests) 7ms
✓ tests/platform/traffic/concurrency-budget.test.ts (6 tests) 11ms
✓ tests/platform/traffic/traffic-budget.test.ts (9 tests) 10ms
✓ tests/platform/execution/execution-context.test.ts (10 tests) 9ms
✓ tests/platform/traffic/operation-traffic-policy.test.ts (7 tests) 9ms
✓ tests/platform/traffic/request-fanout.test.ts (6 tests) 59ms
✓ tests/platform/traffic/request-deduplication.test.ts (3 tests) 47ms
✓ tests/platform/traffic/http-budget-integration.test.ts (9 tests) 124ms
✓ tests/platform/traffic/traffic-amplification.test.ts (3 tests) 379ms
 Test Files  11 passed (11)
 Tests  69 passed (69)
 Start at  13:30:27
 Duration  1.13s (transform 1.01s, setup 3.62s, import 1.55s, tests 663ms, environment 2ms)
@@ -1,5 +0,0 @@
tsc app: files=827 types=279186 instantiations=700415
PASS tsc:types (exponents 0.84, 0.96)
PASS tsc:symbols (exponents 0.51, 0.80)
PASS tsc:instantiations (exponents 0.97, 0.99)
tsc diagnostics artifact: /shared/codebase/clean-architecture-frontend-template/artifacts/scale/main/typescript-diagnostics.json
@@ -1,25 +0,0 @@
 RUN  v4.1.10 /shared/codebase/clean-architecture-frontend-template
✓ tests/platform/cardinality/compose-unique-record.test.ts (2 tests) 5ms
✓ tests/platform/cardinality/cardinality-budget.test.ts (3 tests) 5ms
✓ tests/architecture/module-hierarchy.test.ts (1 test) 6ms
✓ tests/architecture/context-lazy-loading.test.ts (1 test) 7ms
✓ tests/platform/routing/context-route-module.test.ts (3 tests) 8ms
✓ tests/architecture/topology-cardinality.test.ts (9 tests) 13ms
✓ tests/architecture/observability-boundaries.test.ts (4 tests) 109ms
✓ tests/architecture/request-fanout.test.ts (4 tests) 151ms
✓ tests/platform/cardinality/extreme-scale-registry.test.ts (3 tests) 1946ms
✓ keeps 10k -> 100k composition growth below a quadratic regression budget  378ms
✓ keeps one million lookups bounded on a 100k-entry runtime registry  1201ms
✓ selects and resolves 100k feature ids within the membership budget  365ms
✓ tests/architecture/app-build-input.test.ts (4 tests) 2219ms
✓ accepts the production generator's output and an app-local bundle  671ms
✓ rejects a generator regression that imports every discovered feature  648ms
✓ rejects a production bundle that contains another app's feature  649ms
 Test Files  10 passed (10)
 Tests  34 passed (34)
 Start at  13:30:41
 Duration  2.82s (transform 580ms, setup 3.20s, import 787ms, tests 4.47s, environment 2ms)
@@ -1,3 +0,0 @@
compatibility: structural=true compiler=true timing=true
axes: absolute 28 (ok), growth 8 (ok), relative 16 compiler + 12 timing
scale baseline gate: PASSED (artifacts/scale/nightly/baseline-regression.json)
-12
View File
@@ -1,12 +0,0 @@
browser soak: passed classification=stable samples=24 cycles=2012
PASS cycles (2012 >= 200)
PASS post-warmup samples (18 >= 3)
PASS navigation (0 failures)
PASS heap slope (stable)
PASS listeners (stable, delta 2)
PASS timers (delta 0, max 2)
PASS in-flight settles (final 0, max 0)
PASS storage growth (keys 0, bytes 0)
PASS backend failure exercised (68 settled visits, 479 API requests, 24 telemetry events)
PASS request amplification (479 requests / 336 visits)
PASS telemetry rate (max 14/min, 24 posts, 24 events)
@@ -1,5 +0,0 @@
PASS registry-composition:growth (exponents 0.00)
PASS product-feature-selection:growth (exponents 0.00)
PASS product-feature-resolution:growth (exponents 0.00)
PASS context-hierarchy-composition:growth (exponents 0.00)
composition scale artifact: /shared/codebase/clean-architecture-frontend-template/artifacts/scale/nightly/composition-s0-s1.json
@@ -1,5 +0,0 @@
PASS registry-composition:growth (exponents 0.00, 0.64)
PASS product-feature-selection:growth (exponents 0.00, 0.85)
PASS product-feature-resolution:growth (exponents 0.00, 0.83)
PASS context-hierarchy-composition:growth (exponents 0.00, 0.34)
composition scale artifact: /shared/codebase/clean-architecture-frontend-template/artifacts/scale/nightly/composition-s0-s2.json
@@ -1,11 +0,0 @@
 RUN  v4.1.10 /shared/codebase/clean-architecture-frontend-template
✓ tests/scale/tsc-diagnostics-parser.test.ts (3 tests) 6ms
✓ tests/scale/composition-scale.test.ts (6 tests) 191ms
 Test Files  2 passed (2)
 Tests  9 passed (9)
 Start at  13:30:48
 Duration  514ms (transform 78ms, setup 296ms, import 81ms, tests 197ms, environment 0ms)
-17
View File
@@ -1,17 +0,0 @@
 RUN  v4.1.10 /shared/codebase/clean-architecture-frontend-template
✓ tests/scale/traffic/retry-after-jitter.test.ts (5 tests) 34ms
✓ tests/scale/traffic/amplification-metrics.test.ts (6 tests) 6ms
✓ tests/scale/benchmark.test.ts (4 tests) 8ms
✓ tests/scale/growth-regression.test.ts (7 tests) 6ms
✓ tests/scale/synthetic-topology.test.ts (8 tests) 8ms
✓ tests/scale/scale-baseline.test.ts (11 tests) 14ms
✓ tests/scale/traffic/failure-scenarios.test.ts (5 tests) 1453ms
✓ bounds physical requests when all upstream calls fail  896ms
 Test Files  7 passed (7)
 Tests  46 passed (46)
 Start at  13:30:45
 Duration  2.07s (transform 436ms, setup 1.74s, import 563ms, tests 1.53s, environment 1ms)
@@ -1,12 +0,0 @@
 RUN  v4.1.10 /shared/codebase/clean-architecture-frontend-template
✓ tests/scale/session/network-flap.test.ts (2 tests) 324ms
✓ tests/scale/session/long-session.test.ts (1 test) 921ms
✓ returns timers, listeners, leases, buffers and cache entries to a stable bound  919ms
 Test Files  2 passed (2)
 Tests  3 passed (3)
 Start at  13:31:03
 Duration  1.37s (transform 228ms, setup 296ms, import 363ms, tests 1.24s, environment 0ms)
@@ -1,19 +0,0 @@
 RUN  v4.1.10 /shared/codebase/clean-architecture-frontend-template
✓ tests/platform/telemetry/telemetry-port.test.ts (3 tests) 6ms
✓ tests/platform/telemetry/telemetry-deduplicator.test.ts (8 tests) 11ms
✓ tests/platform/telemetry/telemetry-buffer.test.ts (8 tests) 15ms
✓ tests/platform/telemetry/redact-telemetry.test.ts (14 tests) 11ms
✓ tests/platform/telemetry/trace-context.test.ts (6 tests) 43ms
✓ tests/platform/telemetry/telemetry-pipeline.test.ts (9 tests) 669ms
✓ bounds network sends during a repeated error storm  609ms
✓ tests/scale/telemetry/telemetry-storm.test.ts (4 tests) 2882ms
✓ does not turn 100000 identical failures into 100000 sends  748ms
✓ bounds sends and buffer when a storm has many distinct fingerprints  2099ms
 Test Files  7 passed (7)
 Tests  52 passed (52)
 Start at  13:30:59
 Duration  3.35s (transform 427ms, setup 1.75s, import 534ms, tests 3.64s, environment 1ms)
@@ -1,16 +0,0 @@
 RUN  v4.1.10 /shared/codebase/clean-architecture-frontend-template
✓ tests/platform/cardinality/extreme-scale-registry.test.ts (3 tests) 1822ms
✓ keeps 10k -> 100k composition growth below a quadratic regression budget  313ms
✓ keeps one million lookups bounded on a 100k-entry runtime registry  1163ms
✓ selects and resolves 100k feature ids within the membership budget  345ms
✓ tests/scale/global-local-independence.test.ts (7 tests) 6311ms
✓ keeps App A's generated indexes and reachable source graph identical from S0 to S2 on disk  4764ms
✓ selects another app from the same repository without App A's features  583ms
 Test Files  2 passed (2)
 Tests  10 passed (10)
 Start at  13:30:52
 Duration  6.64s (transform 87ms, setup 327ms, import 80ms, tests 8.13s, environment 0ms)
@@ -1,20 +0,0 @@
 RUN  v4.1.10 /shared/codebase/clean-architecture-frontend-template
✓ tests/platform/traffic/concurrency-budget.test.ts (6 tests) 9ms
✓ tests/platform/resilience/deadline.test.ts (3 tests) 4ms
✓ tests/platform/traffic/request-budget.test.ts (7 tests) 7ms
✓ tests/platform/resilience/retry-budget.test.ts (6 tests) 5ms
✓ tests/platform/traffic/traffic-budget.test.ts (9 tests) 8ms
✓ tests/platform/execution/execution-context.test.ts (10 tests) 10ms
✓ tests/platform/traffic/operation-traffic-policy.test.ts (7 tests) 9ms
✓ tests/platform/traffic/request-fanout.test.ts (6 tests) 41ms
✓ tests/platform/traffic/request-deduplication.test.ts (3 tests) 40ms
✓ tests/platform/traffic/http-budget-integration.test.ts (9 tests) 121ms
✓ tests/platform/traffic/traffic-amplification.test.ts (3 tests) 316ms
 Test Files  11 passed (11)
 Tests  69 passed (69)
 Start at  13:30:44
 Duration  1.04s (transform 890ms, setup 3.40s, import 1.40s, tests 570ms, environment 2ms)
@@ -1,5 +0,0 @@
tsc app: files=827 types=279186 instantiations=700415
PASS tsc:types (exponents 0.84, 0.96)
PASS tsc:symbols (exponents 0.51, 0.80)
PASS tsc:instantiations (exponents 0.97, 0.99)
tsc diagnostics artifact: /shared/codebase/clean-architecture-frontend-template/artifacts/scale/nightly/typescript-diagnostics.json
@@ -1,25 +0,0 @@
 RUN  v4.1.10 /shared/codebase/clean-architecture-frontend-template
✓ tests/architecture/module-hierarchy.test.ts (1 test) 14ms
✓ tests/architecture/topology-cardinality.test.ts (9 tests) 37ms
✓ tests/architecture/observability-boundaries.test.ts (4 tests) 210ms
✓ tests/architecture/context-lazy-loading.test.ts (1 test) 18ms
✓ tests/platform/cardinality/cardinality-budget.test.ts (3 tests) 22ms
✓ tests/platform/cardinality/compose-unique-record.test.ts (2 tests) 12ms
✓ tests/platform/routing/context-route-module.test.ts (3 tests) 11ms
✓ tests/architecture/request-fanout.test.ts (4 tests) 234ms
✓ tests/platform/cardinality/extreme-scale-registry.test.ts (3 tests) 2791ms
✓ keeps 10k -> 100k composition growth below a quadratic regression budget  721ms
✓ keeps one million lookups bounded on a 100k-entry runtime registry  1649ms
✓ selects and resolves 100k feature ids within the membership budget  420ms
✓ tests/architecture/app-build-input.test.ts (4 tests) 2872ms
✓ accepts the production generator's output and an app-local bundle  996ms
✓ rejects a generator regression that imports every discovered feature  897ms
✓ rejects a production bundle that contains another app's feature  723ms
 Test Files  10 passed (10)
 Tests  34 passed (34)
 Start at  13:30:15
 Duration  3.81s (transform 625ms, setup 4.78s, import 1.11s, tests 6.22s, environment 2ms)
-5
View File
@@ -1,5 +0,0 @@
PASS registry-composition:growth (exponents 0.00)
PASS product-feature-selection:growth (exponents 0.00)
PASS product-feature-resolution:growth (exponents 0.00)
PASS context-hierarchy-composition:growth (exponents 0.00)
composition scale artifact: /shared/codebase/clean-architecture-frontend-template/artifacts/scale/pr/composition-s0-s1.json
-17
View File
@@ -1,17 +0,0 @@
 RUN  v4.1.10 /shared/codebase/clean-architecture-frontend-template
✓ tests/scale/traffic/amplification-metrics.test.ts (6 tests) 5ms
✓ tests/scale/growth-regression.test.ts (7 tests) 6ms
✓ tests/scale/traffic/retry-after-jitter.test.ts (5 tests) 38ms
✓ tests/scale/benchmark.test.ts (4 tests) 7ms
✓ tests/scale/synthetic-topology.test.ts (8 tests) 10ms
✓ tests/scale/scale-baseline.test.ts (11 tests) 11ms
✓ tests/scale/traffic/failure-scenarios.test.ts (5 tests) 1429ms
✓ bounds physical requests when all upstream calls fail  919ms
 Test Files  7 passed (7)
 Tests  46 passed (46)
 Start at  13:30:21
 Duration  2.02s (transform 485ms, setup 1.52s, import 646ms, tests 1.51s, environment 1ms)
-20
View File
@@ -1,20 +0,0 @@
 RUN  v4.1.10 /shared/codebase/clean-architecture-frontend-template
✓ tests/platform/traffic/request-budget.test.ts (7 tests) 5ms
✓ tests/platform/resilience/deadline.test.ts (3 tests) 5ms
✓ tests/platform/traffic/concurrency-budget.test.ts (6 tests) 10ms
✓ tests/platform/resilience/retry-budget.test.ts (6 tests) 5ms
✓ tests/platform/execution/execution-context.test.ts (10 tests) 9ms
✓ tests/platform/traffic/traffic-budget.test.ts (9 tests) 10ms
✓ tests/platform/traffic/operation-traffic-policy.test.ts (7 tests) 7ms
✓ tests/platform/traffic/request-fanout.test.ts (6 tests) 44ms
✓ tests/platform/traffic/request-deduplication.test.ts (3 tests) 40ms
✓ tests/platform/traffic/http-budget-integration.test.ts (9 tests) 127ms
✓ tests/platform/traffic/traffic-amplification.test.ts (3 tests) 328ms
 Test Files  11 passed (11)
 Tests  69 passed (69)
 Start at  13:30:20
 Duration  1.09s (transform 1.03s, setup 3.64s, import 1.52s, tests 590ms, environment 2ms)
@@ -1,25 +0,0 @@
 RUN  v4.1.10 /shared/codebase/clean-architecture-frontend-template
✓ tests/platform/cardinality/compose-unique-record.test.ts (2 tests) 7ms
✓ tests/architecture/context-lazy-loading.test.ts (1 test) 7ms
✓ tests/platform/routing/context-route-module.test.ts (3 tests) 9ms
✓ tests/platform/cardinality/cardinality-budget.test.ts (3 tests) 6ms
✓ tests/architecture/module-hierarchy.test.ts (1 test) 6ms
✓ tests/architecture/topology-cardinality.test.ts (9 tests) 12ms
✓ tests/architecture/observability-boundaries.test.ts (4 tests) 101ms
✓ tests/architecture/request-fanout.test.ts (4 tests) 155ms
✓ tests/platform/cardinality/extreme-scale-registry.test.ts (3 tests) 1941ms
✓ keeps 10k -> 100k composition growth below a quadratic regression budget  383ms
✓ keeps one million lookups bounded on a 100k-entry runtime registry  1177ms
✓ selects and resolves 100k feature ids within the membership budget  379ms
✓ tests/architecture/app-build-input.test.ts (4 tests) 2191ms
✓ accepts the production generator's output and an app-local bundle  659ms
✓ rejects a generator regression that imports every discovered feature  635ms
✓ rejects a production bundle that contains another app's feature  660ms
 Test Files  10 passed (10)
 Tests  34 passed (34)
 Start at  13:33:08
 Duration  2.80s (transform 512ms, setup 3.13s, import 681ms, tests 4.43s, environment 2ms)
@@ -1,3 +0,0 @@
compatibility: structural=true compiler=true timing=true
axes: absolute 28 (ok), growth 8 (ok), relative 16 compiler + 12 timing
scale baseline gate: PASSED (artifacts/scale/release/baseline-regression.json)
@@ -1,5 +0,0 @@
PASS registry-composition:growth (exponents 0.00)
PASS product-feature-selection:growth (exponents 0.00)
PASS product-feature-resolution:growth (exponents 0.00)
PASS context-hierarchy-composition:growth (exponents 0.00)
composition scale artifact: /shared/codebase/clean-architecture-frontend-template/artifacts/scale/release/composition-s0-s1.json
@@ -1,5 +0,0 @@
PASS registry-composition:growth (exponents 0.00, 0.65)
PASS product-feature-selection:growth (exponents 0.00, 0.90)
PASS product-feature-resolution:growth (exponents 0.00, 0.85)
PASS context-hierarchy-composition:growth (exponents 0.00, 0.44)
composition scale artifact: /shared/codebase/clean-architecture-frontend-template/artifacts/scale/release/composition-s0-s2.json
@@ -1,11 +0,0 @@
 RUN  v4.1.10 /shared/codebase/clean-architecture-frontend-template
✓ tests/scale/tsc-diagnostics-parser.test.ts (3 tests) 7ms
✓ tests/scale/composition-scale.test.ts (6 tests) 186ms
 Test Files  2 passed (2)
 Tests  9 passed (9)
 Start at  13:33:15
 Duration  494ms (transform 86ms, setup 297ms, import 80ms, tests 193ms, environment 0ms)
@@ -1,15 +0,0 @@
 RUN  v4.1.10 /shared/codebase/clean-architecture-frontend-template
✓ tests/platform/release/release-coherence.test.ts (10 tests) 8ms
✓ tests/platform/release/release-mismatch-recovery.test.ts (10 tests) 14ms
✓ tests/release/old-asset-reachability.test.ts (4 tests) 7ms
✓ tests/platform/release/cache-policy.test.ts (5 tests) 29ms
✓ tests/release/release-matrix.test.ts (7 tests) 39ms
✓ tests/release/mixed-replica.test.ts (7 tests) 67ms
 Test Files  6 passed (6)
 Tests  43 passed (43)
 Start at  13:33:06
 Duration  780ms (transform 1.11s, setup 1.22s, import 1.79s, tests 163ms, environment 1ms)
-17
View File
@@ -1,17 +0,0 @@
 RUN  v4.1.10 /shared/codebase/clean-architecture-frontend-template
✓ tests/scale/traffic/amplification-metrics.test.ts (6 tests) 6ms
✓ tests/scale/growth-regression.test.ts (7 tests) 9ms
✓ tests/scale/traffic/retry-after-jitter.test.ts (5 tests) 27ms
✓ tests/scale/benchmark.test.ts (4 tests) 11ms
✓ tests/scale/synthetic-topology.test.ts (8 tests) 13ms
✓ tests/scale/scale-baseline.test.ts (11 tests) 11ms
✓ tests/scale/traffic/failure-scenarios.test.ts (5 tests) 1362ms
✓ bounds physical requests when all upstream calls fail  874ms
 Test Files  7 passed (7)
 Tests  46 passed (46)
 Start at  13:33:12
 Duration  1.96s (transform 513ms, setup 1.59s, import 672ms, tests 1.44s, environment 1ms)
@@ -1,12 +0,0 @@
 RUN  v4.1.10 /shared/codebase/clean-architecture-frontend-template
✓ tests/scale/telemetry/telemetry-storm.test.ts (4 tests) 2705ms
✓ does not turn 100000 identical failures into 100000 sends  672ms
✓ bounds sends and buffer when a storm has many distinct fingerprints  1998ms
 Test Files  1 passed (1)
 Tests  4 passed (4)
 Start at  13:33:26
 Duration  3.01s (transform 58ms, setup 146ms, import 52ms, tests 2.71s, environment 0ms)
@@ -1,12 +0,0 @@
 RUN  v4.1.10 /shared/codebase/clean-architecture-frontend-template
✓ tests/scale/global-local-independence.test.ts (7 tests) 6484ms
✓ keeps App A's generated indexes and reachable source graph identical from S0 to S2 on disk  4707ms
✓ selects another app from the same repository without App A's features  646ms
 Test Files  1 passed (1)
 Tests  7 passed (7)
 Start at  13:33:19
 Duration  6.79s (transform 53ms, setup 145ms, import 49ms, tests 6.48s, environment 0ms)
@@ -1,20 +0,0 @@
 RUN  v4.1.10 /shared/codebase/clean-architecture-frontend-template
✓ tests/platform/traffic/request-budget.test.ts (7 tests) 5ms
✓ tests/platform/traffic/concurrency-budget.test.ts (6 tests) 10ms
✓ tests/platform/resilience/retry-budget.test.ts (6 tests) 5ms
✓ tests/platform/resilience/deadline.test.ts (3 tests) 6ms
✓ tests/platform/traffic/traffic-budget.test.ts (9 tests) 9ms
✓ tests/platform/execution/execution-context.test.ts (10 tests) 13ms
✓ tests/platform/traffic/operation-traffic-policy.test.ts (7 tests) 7ms
✓ tests/platform/traffic/request-fanout.test.ts (6 tests) 47ms
✓ tests/platform/traffic/request-deduplication.test.ts (3 tests) 50ms
✓ tests/platform/traffic/http-budget-integration.test.ts (9 tests) 121ms
✓ tests/platform/traffic/traffic-amplification.test.ts (3 tests) 331ms
 Test Files  11 passed (11)
 Tests  69 passed (69)
 Start at  13:33:11
 Duration  1.08s (transform 940ms, setup 3.62s, import 1.46s, tests 603ms, environment 2ms)
@@ -1,5 +0,0 @@
tsc app: files=827 types=279186 instantiations=700415
PASS tsc:types (exponents 0.84, 0.96)
PASS tsc:symbols (exponents 0.51, 0.80)
PASS tsc:instantiations (exponents 0.97, 0.99)
tsc diagnostics artifact: /shared/codebase/clean-architecture-frontend-template/artifacts/scale/release/typescript-diagnostics.json
+1 -1
View File
@@ -19,7 +19,7 @@
},
{
"script": "check:remediation-ledger",
"reason": "Checks the prose ledger of the 2026-08-14 adapter re-review (docs/operations/adapter-remediation-ledger.md) against test-file markers and the file-transfer bundle budget. It passes at this commit, but it is a history record run by hand, not a current contract: it fails when a product removes the optional file-transfer recipe or when a test split moves a marked test to another file, and neither should block a merge. Run it after moving those tests or changing that budget, and point the ledger rows at the new files."
"reason": "Checks the prose ledger of the 2026-08-14 adapter re-review (docs/operations/adapter-remediation-ledger.md) against test-file markers and the file-transfer bundle budget. It is a history record run by hand, not a current contract: it fails when a product removes the optional file-transfer recipe or when a test split moves a marked test to another file, and neither should block a merge. Run it after moving those tests or changing that budget, and point the ledger rows at the new files."
},
{
"script": "check:scale:baseline",
+4 -1
View File
@@ -41,7 +41,10 @@ README와 입구 문서는 영어, recipe·ledger·스타일 문서는 한국어
- 버전별 변경: [`../CHANGELOG.md`](../CHANGELOG.md)
`verify:documentation`은 이 파일과 이 절에서 링크한 문서(폴더 링크는 그 안의 `.md` 전부)에
적힌 repo 경로·링크·package script·FE-GATE ID가 실제로 있는지 검사한다. `CHANGELOG.md`는
적힌 repo 경로·링크·package script·FE-GATE ID가 실제로 있는지 검사한다. 명령(인라인 코드와
셸 코드 블록) 안의 경로 인자도 본다. 짝 백엔드 템플릿(`clean-architecture-backend-template`)의
경로와 링크는 그 checkout이 이 checkout 옆에 있을 때만 확인하고, 없으면 실패 대신 확인하지
못한 것으로 출력과 `artifacts/quality/documentation-review.json`에 남긴다. `CHANGELOG.md`는
지난 상태를 적는 문서라 빼고, git이 무시하는 생성 산출물과 복사한 프로젝트가 지운 작업 이력은
없어도 된다. 설명·수치가 코드와 맞는지는 검사하지 않는다. 규칙과 예외의 정본은
`scripts/verify-documentation-readiness.ts`다.
+1 -1
View File
@@ -77,5 +77,5 @@ What the automated run scans:
annotation.
- The reference sample's list in its success, empty and error states, its
detail, its form with submit errors and its status page, each after that
state is on screen (`tests/e2e/reference-form.spec.ts`, removed with the
state is on screen (tests/e2e/reference-form.spec.ts, removed with the
sample).
+1 -1
View File
@@ -210,7 +210,7 @@ src/
The exact path layout may adapt to current repository conventions, but ownership boundaries are mandatory.
> 2026-11-03 현재: 위 그림의 최상위 `domain/` 폴더는 없다. domain 계층은 기능 안(`src/features/reference-feature/domain`)에만 있다. `src/platform`에는 `execution`·`release`·`routing`도 있다.
> 2026-11-03 현재: 위 그림의 최상위 `domain/` 폴더는 없다. domain 계층은 기능 안(`src/features/<id>/domain`)에만 있다. `src/platform`에는 `execution`·`release`·`routing`도 있다.
> 색인은 생성기가 git이 무시하는 `src/.generated/`에 쓴다. 조립 코드는 `src/bootstrap/`에 있고 `compose-product.ts`라는 파일은 없다. 실제 폴더 목록의 정본은 [`layers.md`](layers.md)다.
## 5. Module Ownership
+5 -3
View File
@@ -161,7 +161,8 @@ selected app. Every build and check script runs it first; run it yourself with
invalidation, topic versions and the external `contractPackages` the
release manifest is checked against at boot), its message catalogs, and
`loadRuntime`, which imports `feature-runtime.ts` dynamically.
`src/features/reference-feature/feature-module.ts` is the complete example.
The reference sample's feature-module.ts (src/features/reference-feature,
while it is installed) is the complete example.
2. Create `src/features/<feature>/feature-runtime.ts` with
`defineFeatureRuntime`: the `schemas` (FE-REG-SCHEMA rows for the
feature's route and API schemas), the adapter contributions
@@ -171,7 +172,8 @@ selected app. Every build and check script runs it first; run it yourself with
it (`application.features.load`) when one of the feature's routes is
entered. Do not import it statically from anywhere: each feature would add
its whole executable code to the initial chunk again, about 3.9 KB gzip
(`tests/unit/feature-shape-growth.test.ts` bounds one feature at 1 KiB).
(tests/unit/feature-shape-growth.test.ts, which goes with the reference
sample, bounds one feature at 1 KiB).
An HTTP API is written once, as its contract contribution descriptor: it
executes, and `check:registries` governs the FE-REG-API row projected from
it (`projectApiOperationRows` in `src/contracts/api-operations.ts`).
@@ -182,7 +184,7 @@ selected app. Every build and check script runs it first; run it yourself with
`FEATURE_CONTEXT_ROUTES`. Page components are imported lazily here, and each
route handle carries the route's params/search `codecs`; the owning context
loads this file only when its route root is visited
(`src/features/reference-feature/context-routes.ts`). Each handle's
(the reference sample's context-routes.ts shows one). Each handle's
`routeId` must be a route of a feature contract in the same context; the
context refuses the routes when they load, naming the route, context and
features (`src/contexts/bounded-context-module.ts`).
+1 -1
View File
@@ -25,7 +25,7 @@ reader that accepts it must ship before any writer sends it.
| `FEATURE_OVERRIDES` | record; unknown feature id ignored | additive | `featureOverrideArtifactSchema` in `src/contracts/release-artifacts.ts` |
| Release manifest V2 | strict object | breaking | `releaseManifestV2ArtifactSchema` in `src/contracts/release-artifacts.ts` |
| HTTP success/failure envelope (V3 with `responseEnvelope: "ENVELOPE_V1"`) | strict object (`meta` strips) | breaking | `successEnvelopeSchema`, `failureEnvelopeSchema` in `src/adapters/http/backend-envelope.ts` |
| HTTP V3 response DTO (reference feature) | `.strip()` drops unknown fields | additive | `referenceResourceDtoSchema` in `src/features/reference-feature/contracts/reference-schemas.ts` |
| HTTP V3 response DTO (reference feature) | `.strip()` drops unknown fields | additive | `referenceResourceDtoSchema` in the reference sample's contracts/reference-schemas.ts |
| Realtime envelope | exact key set; unknown `eventType` is `MALFORMED_EVENT` | breaking | `decodeUnsafe` in `src/adapters/realtime/event-codec.ts` |
| Browser RPC transport error code | closed vocabulary; unknown code is a protocol violation | breaking | `decodeTransportFailure` in `src/adapters/browser-rpc/browser-rpc-runtime.ts` |
| Persisted client storage | versioned key; incompatible value discarded | use a new key version | `defineStorageKey` in `src/contracts/storage-keys.ts` |
+10 -10
View File
@@ -5,7 +5,7 @@
- 뼈대는 손으로 만들지 않는다. `corepack pnpm create:feature <id>`로 만든다.
- 뼈대를 실제 기능으로 바꾸는 순서가 아래 0~11단계다.
참조 기능(`src/features/reference-feature/`)을 복사해 이름을 바꾸는 방법은 쓰지 않는다.
참조 기능(src/features/reference-feature/)을 복사해 이름을 바꾸는 방법은 쓰지 않는다.
그 방법은 접두어 없는 전역 ID, 참조 전용 계약 출처, 기능 밖 테스트 의존 때문에 여러 번 막힌다.
생성 명령은 이 문제를 미리 피한 파일을 쓴다.
@@ -117,7 +117,7 @@ corepack pnpm create:feature invoice-feature
- 명령 자체가 거부한다. ID 형식, 기존 기능·context와 겹침, 라우트·경로·chunk·문구 키 충돌, topic 충돌, 패키지 신원 형식.
- 생성기가 거부한다. 선언 헤더가 리터럴이 아님, 없는 context, 예산 초과.
- 이때 명령은 만든 파일을 모두 지우고 `the feature index generator rejected the feature, nothing was kept:`로 끝난다.
- **못 잡음**: `--context reference-context`로 참조 context에 넣으면 참조 기능 테스트 `tests/features/reference-feature/installed-context-routing.test.ts`가 깨진다. 그 테스트는 참조 context의 라우트 수를 정확히 비교한다. 참조 context에는 넣지 않는다.
- **못 잡음**: `--context reference-context`로 참조 context에 넣으면 참조 기능 테스트 tests/features/reference-feature/installed-context-routing.test.ts가 깨진다. 그 테스트는 참조 context의 라우트 수를 정확히 비교한다. 참조 context에는 넣지 않는다.
④ **쓸 스킬**: `clean-architecture`, `codebase-design`
@@ -137,7 +137,7 @@ corepack pnpm create:feature invoice-feature
- 있으면 `domain/<model>.ts`에 둔다.
- 생성 함수에서 불변식을 검사하고 `Object.freeze`로 고정한다.
- 이름은 와이어 필드가 아니라 업무 이름으로 짓는다(참조 기능은 `name`을 `displayName`으로 바꾼다).
- 예제: `src/features/reference-feature/domain/`
- 예제(참조 기능): src/features/reference-feature/domain/
- 길이 제한(예: 제목 100자)은 domain이 아니라 경계 검증에 둔다.
- 경계 검증: 값이 앱에 들어오거나 나가는 자리(요청·응답 스키마, 폼 스키마)에서 하는 검사다.
- 서버가 정한 제한이면 `contracts/<base>-schemas.ts`에 상수로 두고 요청 스키마와 폼 스키마가 같은 상수를 쓴다. 숫자가 두 곳에서 갈라지지 않는다.
@@ -217,7 +217,7 @@ DTO와 problem details(`type`·`title`·`status`)를 감싸지 않고 보내는
2. problem 스키마를 problem details 모양으로 바꾼다.
3. `classifyProblem`이 모든 판정을 정한다. 실행기가 먼저 정하는 판정은 없다.
참조 기능(`src/features/reference-feature/`)이 이 모양이다. 참조 기능의 MSW 본문도 DTO와 problem details다.
참조 기능(src/features/reference-feature/)이 이 모양이다. 참조 기능의 MSW 본문도 DTO와 problem details다.
**입력과 스키마 메타데이터**
@@ -342,7 +342,7 @@ projectRequest: (input) => Object.freeze({
- 참조 기능은 생성 operation에 목록 route(`REFERENCE_RESOURCE_LIST`)를 적었다. 실제로 보내는 화면은 폼 route다. 동작은 같고 기록의 이름표만 다르다. 새 기능은 위 기준을 따른다.
- `needs`에는 실제로 쓰는 것만 적는다.
- 템플릿이 만들지 않는 capability(예: `indexedDb`)는 `src/bootstrap/product-composition.ts`에서 만든다. 제품이 새로 만드는 capability의 타입은 `src/features/product-capabilities.ts`에 적는다. [03 문서](03-outside-feature-folder.md)를 본다.
- 문제 응답 매핑 예제: `src/features/reference-feature/adapters/reference-http-gateway.ts`
- 문제 응답 매핑 예제(참조 기능): src/features/reference-feature/adapters/reference-http-gateway.ts
③ **잡는 검사 / 못 잡는 것**
@@ -385,8 +385,8 @@ projectRequest: (input) => Object.freeze({
② **기준**
- 경로는 계약에만 적는다. 페이지와 링크는 route ID와 `buildRouteUrl`로 URL을 만든다. 경로 문자열을 페이지에 다시 적지 않는다.
- 파라미터나 검색값이 있는 라우트는 `context-routes.ts`의 handle에 `codecs`를 싣는다. 예제: `src/features/reference-feature/context-routes.ts`.
- 링크용 URL 함수도 같은 codec을 `buildRouteUrl`의 세 번째 인자로 넘긴다. 생성된 판은 파라미터가 없어서 넘기지 않는다. 안 넘기면 `Unregistered route codec: <codecId>`로 throw한다. codec ID는 계약 `routeRuntimeContracts`의 `paramsCodec`·`searchCodec` 값이다. 예제: `src/features/reference-feature/presentation/reference-routes.ts`.
- 파라미터나 검색값이 있는 라우트는 `context-routes.ts`의 handle에 `codecs`를 싣는다. 예제(참조 기능): src/features/reference-feature/context-routes.ts.
- 링크용 URL 함수도 같은 codec을 `buildRouteUrl`의 세 번째 인자로 넘긴다. 생성된 판은 파라미터가 없어서 넘기지 않는다. 안 넘기면 `Unregistered route codec: <codecId>`로 throw한다. codec ID는 계약 `routeRuntimeContracts`의 `paramsCodec`·`searchCodec` 값이다. 예제(참조 기능): src/features/reference-feature/presentation/reference-routes.ts.
- 상세 경로는 목록 경로 뒤에 `/items/:<id 이름>`을 붙인다. 예: `/notice/items/:noticeId`. `/notice/:noticeId`로 두지 않는다.
- 라우터(React Router)는 같은 자리에서 정적 경로를 먼저 고른다. 작성 폼 `/notice/new`가 있으면 id가 `new`인 공지는 `/notice/:noticeId`로 열 수 없다.
- `items/`를 끼우면 정적 경로와 겹치지 않는다. 참조 기능도 이렇게 한다(`/examples/reference-resources/items/:resourceId`).
@@ -436,7 +436,7 @@ projectRequest: (input) => Object.freeze({
- 형식: `qinv.` + 소문자·숫자 26자. `scripts/create-feature.ts`의 `randomTopicSuffix`가 쓰는 방식이다.
- `measureResult`에서 `JSON.stringify`를 쓰지 않는다. 문자열 바이트와 항목당 고정 크기로 어림한다(생성된 `measureItems` 참고).
- `KEYED` 쓰기는 `requiresIdempotencyKey: true`, `duplicatePolicy: "REJECT_WHILE_ACTIVE"`, `invalidate: [topic]`을 쓴다.
- 예제: `src/features/reference-feature/presentation/use-reference-feature.ts`의 생성 뮤테이션 정책.
- 예제(참조 기능): src/features/reference-feature/presentation/use-reference-feature.ts의 생성 뮤테이션 정책.
③ **잡는 검사 / 못 잡는 것**
@@ -465,7 +465,7 @@ projectRequest: (input) => Object.freeze({
- 화면 문구는 모두 catalog에서 가져온다(`message(key)`).
- 링크는 6단계의 URL 함수로 만든다.
- 결과 불명 화면 예제: `src/features/reference-feature/presentation/reference-resource-form-page.tsx`
- 결과 불명 화면 예제(참조 기능): src/features/reference-feature/presentation/reference-resource-form-page.tsx
③ **잡는 검사 / 못 잡는 것**
@@ -561,7 +561,7 @@ projectRequest: (input) => Object.freeze({
expect(await posts[0]!.json()).toEqual({ title: "새 공지", body: "본문입니다." });
```
- 핸들러를 직접 써서 요청을 모으는 방법도 있다. 예제: `tests/features/reference-feature/reference-production-vertical.test.tsx`의 504 재전송 테스트.
- 핸들러를 직접 써서 요청을 모으는 방법도 있다. 예제(참조 기능): tests/features/reference-feature/reference-production-vertical.test.tsx의 504 재전송 테스트.
- 빠르게 돌리기: `node scripts/run-vitest.ts run tests/features/<id>`
- CI에서는 `test:coverage`(FE-GATE-005)가 `tests/features`를 돈다. `test:unit`은 `tests/unit`만 돈다.
+1 -1
View File
@@ -177,7 +177,7 @@ context는 URL 앞부분 하나(라우트 루트)를 가진다. 그 아래 기
**정본**: 어떤 status·code가 "적용 안 됨"인지는 `clean-architecture-backend-template/docs/web/http-contract.md` §2다.
**어디에 적나**: `contracts/<base>-contract-contribution.ts`의 `commandEffect`(`classifyProblem`, `classifyStatus`, Envelope operation이면 `refusedBeforeWrite`). 예제: `src/features/reference-feature/contracts/reference-feature-contract-contribution.ts`의 `CREATE_EFFECT`.
**어디에 적나**: `contracts/<base>-contract-contribution.ts`의 `commandEffect`(`classifyProblem`, `classifyStatus`, Envelope operation이면 `refusedBeforeWrite`). 예제(참조 기능): src/features/reference-feature/contracts/reference-feature-contract-contribution.ts의 `CREATE_EFFECT`.
**틀리면**
+1 -1
View File
@@ -3,7 +3,7 @@
이 폴더는 이 템플릿으로 만든 프로젝트에 **새 기능 하나를 추가하는 절차**를 적는다.
기능 하나는 화면(라우트와 페이지)과 그 화면이 쓰는 API 호출을 함께 뜻한다.
시작은 `corepack pnpm create:feature <id>`다. 이 명령이 모든 merge 게이트를 통과하는 가장 작은 기능을 만든다.
시작은 `corepack pnpm create:feature <id>`다. 이 명령이 모든 merge 게이트를 통과하도록 만든 가장 작은 기능을 만든다(브라우저 게이트는 드릴 밖, `docs/manual/reference/create-feature.md`).
그 뒤 이 매뉴얼의 단계대로 뼈대를 실제 기능으로 바꾼다.
## 누가 읽는가
+4 -3
View File
@@ -1,6 +1,7 @@
# create:feature 참조
모든 merge 게이트를 통과하는 가장 작은 기능을 만드는 명령이다. 정본은 `scripts/create-feature.ts`다.
모든 merge 게이트를 통과하도록 만든 가장 작은 기능을 만드는 명령이다. 정본은 `scripts/create-feature.ts`다.
`test:feature-scaffold`가 생성한 기능으로 `config/ci/gates.json`의 merge 단계 명령을 돌려 확인한다. 브라우저 게이트(FE-GATE-008·009의 브라우저 명령)와 `test:system`은 빼고 돈다. 뺀 명령과 이유는 `scripts/lib/feature-scaffold-drill.ts`에 있다.
템플릿 문자열이 그 파일 안에 있고, 참조 기능을 import하지 않는다. 그래서 참조 기능을 지운 프로젝트에서도 동작한다.
## 사용법
@@ -98,7 +99,7 @@ create:feature: <id> in <context> (new context), route <ROUTE_ID> at <path>
Next:
1. Before a release, have a person review and sign artifacts/tests/a11y-manual/<ROUTE_ID>.md (FE-GATE-028). ...
2. Run the merge gates: corepack pnpm check:types, lint, ...
2. Run the merge gates: corepack pnpm ci:gate -- FE-GATE-<NNN> for each gate of the merge stage ...
The feature's own tests: node scripts/run-vitest.ts run tests/features/<id> ...
The registry baseline does not change: ...
```
@@ -134,6 +135,6 @@ corepack pnpm generate:feature-index
## 알려진 한계
- `--context reference-context`로 참조 context에 넣으면 `tests/features/reference-feature/installed-context-routing.test.ts`가 깨진다. 그 테스트는 참조 context의 라우트 수를 정확히 비교한다.
- `--context reference-context`로 참조 context에 넣으면 참조 기능 테스트 tests/features/reference-feature/installed-context-routing.test.ts가 깨진다. 그 테스트는 참조 context의 라우트 수를 정확히 비교한다.
- 드릴은 `check:bundle`(FE-GATE-012), 브라우저 테스트(`test:a11y`, `test:e2e`)를 돌리지 않는다.
- 새 context는 앱이 하나일 때만 만든다. 앱이 여럿이면 `--context`로 기존 context를 고른다.
+3 -3
View File
@@ -3,7 +3,7 @@
기능을 만들 때 쓰는 패턴과, 그 패턴의 정의와 예제가 어디 있는지 적는다.
- **정의**: 플랫폼(기능 밖)에서 패턴을 제공하는 파일.
- **예제**: 복사해 볼 수 있는 기능 코드. `생성 뼈대`는 `create:feature`가 만드는 코드다. `참조 기능`은 `src/features/reference-feature/`다.
- **예제**: 복사해 볼 수 있는 기능 코드. `생성 뼈대`는 `create:feature`가 만드는 코드다. `참조 기능`은 src/features/reference-feature/다. 참조 기능은 지울 수 있으므로 그 경로는 백틱 없이 적는다. 백틱 경로는 문서 검사(`verify:documentation`)가 존재를 확인한다.
- 예제가 없는 패턴은 **없음**이라고 적었다. 그 패턴은 정의를 읽고 직접 쓴다.
참조 기능은 예제일 뿐이다. 복사해 이름을 바꾸지 않는다. 모양을 보고 생성 뼈대에 옮긴다.
@@ -13,12 +13,12 @@
| 패턴 | 정의 | 예제 | 검사 |
|---|---|---|---|
| 기능 모듈 등록 | `src/features/feature-module.ts` (`defineFeatureModule`, `defineFeatureRuntime`), 생성기 | 생성 뼈대 `feature-module.ts`, `feature-runtime.ts` | 생성기, 기능 ID와 계약 `featureId` 일치 |
| context 소속 선언 | `src/contexts/bounded-context-module.ts` | `src/contexts/reference-context/context-module.ts` | 생성기(없는 context, 예산), 앱 모듈(루트 밖 라우트) |
| context 소속 선언 | `src/contexts/bounded-context-module.ts` | 참조 기능의 src/contexts/reference-context/context-module.ts | 생성기(없는 context, 예산), 앱 모듈(루트 밖 라우트) |
| context 전용 레이아웃 | `docs/architecture/starter-experience.md` "Product home and layouts" | `tests/helpers/fixture-layout-product.tsx` (테스트 fixture) | `tests/component/context-layouts.test.tsx` |
| 앱 홈 대신하기 | `src/contracts/routes.ts`의 `FEATURE_REPLACEABLE_PLATFORM_ROUTE_IDS` | 없음 (기능 예제) | 조립 (두 기능이 `APP_HOME`을 선언하면 실패) |
| 조립 기여(`needs`) | `src/features/feature-adapter-contribution.ts` | 생성 뼈대 `adapters/create-<base>-feature-input.ts` | 조립 (없는 capability, 다른 기능의 input) |
| 제품 capability | `src/features/product-capabilities.ts`(타입), `src/bootstrap/product-composition.ts`(값), `src/bootstrap/product-composition-contract.ts` | `recipes/frontend-capabilities/indexeddb-feature-capability.ts` | `check:types` |
| 기능 끄기 | `config/runtime/<profile>.json`의 `FEATURE_OVERRIDES` | `config/runtime/local.json` | `tests/component/product-feature-switch.test.tsx` |
| 기능 끄기 | `config/runtime/<profile>.json`의 `FEATURE_OVERRIDES` | `config/runtime/local.json` | 참조 기능의 tests/component/product-feature-switch.test.tsx |
## 라우트
@@ -88,9 +88,9 @@ Rollout state starts at `NOT_STARTED`; documented-unimplemented items start at
| N-03 | Live V3 path | `corepack pnpm exec vitest run tests/unit/http-execution-v3.test.ts -t "retry-time fence"` | `fix: preserve command effect certainty across retries` | `FIXED_NOT_RELEASED` | command effect verdict regression | Red reproduced `SCOPE_FENCED` with `NOT_STARTED` after one dispatched attempt → green `MAYBE_APPLIED`; lattice table 9/9; `check:types` PASS; `lint` PASS |
| N-04 | Live composition teardown | `corepack pnpm exec vitest run tests/unit/telemetry.test.ts tests/unit/runtime-adapters.test.ts` | `fix: terminate telemetry work on disposal` | `FIXED_NOT_RELEASED` | telemetry delivery loss after teardown change | Red 10 failed (5 lifecycle + 5 capacity) → green 34/34; `check:diagnostics` PASS; `check:types` PASS; `check:architecture` PASS; `lint` PASS |
| N-05 | Rollout blocker (sidecar not composed) | `corepack pnpm exec vitest run tests/unit/conditional-validator-store.test.ts` | `fix: harden bounded state sidecars` | `FIXED_NOT_RELEASED` | persisted validator key incompatibility | Red collision case (two valid bindings sharing one delimiter-joined key) → green; key is now a bounded validated tuple encoded with `JSON.stringify` |
| N-06 | Legacy V2 rollback seam | `corepack pnpm exec vitest run tests/integration/http-client.test.ts` | `fix: harden the legacy HTTP rollback path` | `FIXED_NOT_RELEASED` | legacy keyed command rejection spike | Red 4 invalid-key cases → green; rejection happens before credentials and fetch (0 credential calls, 0 fetches) |
| N-07 | Legacy V2 rollback seam | `corepack pnpm exec vitest run tests/integration/http-client.test.ts tests/integration/auth-recovery.test.ts` | `fix: harden the legacy HTTP rollback path` | `FIXED_NOT_RELEASED` | legacy credential timeout regression | Red never-settling owner → green; credential wait races the existing attempt controller so no extra timer is added; ownership maps to REQUEST_TIMEOUT / REQUEST_ABORTED / AUTH_INTEGRATION_FAILURE with zero fetches |
| N-08 | Legacy V2 rollback seam | `corepack pnpm exec vitest run tests/unit/bounded-json-compatibility.test.ts` | `fix: harden the legacy HTTP rollback path` | `FIXED_NOT_RELEASED` | legacy JSON failure-code drift | Green 7/7 including throwing cancel/releaseLock; `readBoundedJson` now delegates to `bounded-body-reader` with the legacy codes preserved |
| N-06 | Legacy V2 rollback seam | The V2 client test tests/integration/http-client.test.ts (deleted with the V2 client on 2026-11-03) | `fix: harden the legacy HTTP rollback path` | `FIXED_NOT_RELEASED` | legacy keyed command rejection spike | Red 4 invalid-key cases → green; rejection happens before credentials and fetch (0 credential calls, 0 fetches) |
| N-07 | Legacy V2 rollback seam | The V2 client tests tests/integration/http-client.test.ts and tests/integration/auth-recovery.test.ts (deleted with the V2 client on 2026-11-03) | `fix: harden the legacy HTTP rollback path` | `FIXED_NOT_RELEASED` | legacy credential timeout regression | Red never-settling owner → green; credential wait races the existing attempt controller so no extra timer is added; ownership maps to REQUEST_TIMEOUT / REQUEST_ABORTED / AUTH_INTEGRATION_FAILURE with zero fetches |
| N-08 | Legacy V2 rollback seam | The V2 bounded JSON test tests/unit/bounded-json-compatibility.test.ts (deleted with the V2 client on 2026-11-03) | `fix: harden the legacy HTTP rollback path` | `FIXED_NOT_RELEASED` | legacy JSON failure-code drift | Green 7/7 including throwing cancel/releaseLock; `readBoundedJson` now delegates to `bounded-body-reader` with the legacy codes preserved |
| N-09 | Live cross-context host | `corepack pnpm exec vitest run tests/unit/cross-tab-invalidation.test.ts` | `fix: harden bounded state sidecars` | `FIXED_NOT_RELEASED` | cross-tab invalidation drop | Red foreign-area pulse accepted → green 13/13; localStorage captured once and `StorageEvent.storageArea` compared by object identity; pulse key registered as `CACHE_INVALIDATION_PULSE`; `check:registries` PASS |
| N-10 | Cursor runtime `AVAILABLE_NOT_COMPOSED` | `corepack pnpm exec vitest run tests/unit/cursor-pagination-runtime.test.ts` | `fix: harden bounded state sidecars` | `FIXED_NOT_RELEASED` | pagination abort semantics change | Red never-settling loader → green `PAGINATION_ABORTED` with the late page ignored |
| N-11 | Live composition | `corepack pnpm exec vitest run tests/unit/telemetry.test.ts -t capacity` | `fix: terminate telemetry work on disposal` | `FIXED_NOT_RELEASED` | capacity rejection on valid composition | Red 5/5 capacity cases → green; ceilings documented in VD-07 §7-4 |
@@ -194,7 +194,7 @@ Captured after every correctness task landed.
| `git diff --check` | 0 | clean |
| `corepack pnpm test:component` | 0 | 126 passed |
| `corepack pnpm test:integration` | 0 | 52 passed |
| `corepack pnpm test:reference-feature` | 0 | 26 passed |
| test:reference-feature (the reference sample's script) | 0 | 26 passed |
| `corepack pnpm test:recipes` | 0 | 17 passed |
| `corepack pnpm test:unit` | 1 | 1585 passed / 19 failed tests; the 19 are the unchanged pre-existing `ci-artifact-contract` sandbox failures |
| `corepack pnpm check:registries` | 0 | 11 registries PASS |
@@ -340,13 +340,13 @@ Run on the landed tree. Only what actually passed is claimed as passing.
| `tests/unit` + `tests/integration`, no exclusions | — | 1643 passed / 1747; the 104 failures are the four environmental files below |
| `corepack pnpm test:component` | 0 | 126 passed |
| `corepack pnpm test:recipes` | 0 | 17 passed |
| `corepack pnpm test:reference-feature` | 0 | 26 passed |
| test:reference-feature (the reference sample's script) | 0 | 26 passed |
### Environmental failures, not claimed as green
| Gate | Status | Attribution |
| --- | --- | --- |
| `tests/unit/ci-workflow-generation.test.ts` | 82 failed / 325 passed | Identical on the pre-change baseline (`git stash` comparison). The subprocess gates it spawns cannot run in this sandbox. |
| tests/unit/ci-workflow-generation.test.ts | 82 failed / 325 passed | Identical on the pre-change baseline (`git stash` comparison). The subprocess gates it spawns cannot run in this sandbox. |
| `tests/system/ci-runner/ci-artifact-contract.test.ts` | fails | Unchanged pre-existing sandbox, cgroup and `/tmp` permission behaviour. |
| `tests/unit/security-followup.test.ts`, `tests/integration/provider-guardian-transaction.test.ts`, `tests/unit/risk-coverage.test.ts` | flaky under full-suite load | Historical baseline result. All three passed in a fresh process (78 passed together). |
@@ -390,12 +390,12 @@ files above plus the two flaky-under-load ones:
| File | Failed | Attribution |
| --- | ---: | --- |
| `tests/unit/ci-workflow-generation.test.ts` | 82 | Identical on the pre-change baseline (`git stash` comparison). Its subprocess gates cannot run in this sandbox. |
| tests/unit/ci-workflow-generation.test.ts | 82 | Identical on the pre-change baseline (`git stash` comparison). Its subprocess gates cannot run in this sandbox. |
| `tests/system/ci-runner/ci-artifact-contract.test.ts` | 19 | Unchanged pre-existing sandbox, cgroup and `/tmp` permission behaviour. |
| `tests/unit/security-followup.test.ts` | 2 | Passes in isolation. |
| `tests/integration/provider-guardian-transaction.test.ts` | 1 | Historical baseline: passed in isolation; current suite is classified as process integration. |
1619 passed / 1723 total, and `tests/unit/removal-fixture.test.ts`,
1619 passed / 1723 total, and tests/unit/removal-fixture.test.ts,
`tests/unit/supply-chain.test.ts` and
`tests/integration/security-followup-archive.test.ts` — the three that had to be
excluded before — now pass in the full run.
+1 -1
View File
@@ -22,7 +22,7 @@ Performance evidence is deliberately split by measurement context:
| 초기 JS 예산 | 204,800 gzip bytes(200 KiB) |
| 템플릿 기준선(2026-11-01, 커밋 `298201f`) | 202,509~202,522 gzip bytes, 16개 파일. local 프로필, `VITE_BUILD_ID`가 `local-build`일 때와 CI 모양(`gitea-<run>-<attempt>`)일 때다. 빌드 ID가 번들에 들어가므로 빌드마다 수십~수백 바이트 다르다 |
| 여유 | 약 2,280 bytes(1.1%) |
| 기능 하나를 더할 때 | 참조 기능 모양 복사본 하나에 약 +650~750 bytes(`298201f` 측정, 상한은 `tests/unit/feature-shape-growth.test.ts`의 1 KiB). 기능 실행부(`feature-runtime.ts`)는 라우트에 들어갈 때 받는 lazy chunk다 |
| 기능 하나를 더할 때 | 참조 기능 모양 복사본 하나에 약 +650~750 bytes(`298201f` 측정, 상한은 참조 기능과 함께 지워지는 tests/unit/feature-shape-growth.test.ts의 1 KiB). 기능 실행부(`feature-runtime.ts`)는 라우트에 들어갈 때 받는 lazy chunk다 |
| lazy chunk 예산 | 파일마다 122,880 gzip bytes(120 KiB). 기준선의 lazy JS는 17개, 합계 28,204 bytes이고 가장 큰 것은 `use-reference-feature` 8,386 bytes다 |
청크 이름으로 크기를 판단하지 않는다. rolldown은 공용 청크에 안에 든 모듈
+1 -1
View File
@@ -18,7 +18,7 @@ Each gate is blocking in its declared scope. Failures are not downgraded with
`test:all` is the normal product-development loop. It runs, in order,
`test:runtime-schema`, `test:unit`, `test:contract`, `test:component`,
`test:integration`, `test:reference-feature`, `test:platform` (`tests/platform`
`test:integration`, test:reference-feature (removed with the reference sample), `test:platform` (`tests/platform`
and `tests/architecture`), `check:release-coherence` and `test:recipes`
(`package.json` `test:all`). It does not include `test:system`. CI-runner and
supply-chain assurance has different host prerequisites and is invoked
-24
View File
@@ -941,30 +941,6 @@ export default [
"react-hooks/rules-of-hooks": "off",
},
},
{
files: [
`tests/fixtures/architecture/forbidden/**/*.${sourceExtensions}`,
],
rules: {
"no-restricted-imports": restrictedImports(
[
"**/adapters/**",
"**/application/ports/out/**",
"@tanstack/**",
"react",
"react-dom",
"**/application/**",
],
"forbidden architecture fixture: this import must be rejected.",
),
"no-restricted-globals": [
"error",
"fetch",
"localStorage",
"sessionStorage",
],
},
},
{
files: [
`tests/fixtures/browser-file-storage-boundaries/forbidden/**/*.${sourceExtensions}`,
+14 -72
View File
@@ -1,11 +1,13 @@
import { parseAsync } from "@babel/core";
import { spawnSync } from "node:child_process";
import { mkdir, readFile, readdir } from "node:fs/promises";
import { dirname, extname, isAbsolute, relative, resolve, sep } from "node:path";
import { fileURLToPath, pathToFileURL } from "node:url";
import { createRequire } from "node:module";
import { ESLint } from "eslint";
import { architectureDependencyReportArtifactSchema } from "./contracts/release-artifacts.ts";
import { checkArchitectureLintFixtures } from "./lib/architecture-lint-fixtures.ts";
import { formatArchitectureViolation } from "./lib/architecture-violation-message.ts";
import { writeValidatedJsonArtifact } from "./lib/validated-json-artifact.ts";
@@ -79,7 +81,6 @@ const architectureConfig = parseArchitectureConfig(
const architectureRules = architectureConfig.forbidden;
const sourceExtensionPattern = /\.(?:ts|tsx|mts|cts)$/u;
const declarationExtensionPattern = /\.d\.(?:ts|mts|cts)$/u;
const lintFixtureExtensionPattern = sourceExtensionPattern;
const forbiddenJavaScriptExtensionPattern = /\.(?:js|jsx|mjs|cjs)$/u;
const forbiddenLocalJavaScriptSpecifierPattern =
/\.(?:js|jsx|mjs|cjs)(?:[?#]|$)/u;
@@ -89,13 +90,6 @@ const relativeSpecifierPattern = /^\.{1,2}(?:\/|$)/u;
await mkdir(dirname(qualityArtifact), { recursive: true });
const configuredPnpmCli = process.env.npm_execpath;
if (!configuredPnpmCli) {
throw new Error("check:architecture must run through the pnpm script");
}
const pnpmCli = configuredPnpmCli;
if (
(architectureConfig.allowed?.length ?? 0) > 0 ||
(architectureConfig.required?.length ?? 0) > 0
@@ -106,12 +100,6 @@ if (
}
validateArchitectureRules(architectureRules);
function runPnpm(arguments_: string[]) {
return spawnSync(process.execPath, [pnpmCli, ...arguments_], {
encoding: "utf8",
});
}
// 12-05 (D-11): this graph is the only architecture checker. dependency-cruiser
// 18 cannot parse TypeScript 7, so it cruised zero modules and still passed.
// .dependency-cruiser.json keeps its name and is read here as the rule file.
@@ -211,68 +199,22 @@ process.stdout.write(
`TypeScript-only source policy: PASS (${typeScriptOnlyPolicy.checkedRoots.join(", ")}; no fixture exceptions)\n`,
);
const allowed = runPnpm([
"exec",
"eslint",
"tests/fixtures/architecture/allowed",
"--no-ignore",
"--max-warnings=0",
]);
const forbidden = runPnpm([
"exec",
"eslint",
"tests/fixtures/architecture/forbidden",
"--no-ignore",
"--max-warnings=0",
]);
async function fixtureFiles(directory: string): Promise<string[]> {
const entries = await readdir(directory, { withFileTypes: true });
const files = await Promise.all(
entries.map((entry) => {
const target = `${directory}/${entry.name}`;
return entry.isDirectory()
? fixtureFiles(target)
: lintFixtureExtensionPattern.test(entry.name)
? [target]
: [];
}),
);
return files.flat();
}
const forbiddenResults = await Promise.all(
(await fixtureFiles("tests/fixtures/architecture/forbidden")).map((file) => ({
file,
result: runPnpm([
"exec",
"eslint",
file,
"--no-ignore",
"--max-warnings=0",
]),
})),
);
const acceptedForbidden = forbiddenResults.filter(
({ result }) => result.status === 0,
);
if (
allowed.status !== 0 ||
forbidden.status === 0 ||
acceptedForbidden.length > 0
) {
process.stderr.write(allowed.stderr || allowed.stdout);
process.stderr.write(forbidden.stderr || forbidden.stdout);
for (const { file } of acceptedForbidden) {
process.stderr.write(`Forbidden fixture was accepted: ${file}\n`);
// 1103/12-04. Each fixture is linted under the production configuration of
// the path it stands for, and a forbidden one must be reported by the rule it
// names (scripts/lib/architecture-lint-fixtures.ts).
const lintFixtures = await checkArchitectureLintFixtures({
root: projectRoot,
linter: new ESLint({ cwd: projectRoot }),
});
if (lintFixtures.failures.length > 0) {
for (const failure of lintFixtures.failures) {
process.stderr.write(`Architecture lint fixture: ${failure}\n`);
}
process.exit(1);
}
process.stdout.write(
`Architecture fixtures: allowed PASS, ${forbiddenResults.length} forbidden rejected\n`,
`Architecture fixtures: ${lintFixtures.allowed} allowed PASS, ${lintFixtures.forbidden} forbidden rejected by the production rule for their layer\n`,
);
async function analyzeSourceGraph(
+3
View File
@@ -1428,6 +1428,9 @@ export const documentationReviewArtifactSchema = z
.object({
path: nonEmptyString,
missingPaths: z.array(nonEmptyString),
// 1103/12-05. References into a paired repository that is not
// checked out beside this one. Reported, not failed.
unverifiedLinks: z.array(nonEmptyString),
missingScripts: z.array(nonEmptyString),
unknownGateIds: z.array(nonEmptyString),
})
+6 -3
View File
@@ -13,8 +13,11 @@ import {
import { createFileSystemDeclarationSource } from "./generate-product-feature-index.ts";
/**
* U7. `pnpm create:feature <id>` writes the smallest feature that passes every
* merge gate: one list route without params, one GET (SAFE, EXTERNAL_BEARER),
* U7. `pnpm create:feature <id>` writes the smallest feature meant to pass
* every merge gate. test:feature-scaffold runs the merge stage on it except the
* commands SCAFFOLD_DRILL_EXCLUDED_SCRIPTS names (browser gates, test:system;
* scripts/lib/feature-scaffold-drill.ts). The feature has one list route
* without params, one GET (SAFE, EXTERNAL_BEARER),
* one query, one invalidation topic, one CollectionPage with ko-KR and en-US
* copy, and a router page test plus an input test. The templates live in this
* file and import nothing from a sample feature, so the command keeps working
@@ -1415,7 +1418,7 @@ function report(plan: FeaturePlan): string {
"",
"Next:",
` 1. Before a release, have a person review and sign artifacts/tests/a11y-manual/${plan.routeId}.md (FE-GATE-028). The merge gates check only its format.`,
" 2. Run the merge gates: corepack pnpm check:types, lint, check:architecture, check:registries, check:i18n, check:design-system, check:diagnostics, verify:documentation, test:unit, test:component, test:integration, test:coverage, check:ci, build.",
" 2. Run the merge gates: corepack pnpm ci:gate -- FE-GATE-<NNN> for each gate of the merge stage in config/ci/gates.json (README lists the loop). test:feature-scaffold runs them on a generated feature except the browser gates FE-GATE-008/009 and test:system.",
` The feature's own tests: node scripts/run-vitest.ts run tests/features/${plan.id} (test:coverage runs them in CI)`,
" The registry baseline does not change: new routes, operations, schemas and invalidation topics are additive.",
];
+177
View File
@@ -0,0 +1,177 @@
import { readdir, readFile } from "node:fs/promises";
import path from "node:path";
/**
* 1103/12-04. The architecture lint fixtures are linted under the production
* configuration of the layer they stand for.
*
* They used to be linted where they live, under tests/, by an ESLint entry of
* their own that banned every layer's imports and globals at once, and a
* fixture counted as rejected whenever ESLint exited non-zero. Deleting the
* production rule for a layer therefore still left "9 forbidden rejected":
* presentation code could call `fetch` and the fixtures said it could not.
*
* Each fixture is now linted as if it were the file at `lintAs`, so exactly
* the production entries for that path apply, and a forbidden fixture passes
* only when the rule named in `rejectedBy` reports it.
*/
export type ArchitectureLintRule = "no-restricted-imports" | "no-restricted-globals";
export type ArchitectureLintFixture = Readonly<{
/** Relative to tests/fixtures/architecture. */
file: string;
/** The production path whose ESLint configuration the fixture is linted under. */
lintAs: string;
/** For a forbidden fixture: the production rule that must reject it. */
rejectedBy?: ArchitectureLintRule;
}>;
export const ARCHITECTURE_LINT_FIXTURE_ROOT = "tests/fixtures/architecture";
const LAYER_RULES: ReadonlySet<string> = new Set<ArchitectureLintRule>([
"no-restricted-imports",
"no-restricted-globals",
]);
const at = (layer: string, file: string) =>
`${layer}/__architecture_fixture__/${path.posix.basename(file)}`;
export const ARCHITECTURE_LINT_FIXTURES: readonly ArchitectureLintFixture[] = Object.freeze([
...[
"allowed/bootstrap-composes-adapter.ts",
].map((file) => ({ file, lintAs: at("src/bootstrap", file) })),
...[
"allowed/presentation-facade.ts",
"allowed/presentation-facade.tsx",
].map((file) => ({ file, lintAs: at("src/presentation", file) })),
...[
"forbidden/application-imports-adapter.ts",
"forbidden/application-imports-tanstack.ts",
].map((file) => ({
file,
lintAs: at("src/application", file),
rejectedBy: "no-restricted-imports" as const,
})),
// Domain code lives inside features; src/features/*/domain is the entry
// that applies to it.
{
file: "forbidden/domain-imports-react.ts",
lintAs: "src/features/__architecture_fixture__/domain/domain-imports-react.ts",
rejectedBy: "no-restricted-imports",
},
{
file: "forbidden/presentation-direct-fetch.tsx",
lintAs: at("src/presentation", "presentation-direct-fetch.tsx"),
rejectedBy: "no-restricted-globals",
},
...[
"forbidden/presentation-imports-adapter.ts",
"forbidden/presentation-imports-adapter.tsx",
"forbidden/presentation-imports-output-port.tsx",
"forbidden/presentation-imports-tanstack.tsx",
].map((file) => ({
file,
lintAs: at("src/presentation", file),
rejectedBy: "no-restricted-imports" as const,
})),
{
file: "forbidden/template-imports-application.tsx",
lintAs: at("src/presentation/templates", "template-imports-application.tsx"),
rejectedBy: "no-restricted-imports",
},
]);
type LintMessage = Readonly<{
ruleId: string | null;
message: string;
fatal?: boolean;
line?: number;
}>;
export type ArchitectureLinter = Readonly<{
lintText(
code: string,
options: Readonly<{ filePath: string; warnIgnored: boolean }>,
): Promise<readonly Readonly<{ messages: readonly LintMessage[] }>[]>;
}>;
export type ArchitectureLintFixtureResult = Readonly<{
allowed: number;
forbidden: number;
failures: readonly string[];
}>;
const SOURCE_FILE = /\.(?:ts|tsx)$/u;
async function filesBelow(root: string, directory: string): Promise<string[]> {
const entries = await readdir(path.join(root, directory), { withFileTypes: true });
const files = await Promise.all(entries.map((entry) => {
const relative = path.posix.join(directory, entry.name);
if (entry.isDirectory()) return filesBelow(root, relative);
return SOURCE_FILE.test(entry.name) ? [relative] : [];
}));
return files.flat();
}
export async function checkArchitectureLintFixtures(input: Readonly<{
root: string;
linter: ArchitectureLinter;
fixtures?: readonly ArchitectureLintFixture[];
}>): Promise<ArchitectureLintFixtureResult> {
const fixtures = input.fixtures ?? ARCHITECTURE_LINT_FIXTURES;
const failures: string[] = [];
const onDisk = new Set([
...await filesBelow(input.root, path.posix.join(ARCHITECTURE_LINT_FIXTURE_ROOT, "allowed")),
...await filesBelow(input.root, path.posix.join(ARCHITECTURE_LINT_FIXTURE_ROOT, "forbidden")),
].map((file) => path.posix.relative(ARCHITECTURE_LINT_FIXTURE_ROOT, file)));
const listed = new Set(fixtures.map(({ file }) => file));
for (const file of [...onDisk].filter((candidate) => !listed.has(candidate)).sort()) {
failures.push(`${file}: not listed in ARCHITECTURE_LINT_FIXTURES, so nothing says what must reject it`);
}
for (const fixture of fixtures) {
const forbidden = fixture.file.startsWith("forbidden/");
if (forbidden !== (fixture.rejectedBy !== undefined)) {
failures.push(`${fixture.file}: a forbidden fixture names its rule and an allowed one names none`);
continue;
}
if (!onDisk.has(fixture.file)) {
failures.push(`${fixture.file}: listed fixture does not exist`);
continue;
}
const code = await readFile(
path.join(input.root, ARCHITECTURE_LINT_FIXTURE_ROOT, fixture.file),
"utf8",
);
const [result] = await input.linter.lintText(code, {
filePath: path.join(input.root, fixture.lintAs),
warnIgnored: true,
});
const messages = result?.messages ?? [];
const unlinted = messages.filter((message) => message.fatal || message.ruleId === null);
if (unlinted.length > 0) {
failures.push(
`${fixture.file} (as ${fixture.lintAs}) was not linted: ${unlinted.map(({ message }) => message).join("; ")}`,
);
continue;
}
const layerMessages = messages.filter(({ ruleId }) => ruleId !== null && LAYER_RULES.has(ruleId));
if (fixture.rejectedBy !== undefined) {
if (!layerMessages.some(({ ruleId }) => ruleId === fixture.rejectedBy)) {
failures.push(
`${fixture.file} (as ${fixture.lintAs}) was accepted: the production ${fixture.rejectedBy} rule for that path no longer rejects it`,
);
}
} else if (layerMessages.length > 0) {
failures.push(
`${fixture.file} (as ${fixture.lintAs}) was rejected: ${layerMessages
.map(({ ruleId, line, message }) => `${ruleId} at line ${line ?? "?"}: ${message}`)
.join("; ")}`,
);
}
}
return Object.freeze({
allowed: fixtures.filter(({ rejectedBy }) => rejectedBy === undefined).length,
forbidden: fixtures.filter(({ rejectedBy }) => rejectedBy !== undefined).length,
failures: Object.freeze(failures),
});
}
+11 -6
View File
@@ -9,6 +9,10 @@ import type {
CiGateArtifactSchema,
} from "../contracts/ci-gates.ts";
import { ciContractReportSchema } from "./ci-contract-report.ts";
import {
COVERAGE_SUMMARY_METRICS,
COVERAGE_SUMMARY_OPTIONAL_METRICS,
} from "./coverage-summary-metrics.ts";
import {
architectureDependencyReportArtifactSchema,
automatedA11yArtifactSchema,
@@ -76,16 +80,17 @@ const coverageCounterSchema = z
context.addIssue({ code: "custom", path: ["pct"], message: "coverage pct is not exact" });
}
});
// 1103/12-09. The key list is shared with the risk coverage gate, which reads
// the same file; this schema used to refuse the `branchesTrue` the reporter
// always writes.
const coverageSummarySchema = z
.record(
z.string(),
z
.object({
lines: coverageCounterSchema,
statements: coverageCounterSchema,
functions: coverageCounterSchema,
branches: coverageCounterSchema,
})
.object(Object.fromEntries([
...COVERAGE_SUMMARY_METRICS.map((metric) => [metric, coverageCounterSchema]),
...COVERAGE_SUMMARY_OPTIONAL_METRICS.map((metric) => [metric, coverageCounterSchema.optional()]),
]))
.strict(),
)
.refine((value) => "total" in value, "coverage summary lacks total");
+24
View File
@@ -0,0 +1,24 @@
/**
* The keys of one entry in Vitest's `coverage-summary.json`. Two readers check
* that file: the CI evidence validator (ci-artifact-validator.ts) and the risk
* coverage gate (risk-coverage.ts). They kept separate lists, and the
* validator refused `branchesTrue` while the gate accepted it, so FE-GATE-005
* failed at its evidence step after every test had passed (1103/12-09).
*/
/** The four metrics both readers evaluate. */
export const COVERAGE_SUMMARY_METRICS = Object.freeze([
"lines",
"statements",
"functions",
"branches",
] as const);
/**
* Keys the reporter may add. istanbul-lib-coverage 3.2.2 puts `branchesTrue`
* in every blank summary, so the total always carries it. Each is still
* checked as a counter; neither reader evaluates it.
*/
export const COVERAGE_SUMMARY_OPTIONAL_METRICS = Object.freeze([
"branchesTrue",
] as const);
+143
View File
@@ -0,0 +1,143 @@
import { spawnSync } from "node:child_process";
import type { CiGateContract } from "../contracts/ci-gates.ts";
import { classifyGateStepResult, type GateStepExpectation } from "./ci-step-result.ts";
import { FIXTURE_PNPM_ENVIRONMENT } from "./fixture-node-modules.ts";
import type { RemovalCheck } from "./removal-fixture.ts";
/**
* 1103/12-02. test:feature-scaffold proves that a feature from
* `create:feature` passes the merge gates. It ran a hand-kept list of 15
* commands while the merge stage has 88, so a template change that broke a
* generated feature in any other merge command passed FE-GATE-020.
*
* The drill now runs the merge stage of the copy's config/ci/gates.json, in
* stage order, each command once. A command added to the merge stage runs here
* unless this list names it, with the reason it cannot run in the drill.
*/
const BROWSER =
"needs Playwright browsers. FE-GATE-020 runs in a merge job without them " +
"(merge_gate matrix browser: false). The generated routes in the browser " +
"gates are reviewed as 1103/12-01 and 12-03.";
const DRILL =
"a removal drill copies the repository again. The drill runs the generated " +
"feature's own removal instead (feature-removal).";
export const SCAFFOLD_DRILL_EXCLUDED_SCRIPTS: Readonly<Record<string, string>> = Object.freeze({
"verify:lockfile":
"runs pnpm install, which writes into the node_modules the copy links from " +
"the repository (scripts/lib/fixture-node-modules.ts).",
"test:e2e": BROWSER,
"test:browser-capabilities": BROWSER,
"verify:browser-capability-evidence": `reads the test:browser-capabilities results; ${BROWSER}`,
"test:storybook": BROWSER,
"test:visual": BROWSER,
"check:test-evidence:browser": `reads the browser gates' results; ${BROWSER}`,
"test:a11y": BROWSER,
"test:system":
"needs the CI runner's bubblewrap, systemd and cgroup v2 " +
"(scripts/check-system-test-prerequisites.ts). It tests the provider " +
"sandbox, which a feature does not reach.",
"test:sample-removal": DRILL,
"test:feature-scaffold": "is this drill.",
"test:optional-recipe-removal": DRILL,
"test:browser-file-storage-removal": DRILL,
"test:realtime-removal": DRILL,
});
export type ScaffoldDrillCommand = Readonly<{
/** `<gate>:<command id>`, the check's name in the drill report. */
name: string;
script: string;
args: readonly string[];
expectation: GateStepExpectation;
}>;
type ContractShape = Pick<CiGateContract, "commands" | "gates" | "stages">;
export function scaffoldDrillCommands(
contract: ContractShape,
excluded: Readonly<Record<string, string>> = SCAFFOLD_DRILL_EXCLUDED_SCRIPTS,
): readonly ScaffoldDrillCommand[] {
const merge = contract.stages.find(({ id }) => id === "merge");
if (!merge) throw new TypeError("the CI contract has no merge stage");
const commands = new Map(contract.commands.map((command) => [command.id, command]));
const mergeScripts = new Set<string>();
const seen = new Set<string>();
const selected: ScaffoldDrillCommand[] = [];
for (const gateId of merge.gateIds) {
const gate = contract.gates.find(({ id }) => id === gateId);
if (!gate) throw new TypeError(`the merge stage names an undefined gate: ${gateId}`);
for (const commandId of gate.commandIds) {
const command = commands.get(commandId);
if (!command) throw new TypeError(`${gateId} names an undefined command: ${commandId}`);
mergeScripts.add(command.script);
if (seen.has(commandId) || Object.hasOwn(excluded, command.script)) continue;
seen.add(commandId);
selected.push(Object.freeze({
name: `${gateId}:${commandId}`,
script: command.script,
args: Object.freeze([...(command.args ?? [])]),
expectation: command.expect === "pass"
? Object.freeze({ kind: "pass" as const })
: Object.freeze({
kind: "fail" as const,
expectedExitCode: command.expectedExitCode ?? 1,
expectedDiagnosticId: command.expectedDiagnosticId ?? "",
}),
}));
}
}
// An exclusion for a command that moved out of the merge stage would hide
// nothing today and silently drop it if it came back. A command the contract
// no longer has at all (a removal drill pruned its capability) is not stale.
const contractScripts = new Set(contract.commands.map(({ script }) => script));
const stale = Object.keys(excluded).filter(
(script) => contractScripts.has(script) && !mergeScripts.has(script),
);
if (stale.length > 0) {
throw new TypeError(
`the scaffold drill excludes scripts the contract runs outside the merge stage: ${stale.join(", ")}`,
);
}
return Object.freeze(selected);
}
/**
* Runs one merge command in the fixture. A negative fixture command passes
* only with its registered exit code and diagnostic, as in run-ci-gate.ts.
*/
export function runScaffoldDrillCommand(
command: ScaffoldDrillCommand,
root: string,
pnpmCli: string,
): RemovalCheck {
const capture = command.expectation.kind === "fail";
const result = spawnSync(process.execPath, [pnpmCli, command.script, ...command.args], {
cwd: root,
encoding: "utf8",
stdio: capture ? "pipe" : "inherit",
maxBuffer: 64 * 1024 * 1024,
env: { ...process.env, ...FIXTURE_PNPM_ENVIRONMENT },
});
if (capture) {
process.stdout.write(result.stdout ?? "");
process.stderr.write(result.stderr ?? "");
}
const classification = classifyGateStepResult(command.expectation, {
status: result.status,
signal: result.signal,
stdout: result.stdout ?? "",
stderr: result.stderr ?? "",
...(result.error ? { error: { code: (result.error as NodeJS.ErrnoException).code } } : {}),
});
if (classification.expectationMet) return { name: command.name, passed: true };
const invocation = `corepack pnpm ${[command.script, ...command.args].join(" ")}`;
return {
name: command.name,
passed: false,
failure: command.expectation.kind === "fail"
? `${invocation}: ${classification.kind}, expected exit ${command.expectation.expectedExitCode} with ${JSON.stringify(command.expectation.expectedDiagnosticId)}, got exit ${result.status ?? result.signal}`
: `${invocation} exited ${result.status ?? result.signal ?? "on a spawn error"}`,
};
}
+45 -1
View File
@@ -46,6 +46,41 @@ export const REMOVAL_FIXTURE_COPY_TARGETS = Object.freeze([
* provider suite down with it — twenty-odd failures with one cause.
*/
/**
* The repository's documents. A drill that adds or removes a feature copies
* them as well (REMOVAL_FIXTURE_COPY_TARGETS plus these), because the change
* must leave the documents valid (1103/14-04). The capability drills do not:
* the documents describe the capability they delete, and what those drills
* prove is that the code still builds and tests without it.
*/
export const REMOVAL_FIXTURE_DOCUMENT_TARGETS = Object.freeze([
"README.md",
"CHANGELOG.md",
"docs",
] as const);
/**
* 1103/02-06. Tests that read REMOVAL_FIXTURE_DOCUMENT_TARGETS. A fixture
* copied without the documents cannot run them: every capability drill
* (FE-GATE-020) failed its `test` check on ENOENT for README.md and
* CHANGELOG.md, whatever the removal did. prepareRemovalFixture deletes them
* from such a fixture, and the repository's own test:unit keeps running them.
* This is the only list; the sample drill used to keep the exclusion to itself.
*/
export const REMOVAL_FIXTURE_DOCUMENT_TESTS = Object.freeze([
"tests/unit/changelog-review-ids.test.ts",
"tests/unit/documentation-readiness.test.ts",
] as const);
/** The tests a fixture copied from `copyTargets` cannot run. */
export function removalFixtureExcludedTests(
copyTargets: readonly string[],
): readonly string[] {
return REMOVAL_FIXTURE_DOCUMENT_TARGETS.every((target) => copyTargets.includes(target))
? []
: REMOVAL_FIXTURE_DOCUMENT_TESTS;
}
/**
* Regenerated result trees under `artifacts/`: traces, coverage HTML, recorded
* videos and Storybook bundles. They are tens of megabytes and mean nothing to
@@ -114,6 +149,9 @@ export async function prepareRemovalFixture(
for (const target of copyTargets) {
await cp(target, path.join(root, target), { recursive: true });
}
for (const test of removalFixtureExcludedTests(copyTargets)) {
await rm(path.join(root, test), { force: true });
}
await copyReleaseEvidenceTree(process.cwd(), root);
runFixtureGit(root, ["init", "--quiet", "--initial-branch=fixture"]);
await linkFixtureNodeModules(root);
@@ -465,8 +503,14 @@ export async function pruneRemovalFixtureCiContract(options: Readonly<{
]);
// D-13: the reduced contract is a new baseline, recorded the way a project
// that removes the capability records it; canonical check:ci then applies.
// 1103/16-02. A product feature owns no CI script; an empty list used to
// leave a trailing blank that the baseline schema refuses.
await updateCiContractBaseline(options.root, {
owner: "removal-fixture",
reason: `removal fixture pruned ${[...options.removedScripts].join(", ")}`,
reason: `removal fixture pruned ${
options.removedScripts.size === 0
? "no CI scripts"
: [...options.removedScripts].join(", ")
}`,
});
}
+11 -9
View File
@@ -8,14 +8,12 @@ import {
import path from "node:path";
import babelParser from "@babel/eslint-parser";
import {
COVERAGE_SUMMARY_METRICS as coverageMetrics,
COVERAGE_SUMMARY_OPTIONAL_METRICS,
} from "./coverage-summary-metrics.ts";
import { normalizeRepositoryRelativePath } from "./repository-file-inventory.ts";
const coverageMetrics = [
"lines",
"statements",
"functions",
"branches",
] as const;
const teamIdPattern = /^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/u;
const maximumWaiverDurationMs = 90 * 24 * 60 * 60 * 1_000;
@@ -641,16 +639,20 @@ function parseCoverageCounter(value: unknown, label: string): CoverageCounter {
function parseCoverageMetrics(value: unknown, label: string): CoverageMetrics {
if (!isRecord(value)) throw new TypeError(`${label} must be an object`);
const optionalMetrics: readonly string[] = COVERAGE_SUMMARY_OPTIONAL_METRICS;
const unknownMetrics = Object.keys(value).filter(
(metric) => metric !== "branchesTrue" && !coverageMetrics.includes(metric as CoverageMetric),
(metric) =>
!optionalMetrics.includes(metric) && !coverageMetrics.includes(metric as CoverageMetric),
);
if (unknownMetrics.length > 0) {
throw new TypeError(
`${label} has unknown coverage metric keys: ${unknownMetrics.sort().join(", ")}`,
);
}
if (value.branchesTrue !== undefined) {
parseCoverageCounter(value.branchesTrue, `${label}.branchesTrue`);
for (const metric of optionalMetrics) {
if (value[metric] !== undefined) {
parseCoverageCounter(value[metric], `${label}.${metric}`);
}
}
const parsed = {} as Record<CoverageMetric, CoverageCounter>;
for (const metric of coverageMetrics) {
+23 -4
View File
@@ -1,7 +1,7 @@
import { spawn } from "node:child_process";
import { randomBytes } from "node:crypto";
import { constants } from "node:fs";
import { access, appendFile, lstat } from "node:fs/promises";
import { access, appendFile, lstat, stat } from "node:fs/promises";
import path from "node:path";
import {
@@ -274,12 +274,21 @@ async function runProviderInSandbox(
bwrapArguments.push("--dir", directory);
}
bwrapArguments.push("--ro-bind", workspaceRoot, workspaceRoot);
if (await exists(path.join(workspaceRoot, ".git"))) {
const repositoryMetadata = path.join(workspaceRoot, ".git");
const metadataKind = await entryKind(repositoryMetadata);
if (metadataKind === "directory") {
bwrapArguments.push(
"--size", String(PROVIDER_MASK_BYTES),
"--tmpfs", path.join(workspaceRoot, ".git"),
"--remount-ro", path.join(workspaceRoot, ".git"),
"--tmpfs", repositoryMetadata,
"--remount-ro", repositoryMetadata,
);
} else if (metadataKind === "other") {
// 1103/11-04. A linked worktree or a submodule checkout has a one-line
// `gitdir:` file here, and a tmpfs cannot be mounted on a file. /dev/null
// is bound over it instead. bubblewrap mounts binds nodev, so the provider
// can neither read the line nor write the path; the directory it names
// lies outside the workspace and is never bound into the sandbox.
bwrapArguments.push("--ro-bind", "/dev/null", repositoryMetadata);
}
bwrapArguments.push(
"--ro-bind", candidateRoot, "/candidate",
@@ -597,6 +606,16 @@ function missingDestinationAncestors(target: string): string[] {
return ancestors.reverse();
}
/** What `target` is once symlinks are followed, as bubblewrap will see it. */
async function entryKind(target: string): Promise<"directory" | "other" | null> {
try {
return (await stat(target)).isDirectory() ? "directory" : "other";
} catch (error) {
if (hasErrorCode(error, "ENOENT")) return null;
throw error;
}
}
async function exists(target: string): Promise<boolean> {
try {
await lstat(target);
+34 -21
View File
@@ -1,9 +1,16 @@
import { spawnSync } from "node:child_process";
import { mkdir, rm, writeFile } from "node:fs/promises";
import { loadCiGateContract } from "./contracts/ci-gates.ts";
import {
runScaffoldDrillCommand,
scaffoldDrillCommands,
} from "./lib/feature-scaffold-drill.ts";
import {
createRemovalFixtureRoot,
prepareRemovalFixture,
REMOVAL_FIXTURE_COPY_TARGETS,
REMOVAL_FIXTURE_DOCUMENT_TARGETS,
renderRemovalJunit,
requireRemovalFixtureEnvironment,
runRemovalFixtureCheck,
@@ -14,7 +21,16 @@ import {
/**
* U7. A feature from `create:feature` passes the merge gates without an edit
* and breaks no other test. A copy of the repository, sample feature
* included, gets one generated feature and then runs the gates.
* included, gets one generated feature and then runs the merge stage of its
* config/ci/gates.json: every command except those
* SCAFFOLD_DRILL_EXCLUDED_SCRIPTS names with a reason (the browser gates,
* test:system, the install check and the removal drills). 1103/12-02: this
* used to be a hand-kept list of 15 commands.
*
* 1103/16-02. The generated feature is then removed again with
* `test:sample-removal -- --feature=<id>`, the path the manual tells every
* product feature to take and that no gate ran.
*
* test:sample-removal repeats the generation after deleting the sample
* (decision 4), which proves the command needs nothing from it.
*/
@@ -24,6 +40,12 @@ const REPORT = "artifacts/tests/feature-scaffold.xml";
const pnpmCli = requireRemovalFixtureEnvironment("npm_execpath");
const fixtureRoot = await createRemovalFixtureRoot("feature-scaffold");
function fixtureCommit(root: string): string {
const head = spawnSync("git", ["rev-parse", "HEAD"], { cwd: root, encoding: "utf8" });
if (head.status !== 0) throw new Error(`feature scaffold fixture has no commit: ${head.stderr}`);
return head.stdout.trim();
}
function check(name: string, script: string, extra: readonly string[] = []): RemovalCheck {
return runRemovalFixtureCheck(name, fixtureRoot, pnpmCli, script, extra);
}
@@ -32,9 +54,7 @@ try {
// verify:documentation and the documentation tests read these.
await prepareRemovalFixture(fixtureRoot, [
...REMOVAL_FIXTURE_COPY_TARGETS,
"README.md",
"CHANGELOG.md",
"docs",
...REMOVAL_FIXTURE_DOCUMENT_TARGETS,
]);
const created = check("create-feature", "create:feature", [FEATURE_ID]);
const checks: RemovalCheck[] = [created];
@@ -42,23 +62,16 @@ try {
// Commits the copy with the feature, as a project would: git-based
// checks (git grep, git ls-files) then see the feature's files.
sealRemovalFixtureRepository(fixtureRoot);
checks.push(
check("typecheck", "check:types"),
check("lint", "lint"),
check("architecture", "check:architecture"),
check("registries", "check:registries"),
check("i18n", "check:i18n"),
check("design-system", "check:design-system"),
check("diagnostics", "check:diagnostics"),
check("documentation", "verify:documentation"),
check("unit", "test:unit"),
check("component", "test:component"),
check("integration", "test:integration"),
check("features", "exec", ["node", "scripts/run-vitest.ts", "run", "tests/features"]),
check("coverage", "test:coverage"),
check("ci-contract", "check:ci"),
check("build", "build"),
);
// build:release-candidate records the build's commit and refuses one that
// is not a commit ID. CI sets VITE_COMMIT_SHA for the whole workflow; a
// local run gets the copy's own sealed commit instead of "local".
if (!process.env["VITE_COMMIT_SHA"]?.trim()) {
process.env["VITE_COMMIT_SHA"] = fixtureCommit(fixtureRoot);
}
for (const command of scaffoldDrillCommands(await loadCiGateContract(fixtureRoot))) {
checks.push(runScaffoldDrillCommand(command, fixtureRoot, pnpmCli));
}
checks.push(check("feature-removal", "test:sample-removal", ["--", `--feature=${FEATURE_ID}`]));
}
const failed = checks.filter((entry) => !entry.passed);
await mkdir("artifacts/tests", { recursive: true });
+20 -5
View File
@@ -18,6 +18,8 @@ import {
pruneRemovalFixtureCiContract,
pruneScriptOrchestration,
regenerateRemovalFixtureWorkflow,
REMOVAL_FIXTURE_COPY_TARGETS,
REMOVAL_FIXTURE_DOCUMENT_TARGETS,
renderRemovalJunit,
requireRemovalFixtureEnvironment,
runRemovalFixtureCheck,
@@ -201,16 +203,22 @@ function outcome(name: string, findings: readonly string[], label: string): Remo
}
try {
await prepareRemovalFixture(fixtureRoot);
// 1103/14-04. The documents come too: removing a feature must leave them
// valid, and the fixture used to leave them out with the tests that read
// them, so a manual naming the sample's files passed here and then failed
// FE-GATE-017 in the product that removed it.
await prepareRemovalFixture(fixtureRoot, [
...REMOVAL_FIXTURE_COPY_TARGETS,
...REMOVAL_FIXTURE_DOCUMENT_TARGETS,
]);
// Fixture-only deletions: a project that removes the sample keeps these.
// verify:documentation runs in this fixture, so a current contract document
// must not name them as backtick paths (docs/manual/reference/patterns.md).
for (const excludedFixtureTest of [
"tests/unit/ci-workflow-generation.test.ts",
"tests/unit/__snapshots__/ci-workflow-generation.test.ts.snap",
"tests/unit/removal-fixture.test.ts",
"tests/unit/http-scenario-evidence.test.ts",
// They check README.md and CHANGELOG.md, which the fixture does not copy
// (REMOVAL_FIXTURE_COPY_TARGETS); removing a feature does not change them.
"tests/unit/changelog-review-ids.test.ts",
"tests/unit/documentation-readiness.test.ts",
]) {
await rm(path.join(fixtureRoot, excludedFixtureTest), { force: true });
}
@@ -399,6 +407,13 @@ try {
}
const gateChecks = (prefix: string): RemovalCheck[] => [
check(`${prefix}typecheck`, "check:types"),
// 1103/14-04 (FOLLOW-UP 09-07). Merge and documentation gates the drill
// did not run: the documents, lint, screen text and design tokens can
// name or use what the removal deleted.
check(`${prefix}lint`, "lint"),
check(`${prefix}documentation`, "verify:documentation"),
check(`${prefix}i18n`, "check:i18n"),
check(`${prefix}design-system`, "check:design-system"),
check(`${prefix}architecture`, "check:architecture"),
check(`${prefix}registries`, "check:registries"),
check(`${prefix}unit-integration`, "test:all"),
+80 -7
View File
@@ -1,6 +1,6 @@
import { existsSync } from "node:fs";
import { mkdir, readdir, readFile } from "node:fs/promises";
import { dirname, join, matchesGlob, normalize } from "node:path/posix";
import { dirname, join, matchesGlob, normalize, resolve } from "node:path/posix";
import { fileURLToPath } from "node:url";
import { RETIRED_GATE_IDS } from "./contracts/ci-gates.ts";
@@ -207,21 +207,62 @@ const deletedHistory = [
.flatMap(([, cell = ""]) => [...cell.matchAll(/`([^`]+)`/gu)].map(([, entry = ""]) => entry.replace(/\/$/u, "")))
.filter((entry) => !exists(entry));
// A backtick span is a path when it starts at a top-level entry or at an
// entry beside the document; line numbers and anchors are dropped.
// 1103/12-05. The paired templates a document may name (`<name>/docs/…`) or
// link (`../../../<name>/…`). They are looked up beside the checkout the
// documents are read from; where none is checked out (CI, a nested worktree)
// the reference is reported as not verified instead of passing silently.
const SIBLING_REPOSITORIES = new Set(["clean-architecture-backend-template"]);
const siblingsRoot = resolve(process.cwd(), "..");
// A backtick span is a path when it starts at a top-level entry, at an entry
// beside the document or at a paired repository; line numbers and anchors are
// dropped. A path into a paired repository is returned relative to this one
// (`../<name>/…`).
function namedPath(token: string, document: string): string | null {
const candidate = token.replace(/#.*$/u, "").replace(/:\d[\d,:-]*$/u, "");
if (!candidate.includes("/") || candidate.startsWith("/") || /[\s*<>{}$()|]|\.\.\./u.test(candidate)) return null;
const first = candidate.split("/")[0] ?? "";
if (topLevelEntries.has(first)) return candidate;
if (SIBLING_REPOSITORIES.has(first)) return `../${candidate}`;
return first !== "." && first !== ".." && exists(join(dirname(document), first))
? join(dirname(document), candidate)
: null;
}
// A link that leaves the repository is kept (`../…`); the caller looks it up
// beside the checkout.
function linkedPath(target: string, document: string): string | null {
if (/^(?:[a-z][a-z+.-]*:|#)/iu.test(target)) return null;
const resolved = normalize(join(dirname(document), target.replace(/#.*$/u, "")));
return resolved.startsWith("../") ? null : resolved;
return normalize(join(dirname(document), target.replace(/#.*$/u, "")));
}
// 1103/12-05. A command span is not a path, so the paths it takes as
// arguments (`corepack pnpm exec vitest run tests/…`, `node scripts/…`) were
// never looked up. Leading `NAME=value` assignments are skipped, a
// `--flag=value` argument is read as its value, and placeholders (`<id>`,
// globs, `$VAR`) are left alone by namedPath.
const COMMAND_HEADS = new Set(["corepack", "pnpm", "npx", "node", "vitest", "playwright", "tsc", "eslint", "bash", "sh"]);
function commandPaths(command: string, document: string): (string | null)[] {
const words = command.trim().replace(/^\$\s+/u, "").split(/\s+/u);
let head = 0;
while (/^[A-Z_][A-Z0-9_]*=/u.test(words[head] ?? "")) head += 1;
if (!COMMAND_HEADS.has(words[head] ?? "")) return [];
return words
.slice(head + 1)
.map((word) => namedPath(word.replace(/^--?[\w.-]+=/u, "").replace(/^["']|["']$/gu, ""), document));
}
// Lines of fenced shell blocks (```bash, ```sh, ```shell, ```console or no
// language), which is where most documented commands are.
function fencedCommands(text: string): string[] {
const commands: string[] = [];
let fence: string | null = null;
for (const line of text.split("\n")) {
const marker = /^\s*```(\w*)/u.exec(line);
if (marker) {
fence = fence === null ? (marker[1] ?? "") : null;
continue;
}
if (fence !== null && /^(?:bash|sh|shell|console|zsh)?$/u.test(fence)) commands.push(line);
}
return commands;
}
const index = await readFile(DOCUMENT_INDEX, "utf8").catch(() => "");
@@ -239,18 +280,42 @@ for (const document of contractDocuments) {
if (text === null) {
// A linked document that is gone is reported as the index's broken link.
if (document === DOCUMENT_INDEX) {
documentReferences.push({ path: document, missingPaths: [document], missingScripts: [], unknownGateIds: [] });
documentReferences.push({
path: document,
missingPaths: [document],
unverifiedLinks: [],
missingScripts: [],
unknownGateIds: [],
});
}
continue;
}
const named = [
...[...text.matchAll(/`([^`\n]+)`/gu)].map(([, token = ""]) => namedPath(token, document)),
...[...text.matchAll(/`([^`\n]+)`/gu)].flatMap(([, token = ""]) => [
namedPath(token, document),
...commandPaths(token, document),
]),
...fencedCommands(text).flatMap((command) => commandPaths(command, document)),
...[...text.matchAll(/\]\(([^)\s]+)\)/gu)].map(([, target = ""]) => linkedPath(target, document)),
];
const missingPaths = new Set<string>();
const unverifiedLinks = new Set<string>();
for (const file of named) {
if (file === null) continue;
const trimmed = file.replace(/\/$/u, "");
if (trimmed.startsWith("../")) {
// Outside this repository: the first folder past the `..` steps is the
// paired checkout. Without it the reference cannot be checked here.
const segments = trimmed.split("/");
const checkout = segments.slice(0, segments.findIndex((segment) => segment !== "..") + 1).join("/");
const relativeToSiblings = trimmed.replace(/^\.\.\//u, "");
if (!existsSync(resolve(siblingsRoot, checkout.replace(/^\.\.\//u, "")))) {
unverifiedLinks.add(trimmed);
} else if (!existsSync(resolve(siblingsRoot, relativeToSiblings))) {
missingPaths.add(trimmed);
}
continue;
}
if (
!exists(trimmed) &&
!NOT_CREATED.has(trimmed) &&
@@ -270,6 +335,7 @@ for (const document of contractDocuments) {
documentReferences.push({
path: document,
missingPaths: [...missingPaths].sort(),
unverifiedLinks: [...unverifiedLinks].sort(),
missingScripts: [...missingScripts].sort(),
unknownGateIds: [...new Set([...text.matchAll(/\bFE-GATE-\d+\b/gu)].map(([id]) => id))]
.filter((id) => !gateIds.has(id))
@@ -370,4 +436,11 @@ if (!passed) {
);
process.exit(1);
}
const unverified = documentReferences.flatMap((entry) => entry.unverifiedLinks);
if (unverified.length > 0) {
process.stdout.write(
`Documentation readiness: ${unverified.length} reference(s) into paired repositories not verified ` +
`(no checkout beside ${process.cwd()}): ${[...new Set(unverified)].join(", ")}\n`,
);
}
process.stdout.write("Documentation readiness: PASS_SCOPED\n");
@@ -1020,15 +1020,12 @@ test("fails a blocked v2 upgrade closed, then closes its late connection after t
);
expect(blocker).toBe("OPEN");
// 1103/11-05. The BLOCKED status lasts only blockedTimeoutMs before the
// runtime closes, and each poll is a page.evaluate round trip, so a loaded
// host saw CLOSED first. The settled open result below already says the
// upgrade was blocked; tests/unit/indexeddb-runtime.test.ts pins the
// transient status on a controlled clock.
await startLifecycleRuntime(page, name, 2, 500);
await expect
.poll(async () => await lifecycleStatus(page))
.toEqual({
kind: "BLOCKED",
currentVersion: 1,
targetVersion: 2,
});
const blocked = await settleLifecycleRuntime(page);
expect(blocked).toMatchObject({
opened: {
@@ -2,9 +2,12 @@ import { createHash } from "node:crypto";
import type { Route } from "@playwright/test";
import capabilitiesConfig from "../../playwright.capabilities.config.ts";
import { expect, test } from "../support/browser/strict-browser-test.ts";
const PAGE_ORIGIN = "http://127.0.0.1:4174";
// The page is served from the capability config's baseURL; a copy of its port
// here drifted silently whenever the config moved.
const PAGE_ORIGIN = new URL(capabilitiesConfig.use?.baseURL ?? "").origin;
const API_ORIGIN = "https://upload-api.example.test";
const OBJECT_ORIGIN = "https://upload-objects.example.test";
const SESSION_ID = "session_browser_01";
@@ -1,7 +1,7 @@
// @vitest-environment jsdom
import { render, screen, within } from "@testing-library/react";
import { describe, expect, it, vi } from "vitest";
import { afterEach, describe, expect, it, vi } from "vitest";
import { BootErrorShell } from "../../src/presentation/boundaries/boot-error-shell.tsx";
@@ -16,6 +16,12 @@ vi.mock("../../src/bootstrap/create-runtime-composition.ts", () => ({
},
}));
// The reportError stub must not reach the next test in this file; the config
// does not set unstubGlobals.
afterEach(() => {
vi.unstubAllGlobals();
});
describe("unexpected boot failure (09-04)", () => {
it("is shown as BOOT_UNEXPECTED_FAILURE and reports the error in development", async () => {
document.body.innerHTML =
+10 -1
View File
@@ -1,5 +1,14 @@
import { expect, test } from "../support/browser/strict-browser-test.ts";
/**
* 1103/11-06. The preview server serves a build made from this process's
* environment (playwright.config.ts webServer), and the build takes its
* identity from VITE_BUILD_ID the way scripts/generate-runtime-config.ts
* does: CI sets gitea-<run>-<attempt>, a local run falls back to
* "local-build". A fixed "local-build" failed FE-GATE-008 in every CI run.
*/
const EXPECTED_BUILD_ID = process.env["VITE_BUILD_ID"] || "local-build";
test("boots and navigates the compact production shell", async ({ page }) => {
await page.goto("/");
await expect(page.getByRole("main")).toBeVisible();
@@ -15,7 +24,7 @@ test("boots and navigates the compact production shell", async ({ page }) => {
.getByRole("link", { name: "UI 구성요소", exact: true })
.click();
await expect(page).toHaveURL(/\/examples\/ui$/);
await expect(page.locator("html")).toHaveAttribute("data-build-id", "local-build");
await expect(page.locator("html")).toHaveAttribute("data-build-id", EXPECTED_BUILD_ID);
const overflow = await page.evaluate(
() => document.documentElement.scrollWidth - window.innerWidth,
);
@@ -6,7 +6,7 @@ import { tmpdir } from "node:os";
import path from "node:path";
import { setTimeout as delay } from "node:timers/promises";
import { afterAll, afterEach, describe, expect, it } from "vitest";
import { afterAll, afterEach, beforeAll, describe, expect, it } from "vitest";
import type {
CiGateArtifact,
@@ -62,6 +62,11 @@ import {
* default instead would hide a genuinely hung test.
*/
const PROCESS_HEAVY_TIMEOUT_MS = 30_000;
/**
* The provider base fixture runs `build:release-candidate`, bounded at 120s
* (ensureProviderBaseFixture), and then copies and archives the result.
*/
const PROVIDER_BASE_FIXTURE_TIMEOUT_MS = 180_000;
const temporaryRoots: string[] = [];
let providerBaseRoot: string | undefined;
@@ -448,7 +453,16 @@ describe("CI artifact validator", () => {
});
});
describe("candidate archive and provider upload boundaries", () => {
// 1103/11-03. Every test here spawns a provider launch chain or copies the
// release-candidate fixture, so the whole block runs on the provider budget;
// eight tests were still on the 10s unit default and timed out under load.
// The base fixture is built once in beforeAll, on its own ceiling, so a test
// selected alone with -t no longer pays for the build inside its own budget.
describe("candidate archive and provider upload boundaries", { timeout: PROCESS_HEAVY_TIMEOUT_MS }, () => {
beforeAll(async () => {
await ensureProviderBaseFixture();
}, PROVIDER_BASE_FIXTURE_TIMEOUT_MS);
it("accepts only the manifest-bound candidate member set and bytes", async () => {
const fixture = await createCandidateArchiveFixture();
await expect(
@@ -601,7 +615,7 @@ describe("candidate archive and provider upload boundaries", () => {
providerValidationInput(fixture, Buffer.from(`${JSON.stringify(report)}\n`)),
),
).rejects.toThrow(/candidate identity mismatch/i);
}, 30_000);
});
it("uses the reverified archive manifest when extracted candidate files are mutated", async () => {
const fixture = await createProviderFixture();
@@ -686,7 +700,6 @@ describe("candidate archive and provider upload boundaries", () => {
});
expect(retried.status, retried.stderr).toBe(0);
},
20_000,
);
it("drains and kills provider background processes before sealing evidence", async () => {
@@ -728,7 +741,7 @@ describe("candidate archive and provider upload boundaries", () => {
expect(JSON.parse(await readFile(sealedPath, "utf8"))).toEqual(
expect.objectContaining({ provider: "fixture" }),
);
}, 10_000);
});
it("does not expose or mutate a host path outside the sandboxed workspace", async () => {
const fixture = await createProviderFixture();
@@ -749,7 +762,45 @@ describe("candidate archive and provider upload boundaries", () => {
});
expect(result.status, result.stderr).toBe(0);
await expect(readFile(canary, "utf8")).resolves.toBe("host-secret\n");
}, 10_000);
});
// 1103/11-04. In a linked worktree or a submodule checkout `.git` is a
// one-line `gitdir:` file. The sandbox hid `.git` with a tmpfs, which
// bubblewrap cannot mount on a file, so every provider run in a worktree
// ended with "Can't mkdir …/.git: Not a directory" before the provider ran.
it.each(["directory", "file"] as const)(
"hides repository metadata from the provider when .git is a %s",
async (shape) => {
const fixture = await createProviderFixture();
await rm(fixture.reportPath);
const metadata = path.join(fixture.root, ".git");
await rm(metadata, { recursive: true, force: true });
if (shape === "directory") {
await mkdir(metadata);
await writeFile(path.join(metadata, "HEAD"), "ref: refs/heads/fixture\n");
} else {
await writeFile(metadata, "gitdir: /repository/.git/worktrees/fixture\n");
}
const providerScript = path.join(fixture.root, "provider-git-metadata.mjs");
// Exit 9 when the provider can see what the metadata says, exit 8 when
// it can change it.
await writeFile(providerScript, [
"import { appendFileSync, readFileSync, readdirSync, statSync, writeFileSync } from 'node:fs';",
`const metadata = ${JSON.stringify(metadata)};`,
"const directory = statSync(metadata).isDirectory();",
"let visible = false;",
"try { visible = directory ? readdirSync(metadata).length > 0 : readFileSync(metadata).length > 0; } catch {}",
"if (visible) process.exit(9);",
"try { appendFileSync(directory ? `${metadata}/HEAD` : metadata, 'mutated\\n'); process.exit(8); } catch {}",
providerV2WriterSource({ importFs: false }),
].join("\n"));
const result = runProviderSupervisor(fixture, {
command: `node ${JSON.stringify(providerScript)}`,
sealedPath: path.join(fixture.root, "provider-evidence/vulnerability-report.json"),
});
expect(result.status, result.stderr).toBe(0);
},
);
it("applies effective aggregate cgroup limits without exposing command or credentials", async () => {
const fixture = await createProviderFixture();
@@ -851,7 +902,7 @@ describe("candidate archive and provider upload boundaries", () => {
expect(trace.every((entry) => !processExists(entry.pid))).toBe(true);
await expect(lstat(fixture.reportPath)).rejects.toMatchObject({ code: "ENOENT" });
await expect(findProviderRawReferences(fixture.reportPath, reportIdentity)).resolves.toEqual([]);
}, PROCESS_HEAVY_TIMEOUT_MS);
});
it("kills and collects an active provider when its guardian dies", async () => {
const fixture = await createProviderFixture();
@@ -894,7 +945,7 @@ describe("candidate archive and provider upload boundaries", () => {
sealedPath,
});
expect(retried.status, retried.stderr).toBe(0);
}, 20_000);
});
it("collects the whole provider scope when its supervisor dies", async () => {
const fixture = await createProviderFixture();
@@ -934,7 +985,7 @@ describe("candidate archive and provider upload boundaries", () => {
await expect(lstat(cgroupRoot)).rejects.toMatchObject({ code: "ENOENT" });
expect(cgroupPids.every((pid) => !processExists(pid))).toBe(true);
await expect(findProviderRawReferences(fixture.reportPath, reportIdentity)).resolves.toEqual([]);
}, 10_000);
});
it("fails closed when the guardian dies after scope collection and before commit", async () => {
const fixture = await createProviderFixture();
@@ -979,7 +1030,7 @@ describe("candidate archive and provider upload boundaries", () => {
await execution.completion;
}
}
}, 10_000);
});
it("cleans published evidence when the supervisor dies and permits same-workspace retry", async () => {
const fixture = await createProviderFixture();
@@ -1025,7 +1076,7 @@ describe("candidate archive and provider upload boundaries", () => {
await execution.completion;
}
}
}, 15_000);
});
it("observes EMFILE at the provider FD limit and still emits valid evidence", async () => {
const fixture = await createProviderFixture();
@@ -1046,7 +1097,7 @@ describe("candidate archive and provider upload boundaries", () => {
});
expect(result.status, result.stderr).toBe(0);
await expect(lstat(fixture.reportPath)).rejects.toMatchObject({ code: "ENOENT" });
}, 10_000);
});
it("enforces CPU RLIMIT before the independent wall-clock timeout", async () => {
const fixture = await createProviderFixture();
@@ -1063,7 +1114,7 @@ describe("candidate archive and provider upload boundaries", () => {
expect(result.stderr).toMatch(/exit=(?:137|152)|signal=SIG(?:XCPU|KILL)/iu);
expect(result.stderr).not.toMatch(/timed out/iu);
await expect(lstat(fixture.reportPath)).rejects.toMatchObject({ code: "ENOENT" });
}, 10_000);
});
it.each(["output", "timeout"] as const)(
"kills descendants and collects the scope on provider %s termination",
@@ -1107,7 +1158,6 @@ describe("candidate archive and provider upload boundaries", () => {
expect(cgroupPids.every((pid) => !processExists(pid))).toBe(true);
await expect(findProviderRawReferences(fixture.reportPath, reportIdentity)).resolves.toEqual([]);
},
10_000,
);
it.each(["vulnerability", "provenance"] as const)(
@@ -1150,7 +1200,6 @@ describe("candidate archive and provider upload boundaries", () => {
await waitForChildClose(canary.child);
}
},
10_000,
);
});
@@ -2173,6 +2222,27 @@ async function createProviderFixture() {
};
}
/**
* Top-level entries the provider base fixture leaves behind: build output,
* installed modules (linked separately below), and other checkouts or scratch
* trees that can live inside a checkout. `.claude/worktrees/*` and
* `.worktrees/*` are other worktrees of this repository and `.tmp/*` holds
* removal-drill fixtures, each with its own node_modules; copying them filled
* every /tmp/ci-provider-upload-* root with those trees, and the suite failed
* with timeouts and ENOTEMPTY clean-ups (1103/11-04). None of them is tracked,
* so the candidate's tracked-file inventory does not miss them.
*/
const PROVIDER_BASE_FIXTURE_UNCOPIED_ENTRIES: readonly string[] = Object.freeze([
".release",
"artifacts",
"dist",
"node_modules",
".claude",
".worktrees",
".tmp",
"graphify-out",
]);
async function ensureProviderBaseFixture(): Promise<string> {
if (providerBaseRoot) return providerBaseRoot;
const sourceRoot = process.cwd();
@@ -2183,7 +2253,7 @@ async function ensureProviderBaseFixture(): Promise<string> {
const relative = path.relative(sourceRoot, source);
if (!relative) return true;
const first = relative.split(path.sep)[0];
return ![".release", "artifacts", "dist", "node_modules"].includes(first ?? "");
return !PROVIDER_BASE_FIXTURE_UNCOPIED_ENTRIES.includes(first ?? "");
},
});
// The release evidence, minus the trace and Storybook trees. Copying the
@@ -0,0 +1,67 @@
import { cp, mkdtemp, rm, writeFile } from "node:fs/promises";
import { tmpdir } from "node:os";
import path from "node:path";
import { ESLint } from "eslint";
import { afterEach, describe, expect, it } from "vitest";
import {
ARCHITECTURE_LINT_FIXTURE_ROOT,
checkArchitectureLintFixtures,
} from "../../scripts/lib/architecture-lint-fixtures.ts";
const roots: string[] = [];
afterEach(async () => {
await Promise.all(roots.splice(0).map((root) => rm(root, { recursive: true, force: true })));
});
// 1103/12-04. The fixtures used to be linted under an ESLint entry of their
// own, so deleting a production layer rule still left them "rejected".
describe("architecture lint fixtures", () => {
it("are rejected by the production rules for their layer, and only the forbidden ones", async () => {
const result = await checkArchitectureLintFixtures({
root: process.cwd(),
linter: new ESLint({ cwd: process.cwd() }),
});
expect(result).toEqual({ allowed: 3, forbidden: 9, failures: [] });
}, 30_000);
it("fail when the production presentation rules lose their layer bans", async () => {
const result = await checkArchitectureLintFixtures({
root: process.cwd(),
linter: new ESLint({
cwd: process.cwd(),
overrideConfig: [{
files: ["src/presentation/**/*.{ts,tsx}"],
rules: { "no-restricted-globals": "off", "no-restricted-imports": "off" },
}],
}),
});
expect(result.failures).toEqual(expect.arrayContaining([
expect.stringContaining("forbidden/presentation-direct-fetch.tsx (as src/presentation/"),
expect.stringContaining("forbidden/presentation-imports-adapter.ts (as src/presentation/"),
expect.stringContaining("forbidden/template-imports-application.tsx (as src/presentation/templates/"),
]));
expect(result.failures.join("\n")).not.toMatch(/application-imports|domain-imports/u);
}, 30_000);
it("fail for a fixture nobody says what must reject", async () => {
const root = await mkdtemp(path.join(tmpdir(), "architecture-lint-fixtures-"));
roots.push(root);
await cp(ARCHITECTURE_LINT_FIXTURE_ROOT, path.join(root, ARCHITECTURE_LINT_FIXTURE_ROOT), {
recursive: true,
});
await writeFile(
path.join(root, ARCHITECTURE_LINT_FIXTURE_ROOT, "forbidden/unlisted.ts"),
"export const unlisted = true;\n",
);
const result = await checkArchitectureLintFixtures({
root,
linter: { lintText: async () => [{ messages: [{ ruleId: "no-restricted-imports", message: "x" }] }] },
});
expect(result.failures).toContain(
"forbidden/unlisted.ts: not listed in ARCHITECTURE_LINT_FIXTURES, so nothing says what must reject it",
);
});
});
@@ -0,0 +1,66 @@
import { mkdir, mkdtemp, rm, writeFile } from "node:fs/promises";
import { tmpdir } from "node:os";
import path from "node:path";
import { afterEach, describe, expect, it } from "vitest";
import { loadCiGateContract } from "../../scripts/contracts/ci-gates.ts";
import { validateCiArtifact } from "../../scripts/lib/ci-artifact-validator.ts";
const SUMMARY_PATH = "artifacts/tests/coverage/coverage-summary.json";
const roots: string[] = [];
afterEach(async () => {
await Promise.all(roots.splice(0).map((root) => rm(root, { recursive: true, force: true })));
});
const counter = (total: number, covered = total) => ({
total,
covered,
skipped: 0,
pct: total === 0 ? 100 : Math.floor((covered / total) * 10_000) / 100,
});
const metrics = {
lines: counter(4),
statements: counter(4),
functions: counter(1),
branches: counter(2),
};
async function validateSummary(summary: unknown): Promise<void> {
const contract = await loadCiGateContract(process.cwd());
const artifact = contract.artifacts.find((entry) => entry.path === SUMMARY_PATH);
const schema = contract.artifactSchemas.find((entry) => entry.id === artifact?.schemaId);
if (!artifact || !schema) throw new Error(`the CI contract no longer declares ${SUMMARY_PATH}`);
const root = await mkdtemp(path.join(tmpdir(), "coverage-summary-artifact-"));
roots.push(root);
await mkdir(path.join(root, path.dirname(SUMMARY_PATH)), { recursive: true });
await writeFile(path.join(root, SUMMARY_PATH), `${JSON.stringify(summary)}\n`);
await validateCiArtifact({ root, artifact, schema });
}
// 1103/12-09. istanbul-lib-coverage 3.2.2 puts `branchesTrue` in every blank
// summary, so the json-summary total always carries it. The CI evidence check
// refused the key that the risk-coverage gate reading the same file accepts,
// and FE-GATE-005 failed after every test had passed.
describe("coverage summary evidence (1103/12-09)", () => {
it("accepts the summary the coverage reporter writes, with branchesTrue", async () => {
await expect(validateSummary({
total: { ...metrics, branchesTrue: counter(0) },
"src/a.ts": metrics,
})).resolves.toBeUndefined();
});
it("accepts a summary without branchesTrue", async () => {
await expect(validateSummary({ total: metrics, "src/a.ts": metrics }))
.resolves.toBeUndefined();
});
it("still validates branchesTrue as a counter and refuses other keys", async () => {
await expect(validateSummary({
total: { ...metrics, branchesTrue: { ...counter(0), pct: 0 } },
})).rejects.toThrow(/pct/u);
await expect(validateSummary({ total: { ...metrics, branchesFalse: counter(0) } }))
.rejects.toThrow(/branchesFalse/u);
});
});

Some files were not shown because too many files have changed in this diff Show More