chadtmiller.com/knotless
Git hosted in your atproto account, on any stock PDS, fast enough for agents.
git clone knotless://chadtmiller.com/knotlessneeds the knotless git helper. set it up
# Working on knotless
Use `rustup run stable cargo` (the Justfile's `cargo`), not a system cargo.
Tests run against the npm reference PDS through `harness/`, never pds.js.
## Running tests
Run what a change needs while working, and the full gates once, when the
work is done.
- `just pds` in the background first: test binaries then share that PDS
instead of each starting one.
- `just changed` names the files changed since tests last passed and the
tests that cover them; `just t-changed` runs those and marks the pass.
`just t <cargo test args>` runs any selection on the shared PDS.
- The web pages are the SvelteKit app in `web/`; knotless-serve answers
what they show as JSON under `/_data`. `cargo test -p knotless-serve
--lib` writes the answers' TypeScript types into `web/src/lib/api`.
- For the web pages: `just shots`, which builds `web/` and retakes only
pages whose HTML changed, drawn from `harness/shots/fixtures.json`, with
no PDS. Look at the PNGs it writes under
`harness/shots/baseline/<platform>/`. After a change to what a page's
answer holds, `just shots-up` in the background once, then `just
shots-record`.
- In Svelte markup, keep a run of inline text one expression or one line:
a block or component beside it splits the text into nodes, which shapes
differently from the same text whole and moves pixels.
- Done: `just lint` (it runs svelte-check too), `just cov` (100% lines and
functions over the stock and spaces-alpha runs, side by side, in under
two minutes; `COV_CLEAN=1` rebuilds everything first, for a miss that
makes no sense) and, if
pages changed, `just shots-check` and `just shots-live`.
`cargo fmt` can put a `?` on a line of its own, which coverage then counts
as a line never run: bind the value first, or use a named function for a
row mapper, rather than lowering the gate.