This commit is contained in:
parent
8e71537d57
commit
fcc18ddcc8
96 changed files with 8074 additions and 214 deletions
|
|
@ -17,9 +17,9 @@ function walkFiles(dir: string, exts = [".ts", ".js"]): string[] {
|
|||
}
|
||||
|
||||
describe("architectural boundaries — Stage 1 gate (B-1…B-7)", () => {
|
||||
it("src/ contains shell + Stage 4 data contracts — no forbidden persistence/sync yet", () => {
|
||||
it("src/ contains shell, verifier, and Stage 8 activation coordinator", () => {
|
||||
const tsFiles = walkFiles("src", [".ts"]).sort();
|
||||
// Stage 4 adds data contracts (festival-package, user, emergency-baseline, clock/readiness) on top of shell; no IDB/Cache storage/sync persistence
|
||||
// Stage 6 adds pipeline (canonical-json/hash/budgets/gates/manifest/package/sign/emergency/fixtures) on top of Stage 5 persistence
|
||||
expect(tsFiles).toEqual(
|
||||
expect.arrayContaining([
|
||||
"src/app/layout.ts",
|
||||
|
|
@ -27,20 +27,38 @@ describe("architectural boundaries — Stage 1 gate (B-1…B-7)", () => {
|
|||
"src/ui/router/router.ts",
|
||||
"src/data/festival-package/types.ts",
|
||||
"src/domain/clock/logic.ts",
|
||||
"src/platform/idb/wrapper.ts",
|
||||
"src/platform/idb/names.ts",
|
||||
"src/data/system-meta/store.ts",
|
||||
"src/data/slot/store.ts",
|
||||
"src/data/user/store.ts",
|
||||
"src/sync/verifier/ed25519.ts",
|
||||
"src/sync/verifier/hash.ts",
|
||||
"src/sync/verifier/types.ts",
|
||||
"src/sync/activation.ts",
|
||||
]),
|
||||
);
|
||||
// Forbidden persistence/sync must remain empty in Stage 4 (types/validation allowed)
|
||||
const forbidden = tsFiles.filter(
|
||||
(f) =>
|
||||
f.startsWith("src/platform/idb/") ||
|
||||
f.startsWith("src/platform/cache/") ||
|
||||
f.startsWith("src/storage/") ||
|
||||
f.startsWith("src/sync/"),
|
||||
const pipelineFiles = walkFiles("pipeline", [".ts"]).sort();
|
||||
expect(pipelineFiles).toEqual(
|
||||
expect.arrayContaining([
|
||||
"pipeline/package.ts",
|
||||
"pipeline/manifest.ts",
|
||||
"pipeline/gates.ts",
|
||||
"pipeline/hash.ts",
|
||||
"pipeline/canonical-json.ts",
|
||||
"pipeline/budgets.ts",
|
||||
"pipeline/emergency.ts",
|
||||
"pipeline/sign.ts",
|
||||
]),
|
||||
);
|
||||
// Stage 9 adds only the byte transport seam; no later sync orchestration is present.
|
||||
expect(tsFiles).toEqual(
|
||||
expect.arrayContaining([
|
||||
"src/sync/transport/types.ts",
|
||||
"src/sync/transport/http.ts",
|
||||
"src/sync/pull.ts",
|
||||
]),
|
||||
);
|
||||
expect(
|
||||
forbidden,
|
||||
`Stage 4 must not have forbidden persistence/sync: ${forbidden.join(", ")}`,
|
||||
).toEqual([]);
|
||||
});
|
||||
|
||||
it("directory structure matches IMPLEMENTATION-CONTRACT.md §4", () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue