Documentation
¶
Overview ¶
Package worker models the adoption epoch and requalification gate (SPEC §14 / fixed-worker): a model or agent change opens a new epoch that must be requalified before normal runs resume. The comparison is pure.
Index ¶
Constants ¶
const DefaultStateFile = ".adh/worker.json"
DefaultStateFile is the conventional path the recorded epoch lives under; it is the single owner of that location across the CLI.
Variables ¶
This section is empty.
Functions ¶
func RequalifyNeeded ¶
RequalifyNeeded reports whether a run must refuse pending requalification (§14): a baseline epoch is recorded at stateFile and the current worker differs from it. A never-requalified workspace (no recorded epoch) is not gated — like the §19.1 routing gap, the refusal presupposes a recorded baseline to have departed from, so a fresh workspace runs ungated until its first `worker requalify`.
Types ¶
type Epoch ¶
type Epoch struct {
ID string `json:"id"`
Models map[string]string `json:"models"` // role -> model identifier
}
Epoch records the per-role model binding for one adoption epoch.
func EpochFor ¶
EpochFor builds the epoch for a per-role model binding: its ID is the content hash of the canonical binding, so an identical binding hashes to the same epoch and any model change yields a new one (§14).
func Load ¶
Load reads the recorded epoch from a JSON file. An absent file yields the zero Epoch and no error (a fresh, never-requalified workspace).
func (Epoch) RequalRequired ¶
RequalRequired reports whether current opens a new epoch relative to e — that is, whether any per-role model binding changed. A changed worker invalidates the held-out baseline, so requalification must precede the next run (§14).