Expand description
The daemon. Owners fill these modules in against the Plane CWDL epics:
- watcher —
notifyfilesystem watcher (Epic 2) - analyzer — rust-analyzer subprocess + LSP client (Epic 2)
- model — file-level green/red state (Epic 2, decision D4)
- build — trunk-build orchestration + input hashing (Epic 3)
- server — HTTP + WebSocket dev server, never-serve-red (Epic 4)
Skeleton only exposes a build identifier so the workspace links and CI is green-on-empty (decision D10).
Re-exports§
pub use config::FleetConfig;pub use config::FleetConfigError;pub use config::FleetOverrides;pub use config::Provenance;pub use config::Source;pub use model::LifecycleEvent;
Modules§
- activity
- #12 — per-worktree activity lifecycle (Model R Stream B,
D-FLEET-SHARED-DAEMON§3.2 / §12 / §14). - activitymgr
- #12 daemon-tick I/O shell (Model R Stream B) — the pure per-worktree
manager over the already-proven [
activity::WtLifecycle] (touch-on-routed-change /tick-on-timer / detect the actionable state edges). The live actions those edges drive (drop a worktree’s in-RAM overlay; signal [clustermgr::ClusterLifecycle::deactivate]; re-establish overlay on re-activation) are the serve-loop capstone’s concern — the same pure-core-first split that kept the flycheck barrier / cluster-lifecycle cores pure. - analyzer
- rust-analyzer subprocess supervision (Epic 2 / AC#6 = CWDL-7).
- barrier
- #5 flycheck-end barrier — the temporal half of the one-RA
multiplex isolation guarantee (Model R Stream C #158, I/O-shell
increment-3: the pure correctness core; the live
LspClient/Receiver<LspEvent>driving is the follow-on thin adapter). - build
- Build orchestration (Epic 3, CWDL-35) — the layer between a green verdict and a servable artifact.
- cache_
layout - Model R cache layout (#7): pinned
base.cache+tree.cache+solo+combined, with the operator’s decoupled-lifecycle write-gate. - cluster
- #6 — workspace-cluster manager (Model R Stream C,
D-FLEET-SHARED-DAEMON§6.3 — the pure config/RA-INDEPENDENT correctness core). - clusterdrv
- #3 serve-loop-capstone — the pure per-cluster transaction
sequencer (Model R Stream B+C tie-point, capstone-core; the live
serve-loop adapter that executes its actions against the real
LspClient/Supervisor/OverlayMultiplexerand replaces serve.rs’s park is the follow-on thin wire, capstone-wire). - clustermgr
- #6 cluster-manager I/O shell (Model R Stream C #158, I/O-shell
increment-4) — two pure pieces that the eventual live adapter
composes with
analyzer::Supervisor: - config
- Model R fleet/daemon configuration — the Stream A↔B seam.
- corun
- #8 corun batching — the optimistic-combined + solo-fallback verdict attribution state machine (pure core).
- diagnostics_
store - Per-worktree red-state diagnostic retention (Model R #11,
D-FLEET-SHARED-DAEMON§8.3 / §11). - idle
- #122 Tier-4 — idle-evict RA (bounded prototype, DEFAULT-OFF).
- lsp
- Minimal LSP client over rust-analyzer’s stdio (Epic 2 / CWDL #4, #21).
- model
- File-level green/red model + event bus, with #21 verdict provenance.
- multiplex
- #5 driver-loop — open-set → LSP-verb lowering + per-WT switch composition (Model R Stream C #158, I/O-shell increment-2: the pure correctness core).
- overlay
- #5 — LSP overlay-set diffing (Model R Stream C,
D-FLEET-SHARED-DAEMON§6 — the pure, LSP/notify-INDEPENDENT correctness core). - procmacro
- #126 Tier-3 — RA-native-downrank for safe proc-macro-off (DEFAULT-OFF).
- recovery
- #13 leg-B — per-worktree overlay replay on base-RA respawn (pure core).
- repo
- Repo-scoped daemon (Model R Stream B,
D-FLEET-SHARED-DAEMON§3-§5). - shutdown
- #13 leg-C — SIGTERM graceful shutdown drain state machine (pure core).
- structural
- #112 — structural-completeness trigger (bounded spike, DEFAULT-OFF).
- transport
- Transport abstraction (Model R #10,
D-FLEET-SHARED-DAEMON§10). - watcher
- Filesystem watcher (Epic 2 / CWDL-26).
Structs§
- Artifact
Meta - Metadata persisted alongside every cached artifact in the CAS, and the payload the dev server consumes to decide whether to hot-reload the browser.
- Build
Identity - The complete set of inputs whose identity determines a build artifact.
- Build
Result - Returned by the build/CAS layer for each
BuildTrigger; consumed by the daemon (logging/state) and the dev server (reload decision — decisions D3 WebSocket signaling and D5 full-reload-not-hot-swap govern how the browser is told, not this contract). - Build
Trigger - Sent by the daemon to the build/CAS layer to request that a green input set
be made servable. The only legitimate cause of a
BuildTriggeris aStateEvent::BecameGreen— red inputs are never built (AC#4). - Check
Result - The rich one-shot check verdict: the existing boolean
TreeStatepaired with the full diagnostic list a user needs to fix a red tree. Returned by the adjacentcargoless_core::model::check_once_with_diagnostics; existing callers ofTreeState-returning APIs (check_once, frozen for cli-ux and the bench harness) are byte-unaffected. - Content
Hash - An opaque content hash, rendered as a hex string.
- Diagnostic
- One actionable diagnostic, surfaced by the LSP layer and aggregated by
the daemon model. Carries the absolute file path, 1-based (file:line:col)
position, severity, optional compiler/lint code, the human message, and
the diagnostic
sourcestring verbatim ("rustc"for cargo-check authoritative,"rust-analyzer"for native advisory, anything else for future tiers) so the CLI can both show provenance and the model can keep classifying authoritative-vs-advisory off the same value. - Input
Hash - The CAS key: the single digest derived from a
BuildIdentity. - Local
Disk Store - Local filesystem CAS: one file per content hash under
root. - Target
Triple - The target triple a build is produced for (e.g.
wasm32-unknown-unknown).
Enums§
- Build
Outcome - What the build/CAS layer did with a
BuildTrigger. - File
State - Per-file compile verdict.
- Profile
- Cargo build profile. v0 inner-loop builds are always
Profile::Dev(workspace[profile.dev]pinsopt-level = 0, nowasm-opt, per the AC#3 latency constraint);Profile::Releaseexists in the contract so the identity is honest and a release build can never alias a dev artifact. - Severity
- Diagnostic severity, derived from the LSP
DiagnosticSeverityintegers (1=Error, 2=Warning, 3=Information, 4=Hint). A typed enum so the CLI renderserror/warning/info/hintheaders without re-deriving from raw numbers, and so a future consumer can pattern-match exhaustively. - State
Event - The event stream emitted by the daemon’s green/red model. Every other subsystem subscribes to this; nothing calls the model directly.
- Tree
State - Aggregate verdict for the whole watched tree.
Constants§
- BUILD_
ID - The single canonical identity string —
<product> <version>— used by--version,help, AND every command banner.
Traits§
- Content
Store - A store that maps an
InputHashto opaque artifact bytes.