Skip to main content

Module phase_events

Module phase_events 

Source
Expand description

Shared helpers for ADR-103 phase-span event emission.

PhaseStarted / PhaseCompleted / PhaseCancelled are ADR-094’s additive EventKind mechanism, extended by ADR-103 Decision (c) for background work that is not itself a verb dispatch. khive-pack-memory’s ANN background-rebuild task (ann.rs) originated the emission and terminal-selection pattern this module lifts into a shared home so ADR-103 Amendment 1 Part 2’s two daemon-startup embedder-warmup hooks (KgPack::warm, KnowledgePack::warm) can reuse it without duplicating either the event-append plumbing or the shutdown-cancellation classification.

Functions§

emit_phase_event
Append one ADR-103 phase-span event (PhaseStarted / PhaseCompleted / PhaseCancelled), logging and swallowing store/serialize failures.
is_benign_shutdown_cancellation
True when err is the direct result of a spawn_blocking cancellation, e.g. a short-lived process (or daemon shutdown) tearing the runtime down mid-operation, rather than a genuine backend/driver failure.