fix(build): render product index before every script that loads it (R-0)

The first R-0 pass prefixed only the tsc/vite/test entry points. 36 more
package scripts run node entry files that import src and therefore the
gitignored index, including ci:gate (the CI runner) and check:ci, so they
still failed on a fresh checkout.

- prefix those scripts with the index generator
- update the CI contract's canonical check:artifact-schemas command
- the guard test now walks relative imports from every node entry and
  fails if a script reaches src/.generated without rendering it first

Verified from a fresh state: check:registries, check:ci, check:i18n,
check:design-system, check:diagnostics, check:realtime-boundaries,
check:artifact-schemas, verify:compatibility, ci:gate FE-GATE-001 pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
DongHyeonka
2026-09-24 12:44:50 +09:00
co-authored by Claude Opus 5.5
parent 7022a1efd0
commit 7dfb89f894
3 changed files with 84 additions and 50 deletions
+4 -1
View File
@@ -573,7 +573,10 @@ export async function loadCiGateContract(
throw new TypeError("check:ci must use the exact canonical non-recursive orchestration");
}
const canonicalCheckCiDependencies = {
"check:artifact-schemas": "node scripts/generate-artifact-schemas.ts --check",
// R-0. The schema generator imports src, which loads the gitignored
// product index, so the index is rendered first.
"check:artifact-schemas":
"node scripts/generate-product-feature-index.ts && node scripts/generate-artifact-schemas.ts --check",
"check:ci-workflow": mode === "canonical"
? "node scripts/generate-ci-workflow.ts --check"
: "node scripts/generate-ci-workflow.ts --check --reduced-removal-fixture",