⚡ Mutation confirmation and local activity
The backend issues random, one-use confirmation intents valid for 30 seconds of monotonic time. Each belongs to the exact registered host, daemon identity, session/selection generations, operation, ordered full container IDs and timeout. At most 32 intents exist per session and three sessions are admitted. New session registration defaults to read-only; revocation/reconnection clears grants and pending confirmations. Persisted preferences never grant write access. The policy tests also cover altered IDs/actions/timeouts, expiry, reuse and cross-host/session attempts.
Activities::begin consumes that authorization before reserving a host operation slot. One operation per host and at most three globally are admitted. A concurrent call with a different confirmation still fails and consumes its confirmation: it cannot later become a delayed duplicate. The owned slot remains until the operation owner is dropped, independently of reconnect/policy replacement. The future transport owner must retain this guard through child completion/reaping.
The local history stores at most 200 records / 512 KiB: consumed intent ID, host ID, action enum, at most 20 validated full container IDs, safe integer millisecond timestamps, aggregate outcome and ordered individual results. Each result has the full ID, outcome, dispatch flag and optional fixed error code. There are no environment values, display names, shell commands, raw diagnostics or terminal content. Active records cannot be evicted by unrelated completed operations. get_activity exposes only these records through a narrow local-window read capability.
History is stored in the app data directory at activity/history.json, using the existing atomic fsync/rename adapter with an independent lock, owner checks, 0700 directory, 0600 files and no-follow reads. Corrupt/unsupported/oversized history fails closed for new mutations while normal read views remain available. Uncertain write failure disables further mutation admission for that process. This is editable local activity history, not a tamper-proof audit log.
Admission records not_dispatched. Before an operation can obtain its one-use command plan, the owner durably records unknown. Successful/failed command completion can replace it only explicitly; transport interruption, timeout or cancellation retains unknown. A crash between that write and spawn can conservatively appear unknown even if nothing ran. Loading history never dispatches, retries or automatically reconciles an action. If completion persistence fails, the durable unknown record remains and the caller receives a storage error.
Prompt 031 established this admission/persistence boundary and tested interrupted ownership with a controlled transport stand-in, without enabling a remote dispatcher. Prompt 032 adds native lifecycle controls, explicit session management and actual disposable-host interruption evidence. Terminal access remains separate and unavailable.
Schema 2 stores per-target results and supports partial/cancelled aggregates. Schema 1 records are migrated in memory and saved on the next authorized write: single known outcomes are retained, while legacy bulk aggregate outcomes become conservative individual unknowns. History is trimmed by both count and serialized bytes; active records are protected by their exact intent ID. Cancellation marks only pending targets; it never rewrites a dispatched unknown as cancelled. See batch actions.
Verified Compose project actions share the same host lock and history bounds. All observed target IDs are persisted as dispatched/unknown atomically before the one Compose command. Any nonzero/uncertain project result remains unknown per target because partial CLI execution cannot be attributed safely. Configuration paths, hashes and resolved environment are not persisted.