Files
tech-log-frontend/docs/operations/template-sync-2026-09-29.md
T
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

538 lines
35 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Template sync — `ebea300` → `af3d8e6`
Record of how the frontend template's 359 pending commits (tag `v0.2.0` plus
one documentation commit) were transplanted into this product, and of every
decision taken where the two trees disagreed.
## Starting state
| | |
| --- | --- |
| template pin before | `ebea300` (`template.lock.json`) |
| template pin after | `af3d8e6` (tree `bbcb6dd`) |
| template commits carried | 359 (`ebea300..af3d8e6`) |
| template delta | 824 files: 371 added, 439 modified, 8 renamed, 6 deleted; +68,835 / −13,207 |
| this product's divergence since the last sync | 182 files (`afde2b1..8210d48`) |
| files touched by both since `ebea300` | 90 |
| template paths applied verbatim | 606 |
| template paths applied with product changes | 85 |
| template paths not carried | 127 (listed below) |
Rollback ref created before touching anything:
```
backup/main-before-template-af3d8e6 → 8210d48
```
The histories share no commit, so this is again a patch transplant. It was
done as a three-way merge against an explicit base:
`git merge-recursive ebea300 -- HEAD template/main`, which left 67 conflicts
in the working tree (49 content, 17 modify/delete, 1 rename/delete).
### Pre-transplant baseline
Captured in a clean worktree at `8210d48`, so a pre-existing failure could not
be mistaken for a transplant regression.
| Gate | Result at `8210d48` |
| --- | --- |
| `check:types`, `lint`, `check:architecture`, `check:adapter-inventory`, `check:ci`, `check:i18n`, `check:remediation-ledger`, `check:design-system`, `check:diagnostics`, `check:browser-security`, `check:dev-release-manifest`, `check:tech-log-contract`, `build` | pass |
| `check:registries` | fail — 5 structure errors (three TechLog schema ids unregistered), 6 breaking changes without evidence |
| `test:unit` | 1792 passed (140 files) |
| `test:component` | 154 passed |
| `test:integration` | 102 passed |
| `test:contract` | 7 passed |
| `test:runtime-schema` | 44 passed / 1 failed (`release-manifest.test.ts` expects Studio contract 3.0.0; it is 3.1.0) |
| `test:tech-log` | 417 passed |
| `test:reference-feature` | 19 passed |
| `test:recipes` | 17 passed |
| `test:coverage` | 2535 passed / 1 failed (the runtime-schema test above), so the risk-coverage check is never reached |
| `verify:documentation` | `FAIL_UNVERIFIED`: `routeScopeDocumented: false` |
| `test:sample-removal` | fails: `typecheck`, `registry-structure`, `unit-integration`, `coverage` |
## What the template brought
| Group | Substance |
| --- | --- |
| Domain-scalable structure (`e59994a`) | Features are declared by `src/features/<id>/feature-module.ts`, owned by a bounded context (`src/contexts/<id>/context-module.ts`) inside a deployable app (`src/apps/<id>/app-module.ts`). `scripts/generate-product-feature-index.ts` writes `src/.generated/` from those declarations, and every composer (`installed-*`) is a projection of the generated index. New `src/platform/` kernel (cardinality, errors, telemetry pipeline, traffic, resilience, release coherence) and the scale tooling under `scripts/scale/` |
| 2026-09-24 src review (`4626b73`) | HTTP 408/425/503 handling, abort kernel reuse, SSE parsing, demo subject |
| 2026-09-25 maturity review (`f1002fd`) | The 0.2.0 CHANGELOG rows: correlation ids, idempotency-key reuse on unknown-effect resend, 422 field issues, `readSubject` required, `VITE_*` only through `ENV_REGISTRY`, zod only through `src/contracts/zod.ts`, generator-applied `VITE_PRODUCT_FEATURES`, `feature-module.ts` or `NOT_INSTALLED` per feature directory, CI contract baseline file, every test file gated or listed, FE-GATE-028 for the signed manual accessibility review, runtime-config schema baseline, `noUnusedLocals`, boot error shell for module-evaluation failures, and a long list of adapter fixes |
| Other | WebKit wording fix for the old-tab chunk spec, deferred-decision records |
## What was deliberately not carried
| Path | Why |
| --- | --- |
| `artifacts/phase5/**` (4), `artifacts/quality/extreme-scale-gates/**` (24), `artifacts/scale/**` (35) | Logs of the template's own runs. `scripts/scale/run-scale-profile.ts` and `scripts/verify-extreme-scale.ts` *write* them; `verify-extreme-scale` reads only `summary.json`, `browser-soak.json` and `baseline-comparison.json`, which are regenerated and gitignored. Nothing reads the committed `.log` files. |
| `CLAUDE.md`, `SPEC.md`, `tasks/**` | The template repository's own review instructions and the task tracking of its 2026-09-25 fix round (branch states, lanes). False here. `tests/unit/deletable-history-documents.test.ts` confirms no code reads them. |
| `CHANGELOG.md` | The template's release notes (`version 0.2.0`). This product's version is its own; the README and `docs/README.md` now point at the template repository's changelog instead. |
| `docs/reviews/2026-09-2{3,4,5}-*` (28 files), `docs/reviews/TEMPLATE-MATURITY-REVIEW-GUIDE.md` | Reviews of the template repository at its own commits, with its own file:line findings, and the guide those reviews follow. Only `CHANGELOG.md` linked to them. |
| `src/features/reference-feature/{feature-module,context-routes}.ts` and `…/presentation/**` (9 paths) | Installing the sample now requires its screens, which this product deleted (see the reference-feature decision below). |
| `src/presentation/{pages/home-page,pages/not-found-page,examples/auth-example-page,examples/platform-overview-page}.tsx` | Deleted by this product's UI migration; the template modified them. The deletions stand. |
| `tests/e2e/reference-{form,route,save}.spec.ts`, `tests/features/reference-feature/{reference-page,reference-production-vertical,feature-module,installed-context-routing}.test.tsx?`, `tests/visual/platform.visual.spec.ts` and its three PNGs | Assert the deleted sample screens, the uninstalled sample's descriptor or the template's own pages. |
| `tests/component/app-shell.test.tsx` | Drives the template `AppShell` through `AppRouter`. This product never mounts `AppShell`. |
| `tests/component/context-route-gateway.test.tsx`, `tests/component/route-status-surfaces.test.tsx` | Drive the template's bounded-context route gateway and its example pages, which this product's router does not mount (see the router decision below). |
Template tests that asserted a platform behaviour on deleted template screens
were ported onto TechLog routes instead of being dropped — see "Template tests
ported onto TechLog".
## Conflicts and how each was decided
The rule is the one the previous two syncs wrote down: **keep the template's
mechanism, keep the product's content, and never invent a third state that
neither branch would accept.**
### The generated feature index — `src/features/*/NOT_INSTALLED`
The substantive change of this sync. The template no longer lists features by
hand anywhere: the generator scans `src/features/<id>/`, and a directory must
either declare itself with `feature-module.ts` (and `context-routes.ts` for its
screens) or carry a `NOT_INSTALLED` marker, or the first build step fails.
Every `installed-*` composer is now a projection of the generated index.
This product has three feature directories:
- `local-draft-feature` — the template itself now marks it `NOT_INSTALLED`.
Previous follow-up 5 ("carried but not installed") is settled upstream.
- `tech-log` — this product's domain. The previous two syncs recorded that
TechLog is composed directly rather than as a selectable feature, and that
decision stands. Its routes are served by the product's grouped
PUBLIC/STUDIO router, not by a bounded-context route module, so a
`feature-module.ts` would be a second, unused description of it. It carries
a `NOT_INSTALLED` marker whose text says exactly that: the generator must
leave the directory alone; TechLog is composed by the composition root.
- `reference-feature` — the template's removable sample. See the next section.
With no generator-installed feature, `src/.generated/` declares none, the
deployable app is the template's `template-app` declaration with no populated
context, and `COMPILED_PRODUCT_FEATURE_IDS` is empty.
### `reference-feature` is no longer installed
Until now the sample stayed half-installed: its operations, schemas, adapter
input, contract contribution and messages were composed, and its routes were
filtered out because this product deleted its screens. The template's new
mechanism has no such state. A feature is installed by `feature-module.ts`,
whose `context-routes.ts` imports the page components, and whose contract's
routes enter the route registry. Recreating the half-installed state would need
a product-only `context-routes.ts` with no routes and the old route filter back
in `installed-feature-contracts.ts` — a third state neither side has.
So the directory carries `NOT_INSTALLED`, with the reason. Its code and its own
tests stay (they compile and pass), so reinstalling it or deleting it outright
remain open, and the next sync merges cleanly. What changes at runtime: the
three `REFERENCE_RESOURCE` operations, their six schemas and the one
invalidation topic leave the registries and the bundle. Nothing in this
product called them. The removal is recorded as 13 evidence entries in
`config/contracts/registry-change-evidence.json` (owner `tech-log-frontend`),
the same way the product recorded removing the template's routes, and
`FEATURE_OVERRIDES.reference-feature` is dropped from the four runtime
profiles and `public/config.json` — what the template's own removal procedure
does, and what keeps boot from reporting an override for an undeclared
feature (09-09). Whether to delete the directory is an open question below.
### Composers — `src/features/installed-*.ts(x)`
All five take the template's version, then add TechLog directly:
- `installed-feature-adapters.ts` — the template's module projection and its
`activeFeatureIds` parameter (Q-6.9-5, the kill switch now withholds a
switched-off feature's input). TechLog's input is composed on top and stays
total; neither the index nor `activeFeatureIds` governs it.
- `installed-contract-contributions.ts` — the descriptors' contributions, then
TechLog's three.
- `installed-feature-contracts.ts` — `composeUniqueRecord` over platform,
TechLog and installed routes (a duplicate route id now throws). The
previous sync's route filter and its ownership filter are gone: with the
sample uninstalled no registered route lacks a component.
- `installed-feature-messages.ts` — `composeInstalledMessageCatalogs` over the
installed modules plus TechLog's catalogs, so a key defined twice for one
locale throws for TechLog too. The type is keyed by TechLog's locales.
- `installed-feature-runtimes.tsx` — `composeUniqueRecord` over platform,
TechLog and installed runtime descriptors. The previous sync kept an object
spread because the template's `Object.assign` widened the catalogs to
`any`; `composeUniqueRecord` keeps them typed, so that reason is gone.
### Router — `src/presentation/routes/app-router.tsx`
Taken from the template: the shared `LoadingSurface` and `StatusPage` for the
loading, failure, invalid-address, disabled-feature and integration-failed
surfaces; the support reference `build:incident` on route failures (08-07);
route lifecycle (title, telemetry) for every answer a route gives, with the
title effect split from the navigation effect; no scroll-to-top on back and
forward (08-08); a query on a route without search is kept in the URL (D-16,
here expressed as `searchSchema === null`); `useSessionAction`; the keyed
`ChunkRecoveryBoundary` with `buildId` and `onUnrecovered`; and the router
created in the effect that disposes it, below `PreferenceProviders`.
Kept from the product: the grouped PUBLIC/STUDIO layouts, the registered
not-found descriptor, the sign-in card with its return address, and no route
focus on `#main-content` (removed in `6c2780b` for UI parity; the shells own
focus).
Not carried: the template's bounded-context route gateway
(`ContextRouteGateway`). It mounts generator-installed features' routes, and
none is installed here. `AppRouter` now mounts `MOUNTED_ROUTE_REGISTRY` —
platform plus TechLog — rather than the whole installed registry, which is
also what keeps the app typecheck green when a generator feature is installed
(`tests/unit/two-feature-install-typecheck.test.ts`). The day one is installed,
`tests/component/product-feature-switch.test.tsx` ("registers no route that
cannot be mounted") fails until the gateway is wired in. Follow-up.
### Boot — `src/bootstrap/main.tsx`, `create-runtime-composition.ts`, `runtime-adapters.ts`
`main.tsx` is the template's entry that imports `boot.tsx` dynamically
(09-03), with this product's font and TechLog stylesheet imports kept in the
entry. The composition keeps the BFF session-owner installation and takes the
template's telemetry hand-off to the optional host (06-05). The feature
capabilities object carries both the template's `telemetry` and TechLog's
source switches and CSRF provider.
### Design system and forms
- `Pagination` (`primitives/navigation.tsx`) — the template's version (landmark
context for `CollectionPage`, links that keep the other search parameters,
modified clicks left to the browser, a single hidden page shown instead of an
ellipsis) with this product's options added back: `pageControl: "button"`,
`pageAccessibleLabel`, `className`, `around`, and the `ol.ui-pagination__pages`
list the Studio stylesheet and tests target. The product's "show every page
when there are few" rule is replaced by the template's window with `around`
neighbours; `StudioPagination` keeps `around={2}` and its tests pass
unchanged.
- `Dialog` (`primitives/core.tsx`) — the template's "restore focus only if the
dialog still owns it" guard on this product's synchronous restore.
- `StatusPage` — the template's `surface` prop beside this product's
`className`, `headingNode` and `visualPolicy`; `children` renders once, under
the actions, as upstream.
- `application-query.ts` — the template's idempotency-key reuse on resend
(03-01) written against this product's lazily acquired `submissionChannel`.
- `feature-http-binding.ts` — both the product's `detail` and the template's
422 `validationIssues` pass through.
- `platform-route-codecs.ts` — the template's non-strict `none` codec (D-16)
with this product's non-empty splat.
### Messages — `src/presentation/i18n/catalog.ts`
Both sides wrote copy for the 22 failure kinds that had none (07-01). This
product's copy is kept; the template's boot keys come in through
`BOOT_MESSAGES` (09-03). The template's `home.*` keys belong to its home page,
which this product deleted, so they and their parameter entry are not carried.
### Build and CI
- `vite.config.ts` — the template's declared-`VITE_*` check (13-06) and
config-under-base check (13-07); one `manualChunks` under `rolldownOptions`
that splits the template's preload helper first (09-03) and then this
product's named TechLog route chunks, plus this product's Studio
`modulePreload` filter.
- `scripts/build-frontend.ts` — the template's self-unregistering worker and
dist permissions steps around this product's serving-boundary step.
- `scripts/check-i18n.ts` — the template's discovery of every feature's
`presentation/`, with TechLog's held to this product's behavioural-literal
policy instead of the whole-file Korean rule.
- `scripts/check-design-system.ts` — deep-import and icon checks moved to the
import graph upstream; this product's palette rule is kept.
- `scripts/generate-ci-workflow.ts` and the workflow — pushes to `main` only,
as this product already had (the template also lists `develop`).
- `config/ci/gates.json` — merged per id. The template moved the signed manual
accessibility review out of FE-GATE-009 into release gate FE-GATE-028
(08-06); this product's per-route evidence moved with it, and the template's
five records for its own routes stay deleted. `scripts/contracts/ci-gates.ts`
now pins that one-record-per-mounted-route rule on FE-GATE-028.
- `scripts/test-performance.ts` — the template's median-of-runs measurement
(11-07). Its named interaction is a click on a navigation link to the target
heading; this product had measured the landing heading without a click, which
that clock cannot express, so the interaction is now landing → Explore
(`TECH_LOG_EXPLORE`). Not run here (Playwright). Open question below.
- `scripts/test-sample-removal.ts` — the template's `--feature=<id>` version.
It locates a `NOT_INSTALLED` directory directly, and this product's two
extra owned paths (`studio-csrf-composition.test.ts`, and now the sample's
bounded context) and two excluded tests are kept.
- `package.json` — the template's scripts with the generator prefix; this
product's name, version and scripts. The generator prefix is also added to
`check:dev-release-manifest`, `generate:dev-release-manifest`,
`check:tech-log-contract` and `generate:tech-log-contract`, which reach the
generated index (`tests/unit/product-index-entrypoints.test.ts`).
### Documents
`README.md` takes the template's runtime-configuration, support-scope,
documentation, CI and "Updating a copied project" sections, edited where they
would be false here: the support scope names TechLog's shells instead of the
example routes and lists the reference sample as not installed; the deletable
history table drops `SPEC.md`, `tasks/` and `CLAUDE.md`; the workflow runs on
`main`; and the origin record is `template.lock.json`, which already says
more than the suggested one-line `.template-origin`. `docs/README.md` (the
template's document index) is carried with its links to the uncarried files
removed. `docs/accessibility/manual-checklist.md` keeps this product's route
list and takes the FE-GATE-028 paragraph; the template's description of its own
accessibility spec is not carried, because this product's spec differs.
### Derived baselines — recomputed, not chosen
Each was recomputed with the template's own command or function, after first
reproducing both sides' committed value from their own input.
| Value | This product | The template | Merged |
| --- | --- | --- | --- |
| CI contract (`config/ci/contract-baseline.json`, `update:ci-contract-baseline`) | 27 / 94 / 106 / 141 / 5, `629e5898…` | 27 / 98 / 103 / 109 / 5, `630e8012…` | **27 gates / 101 commands / 106 references / 141 artifacts / 5 stages, `c9adcf85701156097262d8f88203fe42f8be003033e1b6c296a0062e56f10324`** |
| evidence artifact references (`ci-workflow-generation.test.ts`) | 120 | 87 | **119** |
| registry baseline approval digest (`registrySnapshotDigest`) | `428479ac…` | `83d11f84…` | **`2dc6c3a36a5e06c5b4736a0e2bc556d74437f061e6adb71c4e4fb96293170def`** |
| runtime-config schema baseline (`check-compatibility.ts --update-baseline`) | — | template's schema | **this product's schema, byte-identical to the one at `8210d48`** |
The CI contract's hard-coded counts moved upstream into the baseline file
(14-02), so `scripts/contracts/ci-gates.ts` no longer carries them. The
registry baseline is a per-registry, per-row three-way merge of both approved
snapshots; its new approval takes no row from the current tree, so this
product's six pending TechLog route changes stay unapproved. The runtime-config
baseline stands for "the schema the previous release's reader accepts"; the
previous release is `8210d48`, and the schema did not change.
### Template tests ported onto TechLog
Where a template test pinned a platform behaviour on a screen this product
deleted, the test was moved onto a TechLog route rather than dropped:
| Test | Upstream subject | Here |
| --- | --- | --- |
| `tests/component/router.test.tsx` | D-16 query on `/examples/ui`; route lifecycle on fixture-feature surfaces | `/projects?utm_source=mail`; the sign-in gate on `/studio` |
| `tests/component/chunk-recovery-boundary.test.tsx` (2 cases) | states example page | Explore page; sibling move to Topics |
| `tests/component/render-boundary.test.tsx` | states example page | Explore page |
| `tests/component/locale-platform.test.tsx` | the app shell's language selector | the file's own locale harness |
| `tests/component/runtime-application.test.tsx` | shell language selector and session button | stored preference; the Studio sign-in gate |
| `tests/e2e/old-tab-chunk-recovery.spec.ts` | platform and UI example pages | Explore and Topics (not run here) |
| `tests/component/product-feature-switch.test.tsx` | — | the owner is a fixture id and the feature port reports it active or off, since no feature is generator-installed |
Template tests whose invariant is "every feature comes from the generated
index" now also account for TechLog composed directly
(`installed-feature-messages`, `route-runtime`, `product-feature-selection-build`).
Tests that hard-coded template copy or template route ids now use this
product's (`form-foundation`, `manual-a11y-evidence`, `ci-workflow-generation`,
`feature-override-diagnostics`).
## Fixes the transplant required
### `readSubject` on the TechLog session owner — `bff-session-owner.ts`
The template now closes an external session owner without `readSubject` as
`integration-failed` (c6300e9). The HTTP Studio's only owner is
`createBffSessionOwner`, which had none — so every Studio session in
production would have closed. It now has one. `getStudioSession` returns a
display name and roles but no identifier that is stable for one user and
distinct between users, so the owner reports `null`: the runtime then treats a
change of state as a possible user switch and clears server state, recording
`SUBJECT_MISSING`. The owner only notifies when the probed state changes, so
that is one fence per sign-in. `tests/features/tech-log/bff-session-owner.test.ts`
pins that the owner is complete. A real subject needs the backend (open
question below).
### zod through `src/contracts/zod.ts` (F-7)
Nine TechLog files imported `zod` directly; the architecture gate now refuses
that. They import `z` from the facade, which sets `jitless` before any schema
is built, so the production CSP sees no eval probe.
### `noUnusedLocals` (12-12)
The flag found 22 unused imports and locals in TechLog source, one unused
helper in `scripts/generate-nginx-config.ts`, and nine in tests (eight under
`tests/features/tech-log`). All were removed except three compile-time
assertions in `tests/features/tech-log/feature-input.test.ts` and
`studio-contract.test.ts`, which are exported instead: removing them would
remove the check.
### Runtime profiles and `public/config.json`
The template requires `public/config.json` to equal the local profile plus
`BUILD_ID` and `RELEASE_ID` (F-5). It lacked this product's two
`TECH_LOG_*_SOURCE` keys, whose defaults it relied on; they are now written
out, with the same values. `FEATURE_OVERRIDES.reference-feature` left every
profile with the sample (above). `public/release-manifest.json` keeps this
product's `appVersion` 0.1.0; the merge had taken the template's 0.2.0.
### Scripts that reach the generated index
`tests/unit/product-index-entrypoints.test.ts` requires every script that
imports `src/.generated/` to run the generator first. This product's
`check:dev-release-manifest`, `generate:dev-release-manifest`,
`check:tech-log-contract` and `generate:tech-log-contract` do, and are
prefixed. `scripts/lib/manual-a11y-evidence.ts` did too, through the CI
contract parser, which would have forced a prefix on `check:ci` — and the
template requires `check:ci` to be its exact canonical command. The manual
accessibility scope is now read from the platform and TechLog route
registries directly: the set `AppRouter` mounts.
### `verify:tech-log-source-parity` is listed as ungated
Every verification script must run in a gate or be listed with a reason
(12-04). This one needs the original TechLog source served on another port,
which no CI runner has; it is listed in `config/ci/ungated-scripts.json`.
### Idempotency-key reuse (03-01) in two TechLog tests
`studio-save-navigation` and `studio-publication-flow` asserted that a retry
after a 503 uses a new key. The template now resends a write whose outcome is
unknown with its original key, so the backend can apply it once; the TechLog
contracts already declare `IDEMPOTENCY_REPLAY`. The two assertions now expect
the original key. The backend guarantee is an open question below.
### Chunk failures are recorded (08-07)
An unrecovered chunk failure is now recorded as `ui.render.failed` with the
incident id its support reference shows. `public-discovery-screens.test.tsx`
asserted that nothing was recorded for a failed not-found chunk; it now
asserts the one record, under `NOT_FOUND`. Its render helper also waits out
data loading only, since the route's own loading surface is now the shared
`LoadingSurface`.
### Release fixtures carry this build's contract set
`tests/release/fixtures/R10`/`R11` stand for releases of this repository.
Upstream the compiled contract set is empty and the fixtures write
`__EMPTY_SET_DIGEST__`; here it holds TechLog's three packages, so
`tests/release/release-fixture.ts` substitutes the set this build compiles.
### The sample's own composition test installs the sample
`tests/features/reference-feature/reference-runtime-composition.test.ts`
exercises the production graph with a real feature. With the sample
uninstalled it installs it for itself through the generated index, the way the
template's platform tests install their test-only feature.
## Gates on the transplanted tree
Run on the working tree after `corepack pnpm install` (no lockfile change).
Another agent was running gates on the same machine; every failure that
looked timing-sensitive was re-run alone (see below).
| Gate | `8210d48` | After the sync | |
| --- | --- | --- | --- |
| `check:types` | pass | pass (6 projects, `noUnusedLocals` on) | |
| `lint` | pass | pass, `--max-warnings=0` | |
| `check:architecture` | 507 modules, 14 fixtures | 565 modules, 2059 dependencies, 28 graph fixtures, TechLog route source of truth | pass |
| `check:adapter-inventory` | 133 files, 21/21 ratchet | 145 files, 22 abort-primitive importers, 13/13 ratchet | pass |
| `check:ci` | pass | 27 gates, baseline file, workflow bytes | pass |
| `check:registries` | fail | fail, **byte-identical output** | pre-existing |
| `check:i18n` | 460 keys | 455 keys (template's home-page copy not carried) | pass |
| `check:remediation-ledger` | pass | fail (budget statement) | template, escalated |
| `check:design-system` | 48 tokens | 48 tokens | pass |
| `check:diagnostics` | 8 / 5 | 9 diagnostics / 6 telemetry producers | pass |
| `check:browser-security` | pass | pass | |
| `check:dev-release-manifest` | pass | pass | |
| `check:request-fanout` | — (new) | fail: `collect-catalog.ts:30` | template, escalated |
| `check:tech-log-contract` | pass | pass | |
| `build` | pass | pass | |
| `test:unit` | 1792 | 2381 passed / 2 failed (174 files) | template, escalated |
| `test:component` | 154 | 220 passed | pass |
| `test:integration` | 102 | 155 passed | pass |
| `test:contract` | 7 | 15 passed | pass |
| `test:runtime-schema` | 44 / 1 failed | 60 / 1 failed, same test and assertion | pre-existing |
| `test:tech-log` | 417 | 418 passed | pass |
| `test:reference-feature` | 19 | 43 passed | pass |
| `test:recipes` | 17 | 18 passed | pass |
| `test:platform` | — (new) | 247 passed / 1 failed (request fan-out) | template, escalated |
| `check:release-coherence` | — (new) | 46 passed | pass |
| `test:coverage` | 1 failed | 3599 passed / 4 failed: the runtime-schema test and the three escalated tests; risk-coverage not reached on either side | pre-existing + escalated |
| `verify:documentation` | `FAIL_UNVERIFIED` | `FAIL_UNVERIFIED`, same cause; the template's new README variable check passes | pre-existing |
| `test:sample-removal` | fail (4 checks) | fail earlier, at the registry re-baseline | pre-existing cause, escalated |
`tests/component/boot-unexpected-failure.test.tsx` failed once in a full run
while the other agent's gates were running (its boot graph did not settle
inside the default one-second wait) and passed four times alone and in the
final full run; it is load-sensitive, not introduced.
Not run: Playwright e2e, visual and lab-performance
(`test:e2e`, `test:visual`, `test:a11y`, `test:performance`), so the ported
`old-tab-chunk-recovery.spec.ts` and the new lab interaction are unverified.
No visual snapshot was touched: the three template PNGs belong to the
platform spec this product deleted.
## Failures this sync did not cause, and did not fix
Each was reproduced at `8210d48` in the baseline worktree first.
| Gate | State |
| --- | --- |
| `check:registries` | Same five structure errors and six unevidenced TechLog route changes; output byte-identical. |
| `test:runtime-schema` | `release-manifest.test.ts` expects the vendored Studio contract at 3.0.0; it is 3.1.0. |
| `verify:documentation` | `routeScopeDocumented: false`, as recorded by the previous sync. |
| `test:coverage` | Fails on the runtime-schema test on both sides, so `check-risk-coverage` never runs; after the sync it also carries the escalated failures below. |
## Failures the template brought, escalated rather than fixed
Each fails because of something the template introduced, and each was left
failing rather than made green by weakening a check.
| Gate / test | Cause | Why not fixed here |
| --- | --- | --- |
| `check:request-fanout` (FE-GATE-010), and `tests/architecture/request-fanout.test.ts` in `test:platform` and `test:coverage` (FE-GATE-005) | The template's new N+1 source gate flags `gateway.getCatalog()` inside the loop at `src/features/tech-log/application/collect-catalog.ts:30`. That loop is cursor pagination — one request per page of 100, bounded at 50 pages, each needing the previous page's cursor — not one request per row. | The gate's own escape is a `// fanout-reviewed: <reason>` comment on the call's line: a reviewed suppression. Adding one is a reviewer's call, not a merge's. Open question 1. |
| `tests/unit/build-environment-bundle.test.ts` ("keeps the values the app reads and nothing else") | 09-03 expects the shared application chunk to keep its hash when only `VITE_BUILD_ID` changes. This product's `manualChunks` (named TechLog route chunks) leaves one shared chunk that also holds the build-id reader, so every chunk changes hash on every build. That was already true before the sync — then the whole app was one entry chunk. The test now names the product's shared chunk (`render-boot-failure-*`; upstream it is `design-system-*`) and fails on the property itself. | Needs a chunking change in `vite.config.ts` that keeps the route chunk names the build manifest requires; one attempt (isolating the boot-failure module) did not separate the shared code. Follow-up. |
| `tests/unit/second-api-feature-registries.test.ts` | Adds a feature to a copy of the tree and expects `check:registries` to pass there. It inherits this product's registry defect (previous follow-up 2). | Fixing that defect registers TechLog schema ids and approves six TechLog route changes: product work. |
| `test:sample-removal` (FE-GATE-020) | The template's removal now re-baselines the registries in the fixture with `update:registry-baseline`, which runs `check:registries --no-baseline` and stops on the same registry defect. The script throws there, before its other checks run. At `8210d48` it failed later, on four named checks, for the same root cause. | Same as above. |
| `check:remediation-ledger` | The ledger does not state the file-transfer budget the template later ratcheted to 55,700 bytes. Reproduced on an unmodified export of the template at `af3d8e6`, which fails it with four findings (this product's evidence-path fixes from the previous sync remove three). The template moved the script to `config/ci/ungated-scripts.json` with that reason; no gate runs it on either side. | Editing a history record to state a later number is the template's call, and it declined. |
## Follow-ups
The previous sync left five. Their state now:
1. **TechLog's HTTP gateways address operations by id through a shim.**
Closed before this sync, by `aaa384c` (`tech-log-http-binding.ts` builds
every gateway on `createFeatureHttpBinding`; the composition-root shim is
gone). This sync did not change it.
2. **The schema registry defect keeps gates red.** Still open, and it now
blocks more: besides `check:registries`, it stops `test:sample-removal`
earlier and fails the template's new `second-api-feature-registries` test.
`check:registries` output is byte-identical to `8210d48`.
3. **`tests/mocks` is feature-owned but TechLog imports it.** Unchanged. It
cannot be re-checked until `test:sample-removal` gets past the registry step.
4. **`check:i18n` cannot tell a comment from a literal.** Closed before this
sync, by `aaa384c` (TechLog presentation is held to a behavioural-literal
policy). This sync kept that policy while taking the template's per-feature
discovery; `check:i18n` passes.
5. **`local-draft-feature` carried but not installed.** Settled upstream: the
template marks it `NOT_INSTALLED` itself.
New:
6. **TechLog is not a generator-installed feature.** It carries a
`NOT_INSTALLED` marker because it is composed directly. The template's shape
for it would be `feature-module.ts` in a bounded context whose route module
serves TechLog's routes — which means moving the grouped PUBLIC/STUDIO router
onto context route modules. Its own change.
7. **The bounded-context route gateway is not mounted.** `AppRouter` mounts
platform and TechLog routes only. The day a generator-installed feature
arrives (the sample reinstalled, or TechLog moved per item 6), the
template's `ContextRouteGateway` has to be wired into a layout group, and
the template tests not carried for that reason
(`context-route-gateway`, `route-status-surfaces`, `app-shell`) come back.
8. **Shared chunk hash changes with every build.** See the
`build-environment-bundle` row above.
9. **`template-app` is the deployable app's id.** The generator requires one
app declaration; the template's (`src/apps/template-app/`) is carried as is.
Renaming it is cosmetic and touches no behaviour.
10. **Lab performance measures landing → Explore.** Not run here; the budget
(200 ms named interaction) has not been checked against it.
## Open questions for the product owner
1. **Cursor pagination and the N+1 gate.** Approve
`// fanout-reviewed: cursor pagination, one request per 100-row page, at most 50 pages`
on `src/features/tech-log/application/collect-catalog.ts:30`, or give the
Studio catalog a bulk read. Until then FE-GATE-010 and FE-GATE-005 are red.
2. **Delete `src/features/reference-feature`?** It is now uninstalled, with its
code and tests kept so the next sync merges cleanly and its own tests keep
running. Deleting it is what the template's removal gate proves possible;
reinstalling it means bringing its screens back.
3. **Studio session subject.** `getStudioSession` has no stable user
identifier, so the BFF owner reports none and every sign-in clears server
state once. A `subject` (for example the OIDC `sub`) in the session response
would let a token refresh keep the cache. Backend contract change.
4. **Same-key resend.** The client now resends a write whose outcome is
unknown with its original idempotency key (template 03-01). The TechLog
Studio and management contracts declare `IDEMPOTENCY_REPLAY`; confirm the
backend applies a repeated key once and returns the first result.
5. **Lab performance interaction.** The template's lab gate times a click on a
navigation link to the target heading. This product now uses landing →
Explore. Confirm that is the interaction to budget, or name another.