gabriel / muse public
feat minor migrate feat/migrate-hardening #1 / 1
gabriel · 68 days ago · Apr 9, 2026 · Diff

feat(migrate): stream large repos, fix asserts, add NDJSON progress, full test coverage

Streaming: - _batch_commit_log: replace subprocess.run+capture_output with Popen+chunked streaming — raw git log output never fully buffered (critical for 1M+ commit repos) - _batch_diff_tree: replace communicate() with line-by-line stdout streaming — eliminates ~2GB buffer for Linux kernel-scale histories

Safety: - _CatFile: replace bare assert for stdin/stdout None checks with RuntimeError so failures surface cleanly instead of crashing silently under python -O

Agent UX: - --json now emits NDJSON progress events (branch_start, progress every 100 commits, branch_done, done) instead of a single summary at the end

Tests (38 new, zero before): - Unit: _should_exclude (12 cases), _manifest_directories (6 cases) - Integration: single-branch multi-commit, rename, delete, exclusion, dry-run, --all branches, --branch selection, error paths, --json NDJSON shape - Regression: _CatFile raises RuntimeError not AssertionError on pipe failure

snapshot-diff: - 5 new edge-case tests: bad --format, missing ref_b, --raw+zero changes, --json shorthand, no-args error

sha256:f7cc60c52e8b31d7e52f08f20d7b566e2e6e9d0dc16b9efa5a6bf147fea10276 sha
sha256:dcf80ad7cc11f8144f4d31a6eb747dc00bf32c5ccf76ff52278d80f25e5c2a71 snapshot
← Older Oldest on feat/migrate-hardening
All commits
Newer → Latest on feat/migrate-hardening

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