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 at8210d48. 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 at8210d48first 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)
This commit is contained in:
@@ -152,6 +152,8 @@ export const moduleInventoryArtifactSchema = z
|
||||
})
|
||||
.strict(),
|
||||
),
|
||||
// 13-12: `name@version` of every package with a module in the bundle.
|
||||
packages: z.array(z.string().regex(/^(?:@[^/@]+\/)?[^/@]+@[^/@]+$/u)),
|
||||
})
|
||||
.strict();
|
||||
|
||||
@@ -688,6 +690,11 @@ export const deploymentAdmissionArtifactSchema = z
|
||||
violations: z.array(
|
||||
z.object({ field: nonEmptyString, reason: nonEmptyString }).strict(),
|
||||
),
|
||||
// 09-09. Findings that do not refuse the artifact, e.g. an override key
|
||||
// naming a feature this build does not declare.
|
||||
warnings: z.array(
|
||||
z.object({ field: nonEmptyString, reason: nonEmptyString }).strict(),
|
||||
),
|
||||
})
|
||||
.strict();
|
||||
|
||||
@@ -718,31 +725,67 @@ export const releaseVerificationArtifactSchema = z
|
||||
})
|
||||
.strict();
|
||||
|
||||
// 11-01 / 13-03 (D-14): each verdict is PASS or FAIL only when observed on the
|
||||
// local build; anything that needs a boot, live traffic or the provider is
|
||||
// UNVERIFIED, and so is a drill with provider scope.
|
||||
const drillVerdict = z.enum(["PASS", "FAIL", "UNVERIFIED"]);
|
||||
|
||||
export type DrillVerdict = z.infer<typeof drillVerdict>;
|
||||
|
||||
/** FAIL beats UNVERIFIED beats PASS; provider scope alone keeps a drill UNVERIFIED. */
|
||||
export function combineDrillVerdicts(
|
||||
verdicts: readonly DrillVerdict[],
|
||||
providerVerificationRequired: boolean,
|
||||
): DrillVerdict {
|
||||
if (verdicts.includes("FAIL")) return "FAIL";
|
||||
if (verdicts.includes("UNVERIFIED") || providerVerificationRequired) return "UNVERIFIED";
|
||||
return "PASS";
|
||||
}
|
||||
|
||||
export const runbookRecordArtifactSchema = z
|
||||
.object({
|
||||
schemaVersion: z.literal(1),
|
||||
schemaVersion: z.literal(2),
|
||||
runbookId: z.string().regex(/^FE-RB-00[1-5]$/u),
|
||||
releaseId: nonEmptyString,
|
||||
drillTimestamp: timestamp,
|
||||
triggerInjected: nonEmptyString,
|
||||
triggerAsserted: z.boolean(),
|
||||
containmentAsserted: z.boolean(),
|
||||
escalationPathAsserted: z.boolean(),
|
||||
triggerAsserted: drillVerdict,
|
||||
containmentAsserted: drillVerdict,
|
||||
escalationPathAsserted: drillVerdict,
|
||||
recoveryAssertions: z.array(
|
||||
z
|
||||
.object({
|
||||
assertion: nonEmptyString,
|
||||
evidence: nonEmptyString,
|
||||
passed: z.boolean(),
|
||||
result: drillVerdict,
|
||||
})
|
||||
.strict(),
|
||||
),
|
||||
negativeFixtureFailedAsExpected: z.boolean(),
|
||||
negativeFixtureFailedAsExpected: drillVerdict,
|
||||
windowObservedBucket: nonEmptyString,
|
||||
providerVerificationRequired: z.boolean(),
|
||||
passed: z.boolean(),
|
||||
result: drillVerdict,
|
||||
})
|
||||
.strict();
|
||||
.strict()
|
||||
.superRefine((record, context) => {
|
||||
const expected = combineDrillVerdicts(
|
||||
[
|
||||
record.triggerAsserted,
|
||||
record.containmentAsserted,
|
||||
record.escalationPathAsserted,
|
||||
...record.recoveryAssertions.map(({ result }) => result),
|
||||
record.negativeFixtureFailedAsExpected,
|
||||
],
|
||||
record.providerVerificationRequired,
|
||||
);
|
||||
if (record.result !== expected) {
|
||||
context.addIssue({
|
||||
code: "custom",
|
||||
path: ["result"],
|
||||
message: `result must be ${expected} for these verdicts`,
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
const failureList = z.array(nonEmptyString).max(4_096);
|
||||
const sourceOrFixtureMode = z.enum(["source", "negative-fixture"]);
|
||||
@@ -943,33 +986,11 @@ const staticImportGraphSchema = z
|
||||
context.addIssue({ code: "custom", path: ["typeScriptOnlySourcePolicy", "passed"], message: "must agree with violations and summary" });
|
||||
}
|
||||
});
|
||||
const dependencyCruiserSummarySchema = z
|
||||
.object({
|
||||
violations: z.array(jsonObject),
|
||||
error: z.int().nonnegative(),
|
||||
warn: z.int().nonnegative(),
|
||||
info: z.int().nonnegative(),
|
||||
ignore: z.int().nonnegative(),
|
||||
totalCruised: z.int().nonnegative(),
|
||||
totalDependenciesCruised: z.int().nonnegative(),
|
||||
})
|
||||
.catchall(z.json());
|
||||
export const architectureDependencyReportArtifactSchema = z.union([
|
||||
z
|
||||
.object({
|
||||
modules: z.array(jsonObject),
|
||||
summary: dependencyCruiserSummarySchema,
|
||||
staticImportGraph: staticImportGraphSchema,
|
||||
})
|
||||
.strict(),
|
||||
z
|
||||
.object({
|
||||
summary: z.object({ errors: z.literal(1) }).strict(),
|
||||
dependencyCruiserOutput: z.string(),
|
||||
staticImportGraph: staticImportGraphSchema,
|
||||
})
|
||||
.strict(),
|
||||
]);
|
||||
// 12-05 (D-11): dependency-cruiser checked zero modules under TypeScript 7 and
|
||||
// no longer runs; the report carries the import graph that enforces the rules.
|
||||
export const architectureDependencyReportArtifactSchema = z
|
||||
.object({ staticImportGraph: staticImportGraphSchema })
|
||||
.strict();
|
||||
|
||||
export const designSystemReportArtifactSchema = z
|
||||
.object({
|
||||
@@ -1018,7 +1039,6 @@ export const realtimeBoundariesArtifactSchema = z
|
||||
ruleId: z.enum([
|
||||
"NATIVE_REALTIME_API_OUTSIDE_ADAPTER",
|
||||
"PRESENTATION_INTERVAL_OWNER",
|
||||
"UNSELECTED_REALTIME_RUNTIME_COMPOSED",
|
||||
]),
|
||||
file: nonEmptyString,
|
||||
line: z.int().positive(),
|
||||
@@ -1284,6 +1304,10 @@ export const supplyChainProviderFixturesArtifactSchema = z
|
||||
validImmutable: providerFixtureResultSchema,
|
||||
wrongDigest: providerFixtureResultSchema,
|
||||
invalidTar: providerFixtureResultSchema,
|
||||
// 13-04: archived re-verification of the same bundle three hours on.
|
||||
archivedAfterWindow: providerFixtureResultSchema,
|
||||
currentAfterWindow: providerFixtureResultSchema,
|
||||
archivedTampered: providerFixtureResultSchema,
|
||||
})
|
||||
.strict(),
|
||||
externalTreeCanary: providerFixtureResultSchema,
|
||||
@@ -1295,43 +1319,60 @@ export const supplyChainProviderFixturesArtifactSchema = z
|
||||
const expectedPass =
|
||||
artifact.actualDefaultVerifier.status === "PASS" &&
|
||||
artifact.fixtures.validImmutable.status === "PASS" &&
|
||||
artifact.fixtures.archivedAfterWindow.status === "PASS" &&
|
||||
artifact.externalTreeCanary.status === "PASS" &&
|
||||
[artifact.fixtures.absent, artifact.fixtures.wrongDigest, artifact.fixtures.invalidTar]
|
||||
.every(({ status }) => status === "FAIL_UNVERIFIED");
|
||||
if (artifact.passingFixtureCount !== (artifact.fixtures.validImmutable.status === "PASS" ? 1 : 0)) {
|
||||
context.addIssue({ code: "custom", path: ["passingFixtureCount"], message: "must count the passing immutable fixture" });
|
||||
[
|
||||
artifact.fixtures.absent,
|
||||
artifact.fixtures.wrongDigest,
|
||||
artifact.fixtures.invalidTar,
|
||||
artifact.fixtures.currentAfterWindow,
|
||||
artifact.fixtures.archivedTampered,
|
||||
].every(({ status }) => status === "FAIL_UNVERIFIED");
|
||||
const passing = [artifact.fixtures.validImmutable, artifact.fixtures.archivedAfterWindow]
|
||||
.filter(({ status }) => status === "PASS").length;
|
||||
if (artifact.passingFixtureCount !== passing) {
|
||||
context.addIssue({ code: "custom", path: ["passingFixtureCount"], message: "must count the passing fixtures" });
|
||||
}
|
||||
if ((artifact.status === "PASS") !== expectedPass) {
|
||||
context.addIssue({ code: "custom", path: ["status"], message: "must agree with required fixture outcomes" });
|
||||
}
|
||||
});
|
||||
|
||||
const compatibilityClassificationSchema = z.enum(["additive", "breaking"]);
|
||||
const compatibilityClassificationSchema = z.enum(["additive", "breaking", "none"]);
|
||||
export const compatibilityFixturesArtifactSchema = z
|
||||
.object({
|
||||
schemaVersion: z.literal(1),
|
||||
schemaVersion: z.literal(2),
|
||||
generatedAt: timestamp,
|
||||
rules: z.array(nonEmptyString).length(5),
|
||||
rules: z.array(nonEmptyString).min(1),
|
||||
results: z.array(
|
||||
z
|
||||
.object({
|
||||
family: z.enum(["api", "config", "storage", "release"]),
|
||||
id: nonEmptyString,
|
||||
expected: compatibilityClassificationSchema,
|
||||
actual: compatibilityClassificationSchema,
|
||||
passed: z.boolean(),
|
||||
})
|
||||
.strict(),
|
||||
).length(8),
|
||||
).min(1),
|
||||
baseline: z
|
||||
.object({
|
||||
path: nonEmptyString,
|
||||
classification: compatibilityClassificationSchema,
|
||||
passed: z.boolean(),
|
||||
})
|
||||
.strict(),
|
||||
})
|
||||
.strict()
|
||||
.superRefine((artifact, context) => {
|
||||
const keys = artifact.results.map(({ family, expected }) => `${family}\0${expected}`);
|
||||
addUniqueStringIssues(keys, ["results"], context);
|
||||
addUniqueStringIssues(artifact.results.map(({ id }) => id), ["results"], context);
|
||||
artifact.results.forEach((result, index) => {
|
||||
if (result.passed !== (result.actual === result.expected)) {
|
||||
context.addIssue({ code: "custom", path: ["results", index, "passed"], message: "must agree with expected and actual" });
|
||||
}
|
||||
});
|
||||
if (artifact.baseline.passed !== (artifact.baseline.classification !== "breaking")) {
|
||||
context.addIssue({ code: "custom", path: ["baseline", "passed"], message: "must fail exactly when the baseline change is breaking" });
|
||||
}
|
||||
});
|
||||
|
||||
export const documentationReviewArtifactSchema = z
|
||||
@@ -1364,6 +1405,8 @@ export const documentationReviewArtifactSchema = z
|
||||
.strict(),
|
||||
).min(1),
|
||||
routeScopeDocumented: z.boolean(),
|
||||
// 13-15: build and deploy variables README.md does not name.
|
||||
missingRuntimeVariables: z.array(nonEmptyString),
|
||||
results: z.array(
|
||||
z
|
||||
.object({
|
||||
@@ -1402,6 +1445,7 @@ export const documentationReviewArtifactSchema = z
|
||||
artifact.passed !==
|
||||
(artifact.reportDigestValid &&
|
||||
artifact.routeScopeDocumented &&
|
||||
artifact.missingRuntimeVariables.length === 0 &&
|
||||
artifact.results.every(({ passed }) => passed))
|
||||
) {
|
||||
context.addIssue({ code: "custom", path: ["passed"], message: "must agree with report digest, documented scope and review results" });
|
||||
@@ -1428,9 +1472,15 @@ export const hostingHeadersArtifactSchema = z
|
||||
.strict(),
|
||||
).min(1),
|
||||
passed: z.boolean(),
|
||||
// 13-05 (D-14): only a live probe can PASS; the fixture is UNVERIFIED.
|
||||
status: z.enum(["PASS", "FAIL", "UNVERIFIED"]),
|
||||
})
|
||||
.strict()
|
||||
.superRefine((artifact, context) => {
|
||||
const expectedStatus = !artifact.passed ? "FAIL" : artifact.mode === "live" ? "PASS" : "UNVERIFIED";
|
||||
if (artifact.status !== expectedStatus) {
|
||||
context.addIssue({ code: "custom", path: ["status"], message: `must be ${expectedStatus} for this mode and result` });
|
||||
}
|
||||
const keys = artifact.results.map(({ surface, header }) => `${surface}\0${header}`);
|
||||
addUniqueStringIssues(keys, ["results"], context);
|
||||
const requiredKeys = [
|
||||
|
||||
Reference in New Issue
Block a user