3 Commits
Author SHA1 Message Date
DongHyeonka 9e20d471b0 fix(build): 부팅 실패 화면이 앱 그래프 청크 없이 그려진다
앱 모듈 하나가 평가 중에 예외를 던지면 main.tsx는 부팅 실패 화면
(render-boot-failure.tsx)을 그린다. 그런데 그 청크가 route-not-found
청크에서 값 둘을 import하고, route-not-found에는 React, i18n 카탈로그,
installed-feature-messages.ts가 같이 들어 있다. 그래서 예외를 던진
청크에 실패 화면도 같이 걸려 그리지 못하고, 정적 「불러오는 중」
화면이 계속 남는다(boot-module-failure e2e, 세 엔진 모두).

원인은 vite.config.ts의 manualChunks다. Rolldown은 manualChunks를
includeDependenciesRecursively가 기본값(true)인 group으로 바꾼다. 그래서
route-not-found로 지정한 Public not-found 화면이 자기 정적 의존을 전부
그 청크로 끌고 간다. PR #6 전(27e342d) 빌드도 같은 import가 있었다.

템플릿과 같은 output.codeSplitting.groups 형식으로 바꾼다. react-dom과
route 화면 group은 includeDependenciesRecursively: false로 둬서, 화면
모듈만 그 이름의 청크에 들어가게 한다. 공유 모듈은 Rolldown이 쓰는
쪽에 따라 나눈다. preload-helper·react-dom·route 청크 이름은 그대로다.

검증:
- build-environment-bundle.test.ts에 시험 하나를 더했다. 실패 화면
  청크에서 정적 import로 닿는 청크 가운데 installed-feature-messages의
  오류 문구가 든 것이 없어야 한다. 고치기 전에는
  route-not-found-*.js가 잡혀 실패했고, 고친 뒤 통과한다.
- vite-route-chunks, bundle-*, chunk-recovery*, performance-budgets 단위
  시험(29건) 통과.
- e2e: boot-module-failure, old-tab-chunk-recovery,
  service-worker-update·recovery, production-csp가 chromium·firefox·
  webkit에서 통과한다.
2026-11-12 18:38:30 +09:00
DongHyeonka ed47b562bc perf(build): react-dom을 자기 청크로 빼 빌드 id만 바뀐 배포의 캐시 손실을 줄인다
빌드 id는 부트 실패 화면이 보여 주므로 render-boot-failure 청크에
들어간다(getBuildConfig). react-dom과 scheduler가 같은 청크에 있어서
빌드 id만 다른 두 빌드에서 그 190,478 B 청크의 이름이 바뀌었다. 해시
자산은 오래 캐시되는데, 재방문 사용자는 코드가 같아도 배포마다 이만큼
다시 받았다. 단위 시험 build-environment-bundle이 이 청크가 바뀐다고
실패했다.

템플릿 af6d0a9f(1103/15-06)와 같은 방식이다. manualChunks에서 react-dom·
scheduler를 react-dom 청크로 뺀다. 시험은 템플릿 새 판처럼 디자인 시스템
청크를 이름 대신 내용(ui-button--pending)으로 찾아 고정됐는지 보고,
react-dom 청크가 고정이며 render-boot-failure가 아닌지 본다. 이전 시험은
빌드 id를 일부러 담는 render-boot-failure를 공용 청크로 잘못 골랐다.

위험·한계: 정규식은 pnpm의 node_modules 배치를 가정한다. 배치가 바뀌어
그룹이 비면 시험이 실패한다. boot(약 320 KB)는 빌드 id로 설정을 대조하므로
계속 이름이 바뀐다(템플릿과 같음).

검증: 빌드 id만 다른 두 빌드에서 이름이 바뀐 청크는 boot·index·
render-boot-failure 셋이고, render-boot-failure는 12,138 B로 줄었다.
react-dom 청크와 디자인 시스템 청크는 두 빌드에서 이름이 같다.
2026-11-12 12:50:28 +09:00
DongHyeonka c80320dfc7 chore: sync the frontend template from ebea300 to af3d8e6
Carries 359 template commits, tag v0.2.0 plus one documentation commit: the
generator-built feature index with its app, bounded-context and feature
declarations, the src/platform kernel and scale tooling, the 2026-09-24 src
review fixes, and the 2026-09-25 maturity review round with its CHANGELOG
[보안]/[계약] rows. 691 of the 824 template paths are applied, 85 of them
merged with product changes; 127 are not carried.

Product identity is unchanged: name, version 0.1.0, routes, design and the
TechLog domain.

Three decisions worth naming. TechLog stays composed directly, as the last
two syncs recorded; its directory carries a NOT_INSTALLED marker that says so,
and every installed-* composer takes the template's projection with TechLog
added on top. The reference sample is no longer installed: the template now
installs a feature only through feature-module.ts and context-routes.ts,
which load the screens this product deleted, so its three operations, six
schemas and one topic leave the registries, recorded as registry change
evidence. And AppRouter mounts the platform and TechLog routes only; the
template's bounded-context route gateway waits for a generator-installed
feature.

Required fixes: readSubject on the BFF session owner (without it every HTTP
Studio session would close as integration-failed), zod through the facade in
nine TechLog files, noUnusedLocals, and public/config.json written out to
match the local profile. Derived baselines were recomputed after reproducing
both sides' values: CI contract 101 commands / 106 references / 141
artifacts, gate shape c9adcf85; registry approval 2dc6c3a3; the runtime
config schema baseline equals the schema at 8210d48.

Verified here: types, lint, architecture, adapter inventory, CI contract,
i18n, design system, diagnostics, browser security, dev release manifest,
TechLog contract and build pass; 220 component, 155 integration, 15
contract, 418 TechLog, 43 reference-feature, 18 recipe and 46
release-coherence tests pass, and 2381 of 2383 unit tests. Reproduced at
8210d48 first and unchanged: check:registries (byte-identical),
test:runtime-schema, verify:documentation. Brought by the template and
escalated rather than suppressed: check:request-fanout on TechLog's cursor
pagination, check:remediation-ledger (fails upstream too), the shared-chunk
hash test, and the registry-dependent sample removal and second-feature
tests. Playwright suites were not run.

Full record, the five open questions and the follow-ups in
docs/operations/template-sync-2026-09-29.md.

(cherry picked from commit b2170cf265dea45dc9cc05d3c61e627e97f31cdb)
2026-11-12 08:28:54 +09:00