trust · 06

Done, written in English

You describe success in plain language; deadreckon compiles it into executable checks the watchdog runs every time.

maps to as-built §13

def-done · a sentence becomes a test suite
You describe done in English; it compiles to checks At the top, a plain-English sentence passed to deadreckon def-done. An arrow labelled compiles-to leads to a stack of five executable check kinds: cargo_test, file_exists, content_match, build_success, and shell. Below them, dr-gate runs every check on every claim of done; if all required checks pass the run is accepted, and if any fail the run goes back for another turn. deadreckon def-done "sign up, log in, and save a drawing" compiles to executable checks cargo_test `cargo test` exits 0 file_exists a path is present content_match a file matches a pattern build_success a build command exits 0 shell your command exits 0 dr-gate runs every check, every claim of done
The default, if you define nothing, is that the working directory exists and tests pass. The watchdog runs whatever you compiled, every time.

The gate can only check what you have defined. So deadreckon lets you write the finish line in plain English and compiles it into checks the watchdog can actually run.

deadreckon def-done "build, load in a browser, show no console errors"
deadreckon def-done add "users can save drawings"
deadreckon def-done check

Each sentence becomes one or more of five executable check kinds:

  • cargo_test: a Rust test target passes.
  • file_exists: a path is present after the run.
  • content_match: a file contains an expected pattern.
  • build_success: a build command exits cleanly.
  • shell: any command you choose succeeds (exits 0).

If you define nothing, the default is sensible: the working directory exists and, when a Cargo.toml is present, cargo test passes. Whatever you compile, dr-gate runs it on every claim of done, and if the checks fail, the run keeps going.

source