Judgment fixtures
Judgment enters a session only after a detector fires, and it never fires, skips, or reorders a rung. There are two judgment points.
| Point | Asked | Answer kind | Recorded on the intervention as |
|---|---|---|---|
severity | Before a rung fires, about the detection | score between 0 and 1 | severity |
recovery | After a rung, about the events that follow it | choice of recovering, still_stalled, or getting_worse | recovery |
Either point may also answer with an abstention.
Playback
--fixtures <dir> loads every .json file in the directory as one recorded pair. A pair answers only a request that matches its recorded request exactly, and any other request gets no answer. Nothing calls a model or the network.
An answer is recorded only when it is trusted. A trusted answer is a score or a choice with a confidence of at least 0.6. An abstention, a malformed answer, or a lower confidence records nothing, and that point of the session runs exactly as it runs without the flag.
The committed fixtures live in fixtures. For loop-clears-on-nudge the severity fixture abstains and the recovery fixture answers recovering at 0.95 confidence, so the only change to the session record is one added line.
$ diff <(./target/debug/westering intervene --scenario loop-clears-on-nudge) <(./target/debug/westering intervene --scenario loop-clears-on-nudge --fixtures fixtures)
70a71
> "recovery": "recovering",
Fixture shape
A fixture file holds exactly four fields.
| Field | Content |
|---|---|
synthetic | true |
judgment_point | severity or recovery |
request | The detection for severity, or the rung, the shape, the pattern, and the following events for recovery |
response | One answer of the kind the point takes, or an abstention |
$ cat fixtures/recovery-loop-clears-on-nudge.json
{
"judgment_point": "recovery",
"request": {
"events": [
{
"call": "read(path=src/config.py)",
"progress": true,
"step": 3,
"tool": "read"
},
{
"call": "test(target=config)",
"progress": true,
"step": 4,
"tool": "test"
},
{
"call": "finish(summary=config located)",
"progress": true,
"step": 5,
"tool": "finish"
}
],
"pattern": [
"grep(pattern=config, path=src)"
],
"rung": "nudge",
"shape": "looping",
"trace_id": "sandbox-loop-clears-on-nudge"
},
"response": {
"choice": "recovering",
"confidence": 0.95,
"kind": "choice",
"probabilities": {
"getting_worse": 0.01,
"recovering": 0.95,
"still_stalled": 0.04
}
},
"synthetic": true
}
A fixture that breaks the shape stops the run with one error line that names the file and the defect. Two fixtures that record the same request also stop the run.