Boundary module that appends history lines to a .jsonl file.
One writer wraps one open file. The default location is
.temper/history-{partition}.jsonl — one file per
MIX_TEST_PARTITION so concurrent partitioned CI runs never write
to the same file (within one VM the formatter GenServer serializes
all writes).
All functions return tagged results instead of raising; the caller
(Temper.Formatter) decides how to degrade.
Summary
Functions
Appends one encoded test record as a line.
Appends the end-of-run suite summary line.
Closes the underlying file, flushing buffered lines.
The default history path for a partition: .temper/history-{partition}.jsonl.
Opens path for appending, creating parent directories as needed.
Types
Functions
@spec append(t(), Temper.Record.t()) :: :ok
Appends one encoded test record as a line.
Device errors (a vanished file descriptor, a full disk) raise — the formatter's crash guard turns them into a warning and goes inert.
@spec append_suite(t(), Temper.RunContext.t(), %{ tests: non_neg_integer(), times_us: map() | nil }) :: :ok
Appends the end-of-run suite summary line.
Raises on device errors, like append/2.
Closes the underlying file, flushing buffered lines.
The default history path for a partition: .temper/history-{partition}.jsonl.
A nil partition (no MIX_TEST_PARTITION set) maps to "0".
@spec open(Path.t()) :: {:ok, t()} | {:error, File.posix()}
Opens path for appending, creating parent directories as needed.