Checkpoint: current working state
Some checks failed
ci / check (push) Has been cancelled

This commit is contained in:
Lumen Stage1 2026-09-29 21:33:33 -05:00
commit e83946c207
57 changed files with 6257 additions and 775 deletions

View file

@ -341,30 +341,37 @@ describe("dataset metadata", () => {
describe("readiness inputs (time-independent per SPIKE-05)", () => {
it("readiness is data-driven, not clock", async () => {
const { computeReadiness } = await import("../../src/domain/readiness/types.js");
const { evaluateReadiness } = await import("../../src/domain/readiness/logic.js");
const allOk = {
shellValid: true,
datasetPresent: true,
authenticity: "verified" as const,
integrity: "ok" as const,
schemaCompatible: true,
requiredSectionsOk: true,
requiredAssetsOk: true,
emergencyFloorOk: true,
missing: [] as readonly string[],
hadVerifiedDataset: true,
manifestOk: true,
incompatible: false,
failure: null,
presentSections: ["emergency", "schedule", "info", "map", "assets"] as readonly string[],
stagedPending: null,
};
expect(evaluateReadiness(allOk).state).toBe("READY");
expect(
computeReadiness({
shellValid: true,
datasetPresent: true,
authenticityOk: true,
integrityOk: true,
schemaCompatible: true,
requiredSectionsOk: true,
requiredAssetsOk: true,
emergencyFloorOk: true,
}),
).toBe("READY");
expect(
computeReadiness({
shellValid: true,
evaluateReadiness({
...allOk,
datasetPresent: false,
authenticityOk: false,
integrityOk: false,
authenticity: "record-missing",
integrity: "files-missing",
schemaCompatible: false,
requiredSectionsOk: false,
requiredAssetsOk: false,
emergencyFloorOk: true,
}),
hadVerifiedDataset: false,
presentSections: [],
}).state,
).toBe("NOT_READY");
});
});