Skip to content

defk-rt2.9: Defk.Examples.Result, the example report read as one record - #64

Merged
DanielLuning merged 1 commit into
mainfrom
rt2.9/examples-result
Oct 20, 2026
Merged

DanielLuning merged 1 commit into
mainfrom
rt2.9/examples-result

Conversation

@DanielLuning

Copy link
Copy Markdown
Owner

What changed

One DEFK_RESULT line, the report of an example, was read by 31 distinct string keys across dev/defk/examples.ex, scoreboard.ex, snapshot.ex, tables.ex and the defk.examples task, and the verdict order and marks were written twice (Scoreboard.verdict_rank/verdict_mark, Tables.rank/mark).

Defk.Examples.Result (dev/defk/examples/result.ex) is the record: decode/1 turns the decoded line into a struct once, keeping the line's map in raw, and the questions are functions: correct?, skipped?, reused?, unstored?, quiet?, provisional?, crossover?, measured_on, rank, mark, label, plus crashed/1, the stand-in for an example that died before its first line. Examples.parse_results/1 returns records; the scoreboard, the snapshot's build, quiet? and stale, the tables' rows and cells, and the task's reused note ask the record. The stored scoreboard keeps the raw lines, so examples/scoreboard.json is unchanged in format; its own row structure (examples, name, quiet, run) is the file's, not the report's, and stays keyed.

Defk.Bench writes the line from one function, put_result/1, where check_only/1 and print/2 each wrote it. The verdict bands stay in Bench (ADR-0011).

Tests: test/examples_result_test.exs (new, 4 tests) covers decoding, the questions and the verdict order and marks; examples_task_test's parse_results test expects records; scoreboard_doc_test builds raw maps and is unchanged, as the tables decode them. mix ci's docs check re-rendered both README tables from the stored scoreboard through the record with no change.

Docs: the compiler map's Bench bullet names the record.

Results

Not a compiler change. No example was re-measured; the stored scoreboard and the rendered tables are byte-identical.

How it was checked

mix ci on the macOS laptop: exit 0, 2294 passed (34 doctests, 904 properties, 1356 tests), 815 excluded; defk.docs --check reports every generated region up to date.

  • Touches a promised surface (kernel subset, runtime contract, public API, error codes)? Then a CHANGELOG.md entry, and a deprecation for a rename or removal (docs/guides/stability.md).
  • Touches test/stability/? A frozen file is never edited; a release adds a directory (docs/agents/stability.md).

The runner, the scoreboard, the stored scoreboard and the README tables
read a DEFK_RESULT line by 31 distinct string keys across five files, and
the verdict order and marks were written twice. Defk.Examples.Result
decodes a line once and answers the questions (correct?, reused?,
unstored?, quiet?, provisional?, crossover?, measured_on, rank, mark,
label); every reader asks it. Defk.Bench writes the line from one
function; its bands stay (ADR-0011). The stored file keeps the raw lines.
@DanielLuning
DanielLuning merged commit 68c82a0 into main Oct 20, 2026
2 checks passed
@DanielLuning
DanielLuning deleted the rt2.9/examples-result branch October 20, 2026 07:03
DanielLuning pushed a commit that referenced this pull request Oct 20, 2026
…ter in Bench; tables byte-identical; mix ci green (2294 passed)."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant