feat(repair): repairIndex returns the per-family receipt and narrates its summary
Some checks failed
CI / Node 22 (push) Has been cancelled
CI / Node 24 (push) Has been cancelled
CI / Integration + conformance (Node 22) (push) Has been cancelled
CI / Bun (latest) (push) Has been cancelled

repairIndex() now returns a RepairReport: one row per repair family
(orphaned containers, count rollups, VFS containment, metadata corruption,
write quarantine, each provider's invariant pass, degraded-read state) with
checked / healed counts and an explicit skip reason for anything not run —
no silent rows. A summary line narrates families checked and heals applied.

This is the receipts half of the graph-trust program's ask: a repair that
cannot show its work per store is a repair nobody can audit. Pinned: a
healthy store yields a complete zero-heal receipt with every family
accounted; a manufactured pre-8.3.1 ghost container appears in the receipt
as a counted heal. Additive: void-callers are unaffected.
This commit is contained in:
David Snelling 2026-08-20 11:51:29 -07:00
parent 40e7119b85
commit 8d45f964e9
4 changed files with 168 additions and 7 deletions

View file

@ -1192,6 +1192,27 @@ export interface RelateManyParams<T = any> {
/**
* Batch result
*/
/**
* One family's row in a {@link RepairReport} what repairIndex() checked,
* what it healed, and why anything was skipped. The receipts venue's graph
* trust program asked for: a repair that cannot show its work is a repair
* nobody can trust.
*/
export interface RepairFamilyReport {
family: string
checked: boolean
healed: number
detail?: string
skipped?: string
}
/** The full receipt returned by repairIndex(). */
export interface RepairReport {
families: RepairFamilyReport[]
healedTotal: number
durationMs: number
}
export interface BatchResult<T = any> {
successful: T[] // Successfully processed items
failed: Array<{ // Failed items with errors