gabriel / musehub public
feat BREAKING fix/release-prune-pep440-sort #2 / 4
AI Agent gabriel · 10 days ago · Jul 7, 2026 · Diff

feat: wire prune_releases.py into publish_muse_release.sh (issue #128, Phase 2)

S3 cleanup now pipes candidate filenames through prune_releases.py instead of sort -V | awk. Server cleanup restructured into two SSM round-trips: list files remotely, compute the stale set locally (same source of truth as the S3 step -- Python/packaging availability isn't guaranteed on the bare EC2 host), then send an explicit rm of the exact stale filenames. The remote shell never sorts or re-implements precedence logic.

PRUNE_06/06b/06c/07/07b/07c verified via source-level assertions against the script (matching test_deployment.py's existing convention) rather than live AWS calls -- live verification against the real staging bucket/ instance is Phase 3, a deliberate action requiring explicit go-ahead, not something a test suite should trigger. All 17 tests across both files green; bash -n syntax check passes.

sha256:893883a1ec8d2317de0bdc78df5c1522ef0bacbc3bdacf4a005be8f391484d0b sha
+21 ~4 −1 symbols
sha256:d373ca80b54023654c5ca470f121db325b825e2f6633df19bda7129137e8b503 snapshot
+21
symbols added
~4
symbols modified
−1
symbol removed
0
dead code introduced
Semantic Changes 26 symbols
+ TestPruneReleasesWiredIntoPublishScript class class TestPruneReleasesWiredIntoPublishScript L31–98
+ test_PRUNE_06_sort_dash_v_removed_entirely method method test_PRUNE_06_sort_dash_v_removed_entirely L32–38
+ test_PRUNE_06b_s3_cleanup_calls_prune_releases_py method method test_PRUNE_06b_s3_cleanup_calls_prune_releases_py L40–43
+ test_PRUNE_06c_s3_cleanup_still_greps_muse_tarball_pattern method method test_PRUNE_06c_s3_cleanup_still_greps_muse_tarball_pattern L45–49
+ test_PRUNE_07_server_cleanup_has_no_sort_in_remote_command method method test_PRUNE_07_server_cleanup_has_no_sort_in_remote_command L51–64
+ test_PRUNE_07b_server_cleanup_computes_stale_set_locally method method test_PRUNE_07b_server_cleanup_computes_stale_set_locally L66–74
+ test_PRUNE_07c_server_rm_command_targets_explicit_filenames method method test_PRUNE_07c_server_rm_command_targets_explicit_filenames L76–82
+ test_script_dir_used_for_prune_releases_reference method method test_script_dir_used_for_prune_releases_reference L84–87
+ test_syntax_is_valid_bash method method test_syntax_is_valid_bash L89–98
+ _CODE variable variable _CODE L28–28
+ _PUBLISH_SH variable variable _PUBLISH_SH L16–16
+ _ROOT variable variable _ROOT L15–15
+ _SRC variable variable _SRC L17–17
+ _executable_lines function function _executable_lines L20–25
+ Path import import Path L13–13
+ annotations import import annotations L11–11
~ deploy/publish_muse_release.sh .sh 5 symbols added, 1 symbol removed, 1 symbol modified
CLEAN_CMD variable variable CLEAN_CMD L120–123
+ LIST_CMD_ID variable variable LIST_CMD_ID L121–128
+ LIST_STATUS variable variable LIST_STATUS L132–137
+ REMOTE_FILES variable variable REMOTE_FILES L146–151
+ RM_ARGS variable variable RM_ARGS L156–156
+ STALE_SERVER variable variable STALE_SERVER L153–153

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:893883a1ec8d2317de0bdc78df5c1522ef0bacbc3bdacf4a005be8f391484d0b --body "your comment"