gabriel / muse public
feat patch maintenance dev
AI Agent gabriel · 163 days ago · Apr 17, 2026 · Diff

feat(maintenance): agent-ready supercharge — envelope, schedule --json, sha256: failures

- Add _MaintenanceRunJson / _MaintenanceStatusJson / _MaintenanceScheduleJson / _MaintenanceErrorJson TypedDicts - Add _emit_error(output_json, msg, code): JSON errors to stdout in --json mode - Expand run --json envelope: status, error, duration_ms, exit_code (drop elapsed_seconds) - Expand status --json envelope: status, error, exit_code - Add schedule --json: new flag emitting {status, error, enabled, period_hours, exit_code} - Fix _run_verify_objects: failures list now emits sha256:-prefixed OIDs (was bare hex) - Update docstring with full JSON schemas for all three subcommands and error schema - Fix test_cmd_maintenance.py: sha256:-prefix _sha(), fix corrupt-object path, duration_ms - Add test_maintenance_supercharge.py: 38 tests across envelope/schedule-json/OID/TypedDict/docstring

sha256:9f76fb187094161675b4f56532168fb82852f5cbfee24b4c1baf41220ba8964b sha
+71 ~11 symbols
sha256:6d9a63c8f7623a22cf78104900baa63634d30fb40ee175692739d5c4c5219a97 snapshot
+71
symbols added
~11
symbols modified
0
dead code introduced
Semantic Changes 82 symbols
~ tests/test_maintenance_supercharge.py .py 65 symbols added
+ TestDocstring class class TestDocstring L314–333
+ _doc method method _doc L315–317
+ test_docstring_documents_duration_ms method method test_docstring_documents_duration_ms L328–329
+ test_docstring_documents_error method method test_docstring_documents_error L322–323
+ test_docstring_documents_error_schema method method test_docstring_documents_error_schema L331–333
+ test_docstring_documents_exit_code method method test_docstring_documents_exit_code L325–326
+ test_docstring_documents_status method method test_docstring_documents_status L319–320
+ TestNoProsePollution class class TestNoProsePollution L242–267
+ test_no_emoji_in_run_json_stdout method method test_no_emoji_in_run_json_stdout L258–262
+ test_no_traceback_in_run_json method method test_no_traceback_in_run_json L264–267
+ test_run_json_stdout_is_valid_json method method test_run_json_stdout_is_valid_json L243–246
+ test_schedule_json_stdout_is_valid_json method method test_schedule_json_stdout_is_valid_json L253–256
+ test_status_json_stdout_is_valid_json method method test_status_json_stdout_is_valid_json L248–251
+ TestRunJsonEnvelope class class TestRunJsonEnvelope L66–119
+ test_all_required_keys_present method method test_all_required_keys_present L71–77
+ test_dry_run_flag_reflected method method test_dry_run_flag_reflected L108–112
+ test_duration_ms_is_nonneg_float method method test_duration_ms_is_nonneg_float L94–99
+ test_error_empty_on_success method method test_error_empty_on_success L84–87
+ test_exit_code_zero_on_success method method test_exit_code_zero_on_success L89–92
+ test_no_elapsed_seconds_key method method test_no_elapsed_seconds_key L101–106
+ test_status_ok_on_success method method test_status_ok_on_success L79–82
+ test_tasks_run_is_list method method test_tasks_run_is_list L114–119
+ TestScheduleJson class class TestScheduleJson L159–203
+ test_schedule_json_all_required_keys method method test_schedule_json_all_required_keys L169–175
+ test_schedule_json_exit_code_zero method method test_schedule_json_exit_code_zero L200–203
+ test_schedule_json_flag_accepted method method test_schedule_json_flag_accepted L164–167
+ test_schedule_json_reflects_enabled_false method method test_schedule_json_reflects_enabled_false L194–198
+ test_schedule_json_reflects_enabled_true method method test_schedule_json_reflects_enabled_true L188–192
+ test_schedule_json_reflects_period_hours method method test_schedule_json_reflects_period_hours L182–186
+ test_schedule_json_status_ok method method test_schedule_json_status_ok L177–180
+ TestStatusJsonEnvelope class class TestStatusJsonEnvelope L126–152
+ test_all_required_keys_present method method test_all_required_keys_present L131–137
+ test_error_empty_on_success method method test_error_empty_on_success L144–147
+ test_exit_code_zero_on_success method method test_exit_code_zero_on_success L149–152
+ test_status_ok_on_success method method test_status_ok_on_success L139–142
+ TestTypedDicts class class TestTypedDicts L274–307
+ test_maintenance_error_json_exists method method test_maintenance_error_json_exists L287–289
+ test_maintenance_run_json_exists method method test_maintenance_run_json_exists L275–277
+ test_maintenance_schedule_json_exists method method test_maintenance_schedule_json_exists L283–285
+ test_maintenance_status_json_exists method method test_maintenance_status_json_exists L279–281
+ test_run_json_has_required_annotations method method test_run_json_has_required_annotations L291–295
+ test_schedule_json_has_required_annotations method method test_schedule_json_has_required_annotations L303–307
+ test_status_json_has_required_annotations method method test_status_json_has_required_annotations L297–301
+ TestVerifyObjectsOidIntegrity class class TestVerifyObjectsOidIntegrity L210–235
+ test_clean_store_failures_list_empty method method test_clean_store_failures_list_empty L229–235
+ test_failures_list_uses_sha256_prefix method method test_failures_list_uses_sha256_prefix L213–227
+ _REPO_ID variable variable _REPO_ID L29–29
+ _init_repo function function _init_repo L40–48
+ _invoke function function _invoke L57–59
+ _sha function function _sha L36–37
+ _write_obj function function _write_obj L51–54
+ CliRunner import import CliRunner L26–26
+ Manifest import import Manifest L25–25
+ SnapshotRecord import import SnapshotRecord L24–24
+ annotations import import annotations L14–14
+ compute_commit_id import import compute_commit_id L23–23
+ compute_snapshot_id import import compute_snapshot_id L23–23
+ datetime import import datetime L16–16
+ get_type_hints import import get_type_hints L20–20
+ hashlib import import hashlib L17–17
+ json import import json L18–18
+ pathlib import import pathlib L19–19
+ write_object import import write_object L22–22
+ write_snapshot import import write_snapshot L24–24
+ runner variable variable runner L28–28
~ muse/cli/commands/maintenance.py .py 6 symbols added, 6 symbols modified
+ _MaintenanceErrorJson class class _MaintenanceErrorJson L162–166
+ _MaintenanceRunJson class class _MaintenanceRunJson L131–139
+ _MaintenanceScheduleJson class class _MaintenanceScheduleJson L153–159
+ _MaintenanceStatusJson class class _MaintenanceStatusJson L142–150
+ _emit_error function function _emit_error L212–226
+ TypedDict import import TypedDict L108–108
~ Any
← Older Oldest on dev
All commits
Newer → Latest on dev

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