API Reference Surfex v#0.7.2

Copy Markdown View Source

Modules

An ExUnit formatter that records test evidence (Surfex.Evidence): for each test that ran, whether it passed, at its exact version, with the versions of the code it reaches: what it calls, and what that code calls (Surfex.Scan.reach/1).

The ONE renderer for a project's surface goldens.

One item a scanner found in the code: the unit a spec citation resolves to, and the source of a code record (Surfex.Scan.code/1).

Finds the items the code declares: the code records the relation log relates (Surfex.Scan.code/1), and what the spec's citations resolve to. A scanner knows one language's declarations; it knows nothing about any spec, and Surfex.Cite knows nothing about any language.

Generic, dependency-free primitives for reading Elixir source without compiling it: find a project root, enumerate lib sources, extract defmodule nodes, and version a definition by its content.

Mix Tasks

Gives a current relation a new note (Surfex.Record.annotate/6, §14): a re-review that found nothing to change still belongs in the log, not a commit message.

Takes the one-shot baseline (Surfex.Record.baseline/4, §18.1): every test version the project's adoption: trusts counts as if it had discriminated, and its verifies: tags become verifies relations with basis baseline.

Prints the completeness report (Surfex.Completeness, §20): a score per kind (spec units, tests, code) and overall, and every incomplete item with what it lacks and where.

Confirms one relation, named by its ends and type, with a note saying what was judged (Surfex.Record.confirm/7)

Prints a change draft (Surfex.Change, §19) for every open mark, unmet id and triangle gap, or for the ids given: what's wrong, what it touches, and the steps the process implies. It prints and changes nothing

Gates every golden the project lists in .surfex.exs (Surfex.Goldens): the relation status (RELATIONS.md) and any project goldens (Surfex.Surface). One CI line for all of them.

Lists every log entry touching an id, oldest first (Surfex.Record.history/2): what it was related to, at which versions, when, by whom, and why. It reads only the log, so it answers from any checkout, however the git history was rewritten.

Tells an agent (or anyone) how Surfex works, from the installed version (§21).

Looks after the relation log in .surfex/ (Surfex.Log).

Records that a spec unit itself needs to change (Surfex.Record.mark/5, §12.1): the tests reflect it and the code passes them, but the result is wrong or clearly sub-optimal. The mark is recorded at the unit's current version, and the note says what is wrong

Moves every live relation of OLD onto NEW (Surfex.Record.move/5): for each, a retire of the old relation and a relate of the same type with NEW in its place.

Records a relation between two scanned ids, at their current hashes (Surfex.Record.relate/6).

A relation is conflicted when two entries were recorded without seeing each other, typically on two branches that were then merged. mix surfex.status lists the tips' ids; this records the picked one again with both as parents (Surfex.Record.resolve/7).

Retires a relation (Surfex.Record.retire/6): an entry saying it no longer applies. It is appended like any other, and the relation's history stays in the log.

Scans the spec and the code, reads the relation log, and reports the state of every relation (Surfex.Status).

Lists what the spec already implies (Surfex.Suggest.all/5)

Runs a requirement's tests as surfex reads them (Surfex.Select, §11): every test whose verifies: declarations resolve to the unit, a list's members included.

Records a review (Surfex.Record.validate/6, §18): the test was examined against the spec unit, judged to validate it, and passes against the code.