Skip to main content

Module attempts

Module attempts 

Source
Expand description

Durable attempt outcomes.

A passed task is a commit on speccoder/<feature>. Every other outcome — a failed verdict, a stop, an undemonstrated gap, an interrupted run — is saved as a commit object whose tree is the worktree as the attempt left it, parented on the branch tip, under refs/speccoder/attempts/<feature>/<task>/<run>, with its outcome in trailers. The worktree then goes back to where the attempt started, so the next attempt never builds on (or freezes tests from) unfinished work, and nothing is lost: git diff speccoder/<feature> <ref> shows it. Git is the durable record; the journal can be replaced across upgrades.

Structs§

Record
What an attempt ended with.
Saved
An attempt saved under PREFIX.

Constants§

PREFIX
Where attempt refs live.

Functions§

list
The saved attempts of feature, newest first.
parse_usage
Reads a Usage: trailer value back into a usage object.
restore_head
Makes the worktree at dir equal to its HEAD commit’s tree.
save
Saves the worktree at dir as an attempt of feature/task.
usage_trailer
The Usage: trailer speccoder writes on its commits, or nothing.