feat: implement muse bridge git-export Phase 3
GitExporter class: resolve_muse_ref, read_snapshot, sync_to_git, fix_file_modes, git_commit, git_push. _ensure_git_branch helper creates/checks-out target branch. _watch_loop for --watch polling mode (NDJSON events). run_git_export: full implementation replacing Phase 2 stub. Glob/fnmatch support in sync_to_git for --exclude patterns. Branch name safety validation (_BRANCH_SAFE_RE). 8-tier tests in tests/test_bridge_git_export.py (37 tests, all passing).
sha256:de3a6b1c163ebd89937bb0823f4d47807c7ccb774cb1b697107358c2e1037469
sha
+75
~1
symbols
sha256:e8d98bc5f7adc0d8ff7db8a36377d096c187069fff1b5f46cd042348df436d72
snapshot
+75
symbols added
~1
symbol modified
0
dead code introduced
Semantic Changes
76 symbols
+
test_bridge_state_git_sha_matches_git_log
method
method test_bridge_state_git_sha_matches_git_log L671–692
+
test_exported_file_sha256_matches_muse_object_store
method
method test_exported_file_sha256_matches_muse_object_store L617–645
+
test_git_commit_message_contains_muse_commit_id
method
method test_git_commit_message_contains_muse_commit_id L647–669
+
test_muse_commit_id_in_json_output_matches_bridge_state
method
method test_muse_commit_id_in_json_output_matches_bridge_state L694–717
+
test_run_git_export_has_docstring_mentioning_ci
method
method test_run_git_export_has_docstring_mentioning_ci L885–891
+
test_allow_empty_creates_commit_with_no_changes
method
method test_allow_empty_creates_commit_with_no_changes L491–524
+
test_git_branch_not_yet_in_git_is_created
method
method test_git_branch_not_yet_in_git_is_created L447–471
+
test_git_dir_not_git_repo_exits_user_error
method
method test_git_dir_not_git_repo_exits_user_error L430–445
+
test_git_dir_with_dirty_working_tree_proceeds
method
method test_git_dir_with_dirty_working_tree_proceeds L549–568
+
test_muse_ref_nonexistent_branch_exits_user_error
method
method test_muse_ref_nonexistent_branch_exits_user_error L473–489
+
test_spaces_in_file_path_exported_correctly
method
method test_spaces_in_file_path_exported_correctly L526–547
+
test_delete_replace_200_files_under_5s
method
method test_delete_replace_200_files_under_5s L729–758
+
test_full_export_cycle_200_files_under_10s
method
method test_full_export_cycle_200_files_under_10s L761–781
+
test_bridge_state_last_export_written
method
method test_bridge_state_last_export_written L344–363
+
test_export_produces_mirror_commit_message
method
method test_export_produces_mirror_commit_message L246–264
+
test_export_twice_no_new_muse_commit_no_new_git_commit
method
method test_export_twice_no_new_muse_commit_no_new_git_commit L266–296
+
test_git_bridge_toml_absent_from_git_tree
method
method test_git_bridge_toml_absent_from_git_tree L405–419
+
test_default_commit_message_contains_commit_id_placeholder
method
method test_default_commit_message_contains_commit_id_placeholder L195–197
+
test_dry_run_emits_json_with_dry_run_true
method
method test_dry_run_emits_json_with_dry_run_true L177–193
+
test_strip_muse_metadata_default_true
method
method test_strip_muse_metadata_default_true L199–218
+
test_fix_modes_does_not_chmod_git_directory
method
method test_fix_modes_does_not_chmod_git_directory L838–864
+
test_git_branch_with_semicolon_is_rejected
method
method test_git_branch_with_semicolon_is_rejected L819–836
+
test_shell_injection_in_commit_message_is_safe
method
method test_shell_injection_in_commit_message_is_safe L792–817
+
test_export_500_files_completes_under_15s
method
method test_export_500_files_completes_under_15s L580–606
0 comments
To add a comment, use the Muse CLI:
muse hub commit comment sha256:de3a6b1c163ebd89937bb0823f4d47807c7ccb774cb1b697107358c2e1037469 --body "your comment"
No comments yet. Be the first to start the discussion.