M5c-1 plan: task 14, bxctl memory sync
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
//! What `bxctl memory sync` prints (M5c spec, section 5): how many items the ledger holds in each
|
||||
//! state, and every failed item, oldest first, by its label, never by its text.
|
||||
|
||||
use crate::honcho::ledger::{Ledger, label};
|
||||
|
||||
/// The answer without `[honcho]`: not an error.
|
||||
pub const NOT_CONFIGURED: &str = "honcho sync: not configured (memoryd.toml has no [honcho])";
|
||||
|
||||
/// The report of `ledger`: one line of counts, then, when any item failed, a heading and one line
|
||||
/// per failed item: its time, its label, its kind, and its HTTP status when it had one.
|
||||
pub fn report(ledger: &Ledger) -> String {
|
||||
// `let c = ledger.counts();` and `out` the first line (see "The report"). With
|
||||
// `ledger.failures()` not empty, push `"\nfailed, oldest first:"`; then for each `f`, push
|
||||
// `format!("\n {} {} {}", f.time.to_rfc3339(), label(&f.item), f.kind)`, and when
|
||||
// `f.status` is `Some(status)`, `format!(" (HTTP {status})")`. Return `out`.
|
||||
todo!()
|
||||
}
|
||||
Reference in New Issue
Block a user