D47i — kg bundle verify is the gate a contribution passes before a person looks¶
- Status: Accepted — implements D47 (part 3); amended by D65 (CI installs kg from the public code,
KG_SOURCE) - Date: 2026-09-23
- Origin: slice 23 build
- Area: build
Decision¶
kg bundle verify [--since <git ref> | <ids>] checks bundles and exits 1 on any
failure. kg dataset init --ci writes a GitHub Actions workflow that runs it on
every pull request, over the bundles the request adds. A bundle passes when:
- It is intact. Its rows match their hash, its id matches its content, and every shared capture matches its sha.
- It is whose it says (D47g). It is signed by a listed contributor and owned by the signer. Any agent on it is listed, not paused, and in scope. A decisions bundle is signed by a maintainer.
- Its rows keep the rules. Every event has a locator and a quote, and every claim cites an event.
- The dataset holds together with it. Everything rebuilds into a scratch graph with no dangling reference, and no quote the bundle cites is missing from a capture the dataset shares. A forger can rewrite rows, recompute every hash and re-sign, but cannot make a quote appear in an official record's text.
Two further behaviours:
- Stale work warns, it does not fail. A manifest records
base, the newest bundle the exporting graph had pulled. A bundle built on an older state is told what has landed since on the same entities. kg rebuildchecks too. With contributors listed, it refuses a dataset that holds a bundle failing checks 1–3. A dataset's main line only ever holds work that passed. Verify's own scratch rebuild skips this, so that it can report each rule separately.
Why¶
Review capacity is the scarce thing. DoltHub ended its paid bounties because reviewers drowned. OpenAddresses validates every pull request in CI so that people only look at contributions that are already well-formed. Everything a machine can check, a machine checks.
Alternatives¶
- A server-side gate. That arrives with the hosted peer (slice 25). A file check in CI needs no infrastructure beyond the repository.