Skip to main content

Crate pushkin_daemon

Crate pushkin_daemon 

Source
Expand description

pushkin-daemon: the warm-path validation server (spec §4.3, §8.1, §8.4). Serves the same uniform result JSON as the cold in-process path over a Unix domain socket under .pushkin/; holds parsers and per-file state warm; probes schema epochs eagerly at startup. The daemon is an optimization, never a gate-weakening layer: shims that cannot reach it fall back to the cold path, and warm results must be byte-identical to cold ones (Phase 4 conformance-parity tests).

Modules§

protocol
The UDS wire protocol (spec §4.3): newline-delimited JSON, one request and one response per line. The check response carries the SAME uniform result JSON as the cold path (§8.3) — the daemon is a transport, never a second brain. deny_unknown_fields on ingest (charter N2); versioned so a stale daemon and a newer shim fail loudly, not weirdly.
regen
Eager epoch probe + sequential regeneration queue (spec §5.2): probe headers cheaply at startup, regenerate stale artifacts one at a time with a per-item timeout. Eager because lazy checks leave artifacts silently stale and never run in short-lived processes; sequential to bound resource use; per-item timeout so one stuck item can’t block the queue.
server
The daemon server: accepts UDS connections under .pushkin/, answers protocol requests with the shared pipeline (spec §4.3). One tokio runtime per serve call; connections are tracked in a JoinSet so no task is fire-and-forget (AGENTS.md tokio rule). The daemon is a transport for the cold pipeline, never a second brain: Check calls pushkin_core::pipeline::check_write — the same function, the same envelope. Read-only daemons (spec §8.4: the offer made to non-canonical binaries) serve on private sockets and refuse wire mutations.
warm
Warm per-file state + watcher (spec §8.1): verdicts memoized by (path, content-hash), invalidated by keyed path events, cleared wholesale on manifest change. The memo NEVER re-decides — a hit returns the stored envelope, a miss runs the same check_write the cold path runs, so warm and cold are identical by construction.