Expand description
vitrify run — the deterministic orchestrator: preflight, continuous
dispatch, batched serial integration, termination reports. Control flow
is Rust; inference happens only at the three enumerated points: workers,
escalation, and plan-time authoring (outside run).
Resume = re-derivation from repo state, never memory.
A run builds its SDDs as lanes, one per SDD ([lane]), under one
scheduler ([sched]). A plain vitrify run in a repository of several
SDDs is a project run: every Active SDD is a lane (--sdd with
--upstream: that SDD and those it depends on). One SDD — the only one,
or the one --sdd names — is built exactly as it always was. What the lanes share is the run’s: the worker
cap, the gate pool, the event log, the run record. Preflight has three
parts: the project’s (before anything runs), each lane’s static checks
(at the start), and each lane’s dynamic checks (its §5 commands in its
own checkout, before its first build, then a re-check of the units a
change reached since their last recorded check — and only those).
Modules§
- escalate
- Escalation client: assemble the evidence prompt from
the resolved template, make ONE inference call through the strongest
probed harness, parse the structured verdict, and return it typed. The
orchestrator enforces verdicts; this module performs no state change.
One malformed reply gets one re-ask with the parse error
appended; a second malformed reply yields
abort. - events
- What happened to a run, one event at a time: the lines the run appends
to
events.jsonlas things happen, and the linesvitrify run status --followprints. One shape serves both, so a follower can replay what the run wrote and then carry on with what it sees for itself. - history
- What past worker sessions took, as weights for the priority order.
- integrate
- A lane’s serial integrator: every Built unit of its SDD that is ready, as
one batch, in the lane’s own integration checkout. Fencing check first;
then the write-set check (the branch changed only what the unit may write); a
--no-ffmerge per unit; the input check (the unit was built from the spec text mainline holds now); one run of the full integration gate over the merged tree; one integration commit carrying stamps, journal events, ledger, and a clean audit; CAS/push publish with lost-race redo; never leaves mainline failing. A red batch is integrated again one unit at a time, so one bad unit never holds back the others. - lease
- Orchestrator-side leases: renewal when remaining lease <
renew_fraction×lease_minutes, and the hard worker wall-clock budget. The renewal decision is pure over an injected clock; expiry is advisory — the fencing token protects integration. - mainline
- A lane’s handle on mainline: which repository, which SDD, which branch, and how a commit gets there — and the lane’s integration checkout, which is reset to a pristine state before every use.
- pool
- A counting pool of tokens: how a run bounds the commands it runs at once.
- progress
- The gate board: what the integrator is doing now, rewritten whole to
<logs>/gate.jsonat every change, sovitrify run statuscan show a gate that is otherwise silent while it passes. For observability only: nothing reads it back to decide anything. - project
- The project-run surface as pure building blocks: the project preflight
checks over the repository’s SDDs, the plan types, every renderer (job
header, dry-run plan, event lines, final report), the
project.jsonrecord, and--upstreamlane selection. Nothing here spawns a process or runs git; the scheduler fills the plan in and calls these, and every output is a function of its input alone. - retry
- What an attempt that did not land leaves behind, and how the next attempt gets it.
- worker
- Worker dispatch and report extraction. One worker = one
OS process: recorded argv template + generated prompt as the final
argument, cwd = the unit worktree, its own Unix process group, a private
TMPDIR, stdout/stderr written straight to.vitrify/logs/<job>/worker-<holder>.{out,err}as the harness produces them — with a streaming spelling, a worker that is killed leaves its session up to that point.