Documentation
¶
Overview ¶
Package record turns a judge's seat scores into the two records an install keeps of them: additive cells in a tally sheet on disk, and one row per score in an outbox.
THE MECHANISM. Recorder.Record takes the scores judge.Judge answered and does two things with them. Every valid one is observed into the sheet the recorder holds, under the role_quality metric, and one row is appended to the recorder's outbox when it holds one. A score whose role is not one of the judged seats, or that is not on the 0-100 scale, is skipped and named in the error; the others are recorded however the round went, and the sheet is observed whatever the outbox does. A nil outbox records locally only.
The sheet an install keeps of its own scores is its own evidence: it is saved under the pool directory (OwnSheetName) and read back as cells (Cells) — which `codeaf pool` lists beside the index's.
Index ¶
Constants ¶
const Metric = "role_quality"
Metric is the sheet metric a judged seat score is observed under.
const OwnSheetName = "own.json"
OwnSheetName is the file the install's own sheet is kept as, under the pool directory.
Variables ¶
This section is empty.
Functions ¶
func ExampleRowJSON ¶ added in v0.4.0
ExampleRowJSON is one row as the relay would receive it, on the day given, with placeholder slugs where a real row carries the model that held the seat and the model that judged it — the bytes a person can read before any row exists. `codeaf telemetry show` printed it until 2026-10-01; its readers are the tests and the disclosure now. It is marshalled from Row, so it cannot spell a key a real row would not.
func LoadSheet ¶
LoadSheet reads the sheet at path. A path with no file answers an empty sheet and no error — an install that has recorded nothing yet is not a fault; bytes that are there and do not parse as a sheet document are.
func OwnSheetPath ¶
OwnSheetPath is where the install's own sheet lives for the pool directory given.
Types ¶
type Cell ¶
Cell is one seat's measured quality on a sheet: the seat, the model, the mean of its 0-100 scores and how many stand behind it.
type Recorder ¶
type Recorder struct {
// Sheet holds the install's own tallies; a recorder without one has
// nowhere to put what it is given, and refuses.
Sheet *tally.Sheet
// Outbox is the rows' way out. A nil Outbox keeps the scores locally
// only.
Outbox *outbox.Outbox
}
Recorder turns judge scores into the two records an install keeps: the sheet observed locally and, when one is held, the outbox rows that leave.
func (*Recorder) Record ¶
Record observes every score it is given into the sheet, and appends one row per score to the outbox when the recorder holds one. THE SHEET IS OBSERVED WHATEVER THE OUTBOX DOES: every score is observed before the first row is appended, so an append that fails costs the install nothing of its own evidence, and the first append error is returned once every score has been observed. A score whose role is not one of the judged seats, or whose score is not on the 0-100 scale, is skipped and named in the error beside the others that were recorded.
type Row ¶
type Row struct {
Schema int `json:"schema"`
Metric string `json:"metric"`
Role string `json:"role"`
Model string `json:"model"`
Score float64 `json:"score"`
Judge string `json:"judge"`
Door string `json:"door"`
Size string `json:"size"`
Day string `json:"day"`
}
Row is one judged seat score as it leaves the install: what was scored — the metric, the seat and the model that held it, the score on the 0-100 scale — and the facts of the run it was read from, the judge that answered, the door the run came in by (task, do, exec or run), the size of the crew, and the day.