Expand description
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.
Structs§
- Report
- The C-004 worker report line.
- Worker
Handle - A spawned worker: child process (own process group), log paths.
Functions§
- extract_
report - The extraction rule: if the output is the
probed JSON envelope/event stream, extract the assistant’s final text;
else raw stdout; in either case parse the LAST NON-EMPTY LINE against
the schema — models habitually wrap the line in a markdown code fence,
so fence-delimiter lines don’t count as content.
None= missing/unparseable (treated as released + failed). - kill_
group - SIGKILL a worker’s whole process group (
kill(2), declared insignals.rs— no shell, no subprocess, no crate). - report_
or_ released - The missing/unparseable-report rule: treated as
releasedwithnotes: "unparseable report"; the unit counts failed for the wave. - spawn
- Spawn one worker per C-003. A missing template binary is a named error — never guess a spelling.
- spawn_
in spawnwith a private temp directory: workers build side by side, and test runners that share one temp root trip over each other.