gabriel / muse public
feat patch task/maintenance #1 / 1
gabriel · 62 days ago · Apr 14, 2026 · Diff

feat: muse maintenance — scheduled store maintenance orchestration

Implements muse maintenance with three subcommands:

maintenance run [--task gc|verify-objects] [--all] [--dry-run] [--json] Executes selected tasks; persists last-run timestamps to .muse/maintenance.json. --dry-run previews without mutations.

maintenance status [--json] Shows schedule config (enabled, period_hours) and per-task last-run timestamps.

maintenance schedule [--period-hours N] [--enable] [--disable] Updates .muse/maintenance.json schedule configuration.

Tasks: gc — run_gc(full=True); removes unreachable objects, commits, and snapshots from the store. verify-objects — rehashes every object file; reports checked/failed.

JSON output for run: {tasks_run, results: {gc: {...}, verify-objects: {...}}, dry_run, elapsed_seconds}

- muse/cli/commands/maintenance.py: full implementation - muse/cli/app.py: maintenance registered as maintenance - tests/test_cmd_maintenance.py: 25 tests covering run/status/schedule, dry-run semantics, JSON schema, corrupt-object detection, 100-object stress

Closes #15

sha256:c67667c855a952b2c715c746eae439ea8824ba48aa3c9d1bb8f3e408576a2c3d sha
sha256:3ce48e92f770920516f80019626881c683b6b16249182f2cfbab79b6d03a4ce8 snapshot
← Older Oldest on task/maintenance
All commits
Newer → Latest on task/maintenance

0 comments

No comments yet. Be the first to start the discussion.

To add a comment, use the Muse CLI: muse hub commit comment sha256:c67667c855a952b2c715c746eae439ea8824ba48aa3c9d1bb8f3e408576a2c3d --body "your comment"