Repository navigation
defk-rt2.9: Defk.Examples.Result, the example report read as one record - #64
Merged
Merged
Conversation
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
pushed a commit
that referenced
this pull request
Oct 20, 2026
…ter in Bench; tables byte-identical; mix ci green (2294 passed)."
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
One
DEFK_RESULTline, the report of an example, was read by 31 distinct string keys acrossdev/defk/examples.ex,scoreboard.ex,snapshot.ex,tables.exand thedefk.examplestask, 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/1turns the decoded line into a struct once, keeping the line's map inraw, and the questions are functions:correct?,skipped?,reused?,unstored?,quiet?,provisional?,crossover?,measured_on,rank,mark,label, pluscrashed/1, the stand-in for an example that died before its first line.Examples.parse_results/1returns records; the scoreboard, the snapshot'sbuild,quiet?andstale, the tables' rows and cells, and the task's reused note ask the record. The stored scoreboard keeps the raw lines, soexamples/scoreboard.jsonis unchanged in format; its own row structure (examples,name,quiet,run) is the file's, not the report's, and stays keyed.Defk.Benchwrites the line from one function,put_result/1, wherecheck_only/1andprint/2each 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'sparse_resultstest expects records;scoreboard_doc_testbuilds 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 cion the macOS laptop: exit 0, 2294 passed (34 doctests, 904 properties, 1356 tests), 815 excluded;defk.docs --checkreports every generated region up to date.CHANGELOG.mdentry, and a deprecation for a rename or removal (docs/guides/stability.md).test/stability/? A frozen file is never edited; a release adds a directory (docs/agents/stability.md).