Skip to content

Commit 4a4763a

Browse files
pmaxhoganclaude
andauthored
feat(cli): local-state inspection subcommands (status / history / verify) (#13)
Add three read-only `driven-cli` subcommands that inspect the on-disk state database directly via driven-core's StateRepo, with no Drive or network access: - `status` - each backup source with its file_state counts by status, pending-op count, and last scan / deep-verify times. - `history` - the most recent activity-log entries (--limit, and --errors-only to show warnings + errors). - `verify` - flags file_state rows in a corrupt / error state and exits non-zero when any are found, so it is scriptable. Each command splits a pure `gather_*` query from the `run_*` renderer so the query logic is unit-tested against a seeded temporary database. A dependency-free epoch-ms -> ISO-8601 formatter (Hinnant's civil_from_days) keeps the timestamps readable without pulling in chrono. A missing --db path is a clean error rather than silently creating an empty database. Claude-Session: https://claude.ai/code/session_01WvXMHHbYGddVPpmQR2XmK1 Co-authored-by: Claude <noreply@anthropic.com>
1 parent 6e26a5d commit 4a4763a

4 files changed

Lines changed: 517 additions & 0 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/driven-cli/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,6 @@ anyhow.workspace = true
2323
tracing.workspace = true
2424
tracing-subscriber.workspace = true
2525
clap.workspace = true
26+
27+
[dev-dependencies]
28+
tempfile = "3"

0 commit comments

Comments
 (0)