f/hold docs

Ephemeral Assistant runtime and recovery plan

The same self-contained fhold Assistant runs on ordinary persistent disk or ephemeral local storage. This document defines the general boundary; the operator recovery contract is authoritative for inputs, catalog, initialization, ownership, limits and restore behavior.

Ownership

Host-specific examples and qualification are external operator responsibilities. Adding a host does not change the runtime or add a platform mode, management SDK, controller, plugin registry, startup installer or mandatory sidecar.

Implemented runtime

  1. Validate capability/deadline inputs, load the external recovery selection and verify the effective mount policy and required mounts before claiming ownership.
  2. Acquire same-instance ownership and validate the accepted immutable manifest.
  3. Restore empty local state before default seeding or any native writer starts; preserve validated surviving local state and refuse unresolved conflicts.
  4. Start authenticated OpenCode and enabled native workers. User scheduling is independently controlled by FH_SCHEDULER_ENABLED; recovery does not use cron.
  5. Capture each SQLite database in selected trees or the explicit SQLite list consistently and ordinary selected files within fixed resource/deadline limits. Publish immutable content and conditionally accept a complete generation under ownership.
  6. Admit requests after restoration with active ownership. Failed/overdue backups report a durability warning and retry without stopping a working agent.
  7. On TERM, stop writers/descendants, take a separately budgeted final checkpoint, and release ownership last. Forced termination can lose unpublished changes.

Directory storage requires coherent exclusive creation/atomic rename. Blob uses leases plus persistent owner identity; lease expiry is not permission to take over an old writer. Neither fencing nor snapshots provide exactly-once external actions. Never initialize over an established missing/corrupt/incompatible head.

Configuration and state

Retain the standard container roots and external include-file selection. Explicit additional paths restore to their original locations; host FH_HOME does not remap container paths. Coverage edits apply on restart to the same destination; newly excluded or unselected paths are left untouched, and historical checkpoints retain their recorded coverage. Native plugin caches/private state require deliberate coverage.

The external application separates recovery-owned ephemeral state, independently persistent drives and external configuration/secrets. Declare required independent roots with the mount policy; they are not traversed or restored. Ordinary local volumes retain their recovery coverage. Pre-populated recovery-owned mounts without a valid receipt can block restoration. SQLite cannot use a network mount. Arbitrary links and special files are not supported. SQLite is detected by its header and snapshotted natively, not copied as a changing file.

Portable user backup and offline native-history transfer remain different formats; neither substitutes for sensitive same-instance runtime recovery.

Remaining qualification

See the implementation map and Linux product qualification. This runtime contract does not qualify any particular host or external integration.