Skip to content

backdraft 0.12.0

Choose a tag to compare

@spencerbraun spencerbraun released this 18 Sep 13:26

A week on what happens after the draft: output an agent can act on, a check on a file somebody sent you, and citations that survive a source changing under them.

  • backdraft bind --json and backdraft verify --json print one JSON object instead of the report, with the same exit codes. bind --json is the record itself, byte for byte what bind writes. verify --json is a new backdraft/verify-v1 object whose findings each carry a kind: receipt means the file was edited after it was written, source means the sources no longer stand behind a citation. Both used to be the same exit 2, and now a hook or an agent can tell them apart without reading a sentence.
  • backdraft verify <artifact> --against <project> checks a file you were sent against a project you have, without copying it into the checkout. The flag is you saying where the file came from, and verify still never infers that. A path with no registry in it is refused rather than quietly checking the file alone.
  • A claim can straddle two chunks, and the gate now says so. A search hit whose text may run on into the next chunk carries that chunk's token too, indented under its excerpt. That covers a paragraph the chunker cut in two and every page break. A page read that reaches the end of its page closes with the next page's first chunk. Both tokens are minted, so a sentence that runs on is cited by both halves.
  • backdraft locate <doc.md> finds where a re-ingest moved the text a document cites. A paragraph inserted above a citation shifts its chunk number, so it comes back drifted even when its words never changed. For each drifted citation, locate finds the exact cited text in the new snapshot: moved gives the token that holds it now, ambiguous names the places when there are several (or when the citation is a cell), and gone proposes nothing. It is read-only and rewrites nothing.
  • backdraft show on a drifted token now points at locate. What stands at the old address after an edit can be a different paragraph.
  • bind, locate and render refuse a document that is not UTF-8, naming it, where locate and render used to stop with a traceback. render says where it looked for a missing record, including .backdraft/records/, which is where bind writes one. bind --help now states what it writes and its exit codes.
  • Ingesting an .xls without the [xls] extra says to install it, instead of saying the format is unsupported.

1534 tests.