Skip to main content

Module status

Module status 

Source
Expand description

Drift detection between declared .yah/cloud/ config and live cloud state.

Phase 1 scope (R040-T5): server existence + machine type + bucket existence. Hostkey-fingerprint verification stays stubbed for now; the yubaba-side /health probe is wired via the AgentProbe trait — callers that want an agent-reachability check pass an implementation, otherwise no agent findings are emitted.

@yah:ticket(R470-T1, “Status journal + replay (.yah/cloud/status.jsonl)”) @yah:assignee(agent:claude) @yah:at(2026-06-06T21:02:37Z) @yah:status(review) @yah:phase(P1) @yah:parent(R470) @yah:next(“Generalize the drift-only shape in crates/yah/cloud/src/status.rs to an append-only JSONL journal at .yah/cloud/status.jsonl. One record per reconciler decision: {at, asset, from, to, bytes?, blake3?}. Replay-on-load yields last_state_per_asset.”) @yah:next(“Wire the reconciler’s StaticAssetSyncReport emissions through this journal so every apply produces transition records.”) @yah:next(“Implement tail-F-style subscribe for the –watch path: a Stream<Item = StatusEvent> that emits each new record as it’s appended.”) @yah:verify(“cargo test -p yah-cloud status”) @yah:verify(“echo > .yah/cloud/status.jsonl && yah cloud apply –env cloud –service yah-desktop && test -s .yah/cloud/status.jsonl”) @arch:see(.yah/docs/working/W193-asset-dependency-status-surface.md) @yah:handoff(“Delivered: new crates/yah/cloud/src/asset_journal.rs with AssetState (8-state enum, kebab-case serde), AssetStatusEvent, and AssetStatusJournal (append/replay/subscribe). Path helper asset_status_journal() added to paths.rs → .yah/cloud/status.jsonl. Journal registered in lib.rs with pub re-exports. Wired into StaticAssetReconciler.up() → sync_to_r2/sync_to_minio → sync_assets: emits DriftBucket on hash_mismatch, Published (with correct from-state: PlaceholderOutput/PlaceholderFetch/PinnedNotPublished) on successful upload. In-process broadcast::Sender for subscribe(). 9 new asset_journal tests pass; 36 static_asset tests pass; cloud crate checks clean. Pre-existing cloud_init::tests::render_warden_channel… failure unchanged.”) @yah:verify(“cargo test -p cloud asset_journal # 9 pass”) @yah:verify(“cargo test -p cloud –lib reconciler::static_asset # 36 pass”) @yah:verify(“cargo check -p cloud # clean”)

Structs§

MachineReport

Enums§

DriftFinding

Traits§

AgentProbe
Hook for probing a per-machine yah-yubaba. Implemented in the CLI on top of cloud-client so this crate can stay independent of reqwest / transport concerns.

Functions§

collect_machine_report
Run drift checks for a single declared machine.