# `mix surfex.status`
[🔗](https://github.com/dcoai/surfex/blob/v0.9.0/lib/mix/tasks/surfex.status.ex#L1)

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

    mix surfex.status                  # text; fails if anything needs attention
    mix surfex.status --format json    # the work list for tools and agents
    mix surfex.status --verify         # also verify the log (edits, removals, truncation)
    mix surfex.status --no-planned     # also fail on planned relations: everything built
    mix surfex.status --evidence       # also check confirmations by evidence against the last run
    mix surfex.status --merge A --merge B   # check them against several CI jobs' evidence together
    mix surfex.status --validated      # also fail on relations nothing has validated (§18)
    mix surfex.status --no-deviations  # also fail on declared deviations: a release's check

It fails on any dangling, orphaned or conflicted relation, on any id the `require:`
policy in `.surfex.exs` says must be related and isn't, and, with `--verify`, on any
problem with the log. With `--no-planned` it fails on any planned relation as well, for
a check that everything planned has been built (a release, say). A unit a test declares
the code deviates from (`@tag deviation: "#119"`) is listed, and its proposed relations
don't fail; with `--no-deviations` any deviation fails, and a deviation test that passed
in the evidence always does (`Surfex.Status`). With `--evidence` it
fails when a relation confirmed by evidence isn't borne out by the evidence the last
`mix test` recorded: its test didn't run, failed, or ran against other code. It also
fails on any `verifies` or `tests` relation whose test failed, whatever validated it: a
review relies on the run to say whether its test passes. With
`--merge PATH` (once per file, implying `--evidence`) it checks the claims against several
CI jobs' evidence files together: a disproof in any fails, and so does a claim no job
ran. It only
reads: nothing is recorded, so CI can run it after `mix test`. A project scanner is
project code, so the task compiles first when `.surfex.exs` names one.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
