gabriel / muse public
feat patch task/reflog-phase1 #7 / 8
AI Agent gabriel · 70 days ago · Jun 28, 2026 · Diff

feat: add muse reflog expire subcommand and reflog.expire-days config (RL_06–RL_12)

sha256:9ca3eeef4f199d5e8d0b21e50c384a2468e2c2477bd9b157f29fd0f7f06fddcd sha
+61 ~9 symbols
1085 changed · 1085 in snapshot files
sha256:1ceb049fbf549ce4c277e0cf836e508899b182c929db5d71659e2a6da6c8cc01 snapshot
+61
symbols added
~9
symbols modified
1085
files changed
1085
files in snapshot
0
dead code introduced
Semantic Changes 70 symbols
~ tests/test_cmd_reflog_expire.py .py 54 symbols added
+ TestExpireAll class class TestExpireAll L172–212
+ test_all_flag_processes_all_branch_logs method method test_all_flag_processes_all_branch_logs L175–193
+ test_all_with_specific_branch_flag_is_rejected method method test_all_with_specific_branch_flag_is_rejected L208–212
+ test_refs_processed_lists_every_touched_ref method method test_refs_processed_lists_every_touched_ref L195–206
+ TestExpireAllEntriesGone class class TestExpireAllEntriesGone L419–465
+ test_branch_log_removed_when_all_entries_expire method method test_branch_log_removed_when_all_entries_expire L446–453
+ test_log_file_removed_when_all_entries_expire method method test_log_file_removed_when_all_entries_expire L422–429
+ test_muse_reflog_returns_empty_entries_after_full_expire method method test_muse_reflog_returns_empty_entries_after_full_expire L431–444
+ test_zero_byte_file_is_never_left_behind method method test_zero_byte_file_is_never_left_behind L455–465
+ TestExpireAtomic class class TestExpireAtomic L334–372
+ test_no_partial_tmp_file_survives_on_success method method test_no_partial_tmp_file_survives_on_success L362–372
+ test_original_log_intact_when_replace_fails method method test_original_log_intact_when_replace_fails L337–360
+ TestExpireBasic class class TestExpireBasic L97–165
+ test_json_schema_has_all_required_fields method method test_json_schema_has_all_required_fields L133–141
+ test_no_entries_expire_when_all_recent method method test_no_entries_expire_when_all_recent L143–154
+ test_no_log_file_is_graceful method method test_no_log_file_is_graceful L156–165
+ test_remaining_entries_are_the_recent_ones method method test_remaining_entries_are_the_recent_ones L118–131
+ test_removes_old_entries_from_head_log method method test_removes_old_entries_from_head_log L100–116
+ TestExpireConfigTTL class class TestExpireConfigTTL L270–327
+ test_config_expire_days_is_used_as_default method method test_config_expire_days_is_used_as_default L273–289
+ test_default_ttl_is_90_when_config_not_set method method test_default_ttl_is_90_when_config_not_set L306–316
+ test_explicit_flag_overrides_config method method test_explicit_flag_overrides_config L291–304
+ test_muse_config_get_returns_set_value method method test_muse_config_get_returns_set_value L318–327
+ TestExpireDryRun class class TestExpireDryRun L219–263
+ test_dry_run_all_does_not_modify_any_log method method test_dry_run_all_does_not_modify_any_log L249–263
+ test_dry_run_does_not_modify_log method method test_dry_run_does_not_modify_log L237–247
+ test_dry_run_reports_expired_count method method test_dry_run_reports_expired_count L222–235
+ TestExpireIntegration class class TestExpireIntegration L379–412
+ test_exactly_50_removed_from_100_entry_log method method test_exactly_50_removed_from_100_entry_log L382–396
+ test_remaining_entries_are_the_correct_ones method method test_remaining_entries_are_the_correct_ones L398–412
+ _DAY variable variable _DAY L34–34
+ _branch_log_path function function _branch_log_path L80–81
+ _env function function _env L40–41
+ _head_log_path function function _head_log_path L76–77
+ _make_repo function function _make_repo L44–59
+ _now_ts function function _now_ts L84–85
+ _old_ts function function _old_ts L88–90
+ _write_log_entries function function _write_log_entries L62–73
+ cli variable variable cli L32–32
+ CliRunner import import CliRunner L29–29
+ NULL_COMMIT_ID import import NULL_COMMIT_ID L28–28
+ annotations import import annotations L16–16
+ call import import call L23–23
+ datetime import import datetime L18–18
+ fake_id import import fake_id L28–28
+ json import import json L19–19
+ logs_dir import import logs_dir L27–27
+ muse_dir import import muse_dir L27–27
+ os import import os L20–20
+ patch import import patch L23–23
+ pathlib import import pathlib L21–21
+ pytest import import pytest L25–25
+ time import import time L22–22
+ runner variable variable runner L31–31
~ muse/cli/commands/reflog.py .py 4 symbols added, 4 symbols modified
+ _DEFAULT_EXPIRE_DAYS variable variable _DEFAULT_EXPIRE_DAYS L260–260
+ _ExpireJson class class _ExpireJson L128–134
+ expire_reflog import import expire_reflog L83–83
+ run_expire function function run_expire L263–376
~ muse/core/reflog.py .py 3 symbols added
+ expire_reflog function function expire_reflog L263–349
+ os import import os L53–53
+ tempfile import import tempfile L55–55
Files Changed
+1085
1085 in snapshot
+ .coverage .coverage
+ .museattributes .museattributes
+ .museignore .museignore
+ CLAUDE.md .md
+ README.md .md
+ dev-setup.sh .sh
+ pyproject.toml .toml

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:9ca3eeef4f199d5e8d0b21e50c384a2468e2c2477bd9b157f29fd0f7f06fddcd --body "your comment"