test: require every journey before daily qualification rotation

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
DottaandPaperclip committed 2026-10-21 08:41:52 -05:00
1 parent a6eaf005a2
commit 3fc3af5a61
3 files changed
+11 -2

No files matched your search

+1 -1
View File
@@ -25,7 +25,7 @@ costs, timings, evidence scanning, and attempt records remain authoritative.
The observer receipt is typed and validated as `RunnerE2EResult.dependableWork`;
it contains no credentials or provider prose. `dependableDailyExecutions` returns
four exact execution IDs per UTC day, rotating all cells in six days. It refuses
to select a journey absent from the catalog. The existing bounded operations
to start the rotation until all 24 exact journeys exist in the catalog. The existing bounded operations
manifest and shared journal must own spending and scheduling; this checkpoint
does not start work, retry it, or create a second scheduler.
@@ -221,3 +221,12 @@ it.each(["missing", "duplicate", "linked", "unsafe"])("writes an incomplete repo
expect(await readFile(path.join(output, "index.html"), "utf8")).toContain("html");
} finally { await rm(root, { recursive: true, force: true }); }
});
it("does not start a daily rotation when only today's journeys are registered", () => {
const today = dependableDailySelection("2026-10-20").map(dependableExecutionId);
expect(() => dependableDailyExecutions("2026-10-20", today)).toThrow("not registered");
const all = DEPENDABLE_CELLS.map(dependableExecutionId);
const later = all.find(id => !today.includes(id))!;
const missingLater = all.filter(id => id !== later);
expect(() => dependableDailyExecutions("2026-10-20", missingLater)).toThrow("not registered");
});
+1 -1
View File
@@ -149,7 +149,7 @@ export function dependableDailySelection(utcDate: string) {
export function dependableDailyExecutions(utcDate: string, availableIds: readonly string[]) {
const ids = dependableDailySelection(utcDate).map(dependableExecutionId);
const absent = ids.filter(id => !availableIds.includes(id));
const absent = DEPENDABLE_CELLS.map(dependableExecutionId).filter(id => !availableIds.includes(id));
if (absent.length) throw new Error(`Dependable journeys not registered: ${absent.join(", ")}`);
return ids;
}