gabriel / muse public
feat task/bridge-roundtrip #1 / 1
AI Agent gabriel · 144 days ago · Apr 27, 2026 · Diff

feat: end-to-end bridge roundtrip tests + fix _count_muse_commits_since

- Add tests/test_bridge_roundtrip.py: 41 tests across 8 tiers covering the full git→muse→git bidirectional cycle using a realistic multi-branch, multi-author, multi-tag git fixture - Fix _count_muse_commits_since() in bridge.py: was reading from the wrong path (.muse/objects/commits) and wrong format (JSON); now uses store's read_commit() which reads the correct .muse/commits/sha256/*.msgpack files

sha256:390872898d28301af72e8b767408b3317c95a15c465b27f540be22c1ab090806 sha
+73 ~1 symbols
sha256:317fcf9ec431cf77a98e115ac4efb5d1be445b58c19aac4b6ee7270775f279da snapshot
+73
symbols added
~1
symbol modified
0
dead code introduced
Semantic Changes 74 symbols
~ tests/test_bridge_roundtrip.py .py 73 symbols added
+ TestBidirectionalCycle class class TestBidirectionalCycle L652–731
+ test_full_cycle_state_consistent method method test_full_cycle_state_consistent L655–689
+ test_muse_commits_visible_after_import_then_export method method test_muse_commits_visible_after_import_then_export L691–731
+ TestDataIntegrity class class TestDataIntegrity L940–1056
+ test_binary_ish_file_sha256_preserved_through_import method method test_binary_ish_file_sha256_preserved_through_import L943–974
+ test_no_phantom_files_after_import method method test_no_phantom_files_after_import L1026–1056
+ test_readme_content_byte_for_byte method method test_readme_content_byte_for_byte L1010–1024
+ test_text_file_sha256_preserved_import_export method method test_text_file_sha256_preserved_import_export L976–1008
+ TestDriftTracking class class TestDriftTracking L1064–1197
+ test_status_detects_muse_only_commits_as_export_drift method method test_status_detects_muse_only_commits_as_export_drift L1112–1157
+ test_status_detects_new_git_commits_as_drift method method test_status_detects_new_git_commits_as_drift L1088–1110
+ test_status_shows_last_import_sha_in_state method method test_status_shows_last_import_sha_in_state L1159–1178
+ test_status_shows_zero_drift_after_fresh_import method method test_status_shows_zero_drift_after_fresh_import L1067–1086
+ test_status_text_mode_shows_drift_section method method test_status_text_mode_shows_drift_section L1180–1197
+ TestFixtureSanity class class TestFixtureSanity L325–368
+ test_breaking_change_commit_present method method test_breaking_change_commit_present L364–368
+ test_feature_auth_branch_exists method method test_feature_auth_branch_exists L334–338
+ test_main_branch_has_at_least_4_commits method method test_main_branch_has_at_least_4_commits L328–332
+ test_src_auth_py_exists_on_main method method test_src_auth_py_exists_on_main L352–355
+ test_two_authors_in_git_history method method test_two_authors_in_git_history L357–362
+ test_v010_tag_exists method method test_v010_tag_exists L340–344
+ test_v100_tag_exists method method test_v100_tag_exists L346–350
+ TestFullExport class class TestFullExport L507–644
+ _setup method method _setup L510–533
+ test_export_auth_module_appears_in_git method method test_export_auth_module_appears_in_git L581–590
+ test_export_exit_code_zero method method test_export_exit_code_zero L535–541
+ test_export_git_message_references_muse_commit method method test_export_git_message_references_muse_commit L556–568
+ test_export_idempotent_no_duplicate_commit method method test_export_idempotent_no_duplicate_commit L627–644
+ test_export_json_contains_git_sha method method test_export_json_contains_git_sha L617–625
+ test_export_muse_dir_not_in_git method method test_export_muse_dir_not_in_git L592–602
+ test_export_produces_git_commit method method test_export_produces_git_commit L543–554
+ test_export_src_files_appear_in_git method method test_export_src_files_appear_in_git L570–579
+ test_export_updates_bridge_state_last_export method method test_export_updates_bridge_state_last_export L604–615
+ TestFullImport class class TestFullImport L376–499
+ test_import_all_branches_imports_feature_branch method method test_import_all_branches_imports_feature_branch L401–414
+ test_import_auth_module_tracked method method test_import_auth_module_tracked L446–458
+ test_import_commit_messages_preserved method method test_import_commit_messages_preserved L416–429
+ test_import_creates_muse_commits method method test_import_creates_muse_commits L389–399
+ test_import_exit_code_zero method method test_import_exit_code_zero L379–387
+ test_import_git_dir_excluded method method test_import_git_dir_excluded L487–499
+ test_import_readme_content_matches method method test_import_readme_content_matches L460–471
+ test_import_src_files_tracked method method test_import_src_files_tracked L431–444
+ test_import_writes_bridge_state method method test_import_writes_bridge_state L473–485
+ TestIncrementalImport class class TestIncrementalImport L739–819
+ test_incremental_import_adds_new_commits method method test_incremental_import_adds_new_commits L742–771
+ test_incremental_import_no_duplicates method method test_incremental_import_no_duplicates L773–795
+ test_three_round_incremental_accumulates method method test_three_round_incremental_accumulates L797–819
+ TestMuseNativeRoundTrip class class TestMuseNativeRoundTrip L827–932
+ test_muse_modification_overwrites_in_git method method test_muse_modification_overwrites_in_git L889–932
+ test_muse_native_file_survives_export_then_reimport method method test_muse_native_file_survives_export_then_reimport L830–887
+ _build_complex_git_repo function function _build_complex_git_repo L97–254
+ _git function function _git L51–62
+ _git_commit function function _git_commit L76–86
+ _git_env function function _git_env L65–73
+ _git_file_sha256 function function _git_file_sha256 L315–317
+ _git_log_count function function _git_log_count L307–312
+ _invoke function function _invoke L257–259
+ _make_muse_repo function function _make_muse_repo L262–267
+ _muse_branches function function _muse_branches L294–304
+ _muse_checkout function function _muse_checkout L270–281
+ _muse_log function function _muse_log L284–291
+ _write_files function function _write_files L89–94
+ CliRunner import import CliRunner L42–42
+ annotations import import annotations L30–30
+ hashlib import import hashlib L32–32
+ json import import json L33–33
+ os import import os L34–34
+ pathlib import import pathlib L35–35
+ pytest import import pytest L40–40
+ subprocess import import subprocess L36–36
+ textwrap import import textwrap L37–37
+ time import import time L38–38
+ runner variable variable runner L44–44
← Older Oldest on task/bridge-roundtrip
All commits
Newer → Latest on task/bridge-roundtrip

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