Skip to content

Failure handling (P-δ)

Khiip’s failure-handling principle is capture-what-we-can (P-δ, per ADR-0010). Capture is not all-or-nothing: each sub-system reports its own status independently, and a partial-success capture still lands.

Per-sub-system status

A single capture runs several sub-systems that succeed or fail on their own:

Sub-systemWhat it doesIf it fails
extractionparse the source into a typed payloadthe capture is incomplete, but media/wayback may still succeed
media-fetchdownload photos/video via the fetcher registrythe extraction still lands; media is marked failed
wayback (opt-in)submit the URL to the Wayback Machinebest-effort; recorded as not-archived in archive_urls, quietly (no callout)

A failed media download never discards a good extraction. Wayback is off by default as of v0.1.5 (archive.org’s anonymous Save-Page-Now is rate-limited and unreliable); enable it with [archive] wayback_enabled = true. When on, a failed submission is recorded quietly in frontmatter — it never writes a warning into your note.

Tombstones, not silence

Failed-permanent captures are retained in the recall index as tombstones rather than silently dropped — so you can see what didn’t make it, and why, instead of it vanishing.

Granular refetch

The three dimensions are each independently re-attemptable (see Refetch & validate):

Terminal window
khiipd refetch <id> # re-extract
khiipd refetch <id> --media # re-walk the media-fetcher registry
khiipd refetch <id> --wayback # re-submit to the Wayback Machine

Visual indicators

Status surfaces in three layers, with scope-specific vocabulary (extraction succeeds, media downloads, rollup completes):

  1. Frontmatter — canonical status fields in the vault note
  2. Obsidian-native callouts — rendered in the vault body
  3. Plugin UI badges — at the v0.5+ premium UX

This way the same status is legible whether you’re reading raw frontmatter, the Markdown, or (later) the plugin.