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-system | What it does | If it fails |
|---|---|---|
| extraction | parse the source into a typed payload | the capture is incomplete, but media/wayback may still succeed |
| media-fetch | download photos/video via the fetcher registry | the extraction still lands; media is marked failed |
| wayback (opt-in) | submit the URL to the Wayback Machine | best-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):
khiipd refetch <id> # re-extractkhiipd refetch <id> --media # re-walk the media-fetcher registrykhiipd refetch <id> --wayback # re-submit to the Wayback MachineVisual indicators
Status surfaces in three layers, with scope-specific vocabulary (extraction succeeds, media downloads, rollup completes):
- Frontmatter — canonical status fields in the vault note
- Obsidian-native callouts — rendered in the vault body
- 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.