import type { RunMarker } from '../../domain.objects/RunMarker'; export type { RunMarker }; /** * .what = tells whether a filename is a run marker * .why = the age gate sweeps markers in a pass of its own, and must not sweep * the readme.md / .gitignore that share the same root */ export declare const isRunMarkerName: (input: { name: string; }) => boolean; /** * .what = writes a run's marker, whole * .why = each state must be on disk BEFORE the work it describes, so a process * that dies mid-work leaves the truthful record rather than a stale one * * .note = 🔴 it REFUSES a run id no mint could produce. a marker path and a dir * name are the only two ways a run id reaches disk, and the dir name is * guarded at its own mint (`computeTempDirName` asserts its output parses * back). guard one pole and leave the other open, and a fixture may write * an id like `rhalfwire` — unmintable, and invisible precisely because a * marker never passes through the mint — then render it into a snapshot a * reviewer reads as product output */ export declare const setRunMarker: (input: { tmpDir: string; marker: RunMarker; }) => void; /** * .what = reads one run's marker * .why = the teardown settles its own marker * * .note = it reads through the SAME guarded read as getAllRunMarkers, so an absent * marker and an unreadable one are one verdict rather than two code paths. * an `existsSync` + an unguarded read is a check-then-act pair that answers * the question twice and still throws when the answer changes between them * * .note = the pair IS reachable, though only for our own marker: the age gate's * marker sweep reclaims a marker older than the window, so a run that * outlives its own configured window can have its live marker swept by a * peer's setup. an unguarded read would then fail a green suite AT teardown * * @returns the marker, or null when there is none we can read */ export declare const getOneRunMarker: (input: { tmpDir: string; run: string; }) => RunMarker | null; /** * .what = reads every run marker in a temp root * .why = the arrears check asks of ALL markers which runs never settled * * .note = a marker we cannot READ or parse is yielded as null, never dropped — a * silently skipped marker is a casualty no one is ever told about * * .note = 🔴 the read is guarded, and it is the ONE read in this behavior that * must be. every marker here but our own belongs to ANOTHER RUN, and a * peer's teardown removes its own marker the moment it finishes — so * between this readdir and this read, a file can genuinely vanish. an * unguarded read would throw ENOENT out of `globalSetup`, which kills the * whole run before a single test executes. * * that would make a peer's *successful* finish destroy a live run — the one * failure mode this design keeps off the table everywhere else, since every * other path fails toward LEAK and never toward LOSS */ /** * the one fault value that names a marker whose BYTES arrived and are wrong * * .why = every OTHER fault this reader can report is an errno from the os — the file * was not handed over at all. that split decides what a human can DO: a * permission is widenable, a torn write is not. so the arrears report branches * on it, and the word must be one constant rather than a literal at each site * (`rule.require.ubiqlang`) */ export declare const FAULT_TORN_WRITE = "unparseable"; export declare const getAllRunMarkers: (input: { tmpDir: string; }) => Array<{ marker: RunMarker | null; name: string; /** * why this marker could not be judged, or null when it was judged fine * * .why = 🔴 "could not be read" is ONE answer with several causes — a vanished * file, a permission, an i/o fault, a torn write. a human told only the * name is sent to remove a file by hand whatever the cause. the fault * travels so the report can name it * * .note = a VANISHED marker carries no fault and no marker: it is a benign race, * and there is no residue left to tell anyone about */ fault: string | null; }>; /** * .what = removes one run's marker * .why = idempotent; a marker already gone is not an error */ export declare const delRunMarker: (input: { tmpDir: string; run: string; }) => void; /** * .what = builds a fresh `open` marker for a run that is about to begin * .why = written ahead of the tests, so a process killed mid-suite leaves it */ export declare const genRunMarkerOpen: (input: { run: string; /** REQUIRED — see RunMarker.teardownWired; a default here would fabricate evidence */ teardownWired: boolean; }) => RunMarker;