Work

class Work(root: Path)(source)

File operations behind the three commands; root is the bench/ directory.

Constructors

Link copied to clipboard
constructor(root: Path)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
Link copied to clipboard

One value per frozen field, read from the working tree.

Link copied to clipboard
fun devIds(): Set<String>
Link copied to clipboard
Link copied to clipboard

The evidence evaluation on the dev scenarios that have both probed captures, as canonical JSON; a run with fewer than every dev id says partial.

Link copied to clipboard
Link copied to clipboard
fun idsOfTemplates(templates: Set<String>, unsealed: Unsealed? = null): Set<String>

The runnable scenario ids of the given templates (dev, or test given unsealed); a template with none is an error.

Link copied to clipboard

Copies the passing and failing baseline captures (arms/p0-control and arms/p0-treatment, probes included) of each solve case directory under solved to data/probed/. A test id is refused. A case that lacks either capture is skipped, and nothing is written for it.

Link copied to clipboard
fun ingest(prepared: Path, driftSha: String?, requireCapsule: Boolean = true): Map<String, Verdict>

Reads <arm>.out from each prepared directory; returns id to verdict.

Link copied to clipboard
fun lab(dir: String, unsealed: Unsealed? = null): Lab
Link copied to clipboard
Link copied to clipboard

The test ids, once the log has its entry and the freeze still matches.

Link copied to clipboard
fun prepare(out: Path, only: Set<String>, unsealed: Unsealed? = null): List<String>

Writes one directory per dev scenario, or per test scenario given unsealed; any other id is refused.

Link copied to clipboard
fun split(): Split
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun unseal(commit: String, operator: String, now: String, dryRun: Boolean = false): Unsealed

The one unseal: every frozen value must match the working tree and the log must be empty. With dryRun nothing is written.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun writeFreeze(commit: String)
Link copied to clipboard
Link copied to clipboard

Scores the certificate.json of every case directory under the solved directories against the injected causes and writes data/solves/dev.json. A test id is refused.

Link copied to clipboard

Writes upgrade/upgrade.json from the dev capsules and returns the dev scores.