Architecture
Consider marking a file: the CLI parses its path and lifespan, the application opens the service, and the core records its identity and deadline. Success at this point means the file is tracked, not that it has moved. A sweep or an explicit burial performs the move.
Where decisions live
| Entry point or package | Responsibility |
|---|---|
| CLI, window, MCP | Translate input into service calls and results into exit codes, UI state or protocol replies. None moves files itself. |
| Host hooks | Translate host payloads into internal/hook.Event. A runner takes slow work off the tool-call path. |
internal/integrate | Plan changes to host configuration, then check the original content before applying the plan so concurrent edits survive. |
internal/app, obitd | Assemble platform services and wake the background worker. The core still decides what is eligible. |
internal/core/lifecycle, internal/core/ledger, internal/core/guard, internal/core/fs, internal/core/extres | Check safety rules and identity; coordinate moves, the external-resource provider contract, ledger revisions, recovery and audit records. |
internal/docker, internal/podman | Implement the extres contract for Docker containers, Docker local volumes and standalone non-Pod Podman containers (kind: "podman-container"). Core and auto never import concrete runtime packages. |
After the deadline
A sweep claims a due entry, locates the object again and checks its identity. Burial creates a grave exclusively and writes its manifest before moving the contents. If the move succeeds but the ledger update is interrupted, recovery compares the manifest to the actual locations. A revision check prevents an old sweep snapshot from overwriting a new extension.
External-resource providers
External resources plug in through the standard-library-only internal/core/extres contract (Provider, RetentionPolicy, IdentityMatcher, RemovalVerifier, AvailabilityScoper, Doctor, Discoverer), covering Docker containers, Docker local volumes and standalone Podman containers (kind: "podman-container").
- Every engine call runs outside ledger locks: write a durable pre-send intent (
containerIntents/externalIntents), invoke the CLI without holdingstore.lock, then verify state before committing. Podman entries coexist in the v18 ledger via optionalexternalcredentials andexternalIntents, preserving backward compatibility with existing Docker records. - Podman enforces strict standalone admission: Pod members, infra containers,
kube playservice containers and--rmcontainers are refused across registration, verification, stop, start, removal and discovery; Pods, images, volumes, build caches and Podman Machine VMs are never touched. Both local rootless/rootful stores and Windows/macOS Podman Machine remote connections pin the engine and storage target (resolving the default named--connectioninstead of a bare--url). obit doctorwalks registeredextres.Doctorproviders in sorted order (docker,docker-targets,docker-volume-recovery,podman,podman-targets), degrading quietly toINFOwhen a runtime is not installed or unavailable.
The ledger describes current state; the audit log describes completed operations. If an audit write fails, the outbox can deliver it later. Replaying the file move to repair the log would be incorrect. See the safety model for failure handling.