Expand description
planariad’s core, independent of the real backends: the tick loop and the
request handler. The planariad binary instantiates it with the systemd,
udev and nixos-rebuild backends; the gym, with the fake machine.
Re-exports§
pub use core::Core;pub use core::CoreConfig;pub use core::LogRecord;pub use core::Peer;
Modules§
- approval
- §16 Approvals show the change (owner decision, Nov 2): the
configuration a generation transition that asks would apply. The core
builds it from the derived facts, which come from the evaluated
generations (§11), never from the proposal.
planarian approve, the console and the notice show it;approve --jsonand IPCPending.diffcarry the same data. A diff that differs when the facts are re-derived at approval changes the token’sbound_to(the binding hashes the facts), so the approval does not apply and the change asks again. - config
/etc/planarian/config.json, written by the NixOS module, and the canonical probes shipped in the core package (I10).- core
- The daemon loop (SPEC §10, §13) and request handling (§14, §16).
- hold
- §12d Network security fails closed, the daemon’s half (#35 part 1).
- hooks
- The two Phase A hooks (§9, §10): a signed external desired-state source, verified and cached with no producer and no network, and a signed health report emitted locally with the minimal disclosure profile.
- render
- Plain-language rendering of transitions, records and results.
- renew
- Lease renewal (§12): while this daemon is busy in a long backend call, a
thread renews the leases it holds, so the watchdog does not take over
from a live daemon. It keeps one journal handle and catches up on what
others appended (
sync_ledger), rather than opening the journal again each time: opening reads the checkpoint and the whole log, and after a compaction the rest of the store, so renewing would cost the journal’s size every 20 s and be slowest when the journal is fullest. - snapshot
- Read-only answers while the core is busy.
Constants§
- STARTUP_
GRACE - The default startup grace (
services.planarian.startupGrace).