gabriel / muse public
test log dev
AI Agent gabriel · 105 days ago · May 26, 2026 · Diff

test(log): comprehensive graph rendering coverage

55 tests across 9 classes covering: - Unit/integration: linear chain, merge connector, convergence, diamond, lane reuse, decorations - End-to-end: CLI --graph flag wired correctly, exit codes, structural assertions - Stress: 100-commit chain, 50 sequential merges, 3-branch wide fan, truncation warning - Data integrity: orphaned parent refs, root commit lane closure, empty refs, multiline messages, empty manifests - Performance: 100-commit linear < 2s, diamond < 1s, 50-merge < 5s - Security: ANSI escape injection, null bytes, carriage return, OSC title sequences, shell metacharacters, unicode - _topo_sort unit: child before parent, merge before both parents, all commits returned

sha256:06203cde0ee7e4470022a20a3f337417ec4d848c11a45899913786956c922a66 sha
+104 symbols
sha256:3a73c5cd6ec0a12e0b908a2097df4c5cb6dcecb4e1761dbef1c7ff90974391b4 snapshot
+104
symbols added
0
dead code introduced
Semantic Changes 104 symbols
~ tests/test_log_graph.py .py 104 symbols added
+ TestCliEndToEnd class class TestCliEndToEnd L589–671
+ _simple_linear_repo method method _simple_linear_repo L593–597
+ test_cli_diamond_graph_contains_slash method method test_cli_diamond_graph_contains_slash L637–650
+ test_cli_merge_graph_contains_backslash method method test_cli_merge_graph_contains_backslash L622–635
+ test_cli_no_commits_graceful method method test_cli_no_commits_graceful L652–660
+ test_cli_oneline_not_graph method method test_cli_oneline_not_graph L662–671
+ test_graph_flag_contains_asterisk method method test_graph_flag_contains_asterisk L608–613
+ test_graph_flag_contains_sha256 method method test_graph_flag_contains_sha256 L615–620
+ test_graph_flag_exits_zero method method test_graph_flag_exits_zero L599–606
+ TestConvergenceConnector class class TestConvergenceConnector L336–419
+ test_convergence_connector_before_shared_ancestor method method test_convergence_connector_before_shared_ancestor L355–376
+ test_convergence_connector_present method method test_convergence_connector_present L340–353
+ test_initial_commit_has_no_trailing_pipe method method test_initial_commit_has_no_trailing_pipe L378–397
+ test_no_dangling_pipe_column_after_convergence method method test_no_dangling_pipe_column_after_convergence L399–419
+ TestDataIntegrity class class TestDataIntegrity L782–908
+ test_commit_with_no_files_renders method method test_commit_with_no_files_renders L884–891
+ test_empty_branch_ref_falls_back_to_no_commits method method test_empty_branch_ref_falls_back_to_no_commits L852–866
+ test_graph_output_has_no_blank_prefix_on_commit_rows method method test_graph_output_has_no_blank_prefix_on_commit_rows L893–908
+ test_multiline_commit_message_renders_first_line_only method method test_multiline_commit_message_renders_first_line_only L868–882
+ test_orphaned_parent_ref_skipped method method test_orphaned_parent_ref_skipped L786–833
+ test_root_commit_closes_its_lane method method test_root_commit_closes_its_lane L835–850
+ TestDecorations class class TestDecorations L516–550
+ test_feature_branch_tip_decorated method method test_feature_branch_tip_decorated L529–539
+ test_head_decoration_on_tip method method test_head_decoration_on_tip L519–527
+ test_message_first_line_only method method test_message_first_line_only L541–550
+ TestDiamondPattern class class TestDiamondPattern L427–508
+ _build_diamond method method _build_diamond L431–443
+ test_diamond_contains_backslash method method test_diamond_contains_backslash L454–463
+ test_diamond_contains_slash method method test_diamond_contains_slash L465–474
+ test_diamond_first_line_is_merge method method test_diamond_first_line_is_merge L476–484
+ test_diamond_last_line_is_base method method test_diamond_last_line_is_base L486–495
+ test_diamond_line_count method method test_diamond_line_count L445–452
+ test_diamond_no_wide_pipe_after_slash method method test_diamond_no_wide_pipe_after_slash L497–508
+ TestLaneReuse class class TestLaneReuse L558–581
+ test_lane_slot_reused_after_close method method test_lane_slot_reused_after_close L562–581
+ TestLinearChain class class TestLinearChain L194–251
+ test_linear_commit_count_matches method method test_linear_commit_count_matches L233–243
+ test_no_commits_prints_sentinel method method test_no_commits_prints_sentinel L245–251
+ test_single_commit_shows_asterisk method method test_single_commit_shows_asterisk L198–207
+ test_three_commits_no_backslash_no_slash method method test_three_commits_no_backslash_no_slash L221–231
+ test_two_commits_connector_is_pipe method method test_two_commits_connector_is_pipe L209–219
+ TestMergeConnector class class TestMergeConnector L259–328
+ test_merge_commit_row_has_asterisk_at_col_zero method method test_merge_commit_row_has_asterisk_at_col_zero L316–328
+ test_merge_connector_has_no_extra_columns method method test_merge_connector_has_no_extra_columns L301–314
+ test_merge_connector_is_backslash method method test_merge_connector_is_backslash L263–279
+ test_merge_connector_no_extra_trailing_pipe method method test_merge_connector_no_extra_trailing_pipe L281–299
+ TestPerformance class class TestPerformance L916–984
+ test_diamond_renders_under_one_second method method test_diamond_renders_under_one_second L939–955
+ test_fifty_sequential_merges_renders_under_five_seconds method method test_fifty_sequential_merges_renders_under_five_seconds L957–984
+ test_hundred_commits_renders_under_two_seconds method method test_hundred_commits_renders_under_two_seconds L920–937
+ TestSecurity class class TestSecurity L992–1122
+ test_ansi_escape_in_commit_message_neutralised method method test_ansi_escape_in_commit_message_neutralised L1002–1022
+ test_carriage_return_in_message_neutralised method method test_carriage_return_in_message_neutralised L1042–1054
+ test_null_byte_in_commit_message_neutralised method method test_null_byte_in_commit_message_neutralised L1024–1040
+ test_shell_metacharacters_in_message_pass_through_safe method method test_shell_metacharacters_in_message_pass_through_safe L1070–1087
+ test_terminal_title_escape_in_message_neutralised method method test_terminal_title_escape_in_message_neutralised L1056–1068
+ test_unicode_in_commit_message_renders_safely method method test_unicode_in_commit_message_renders_safely L1108–1122
+ test_very_long_commit_message_does_not_break_line_structure method method test_very_long_commit_message_does_not_break_line_structure L1089–1106
+ TestStress class class TestStress L679–774
+ test_graph_truncation_prints_warning method method test_graph_truncation_prints_warning L758–774
+ test_long_chain_only_asterisk_and_pipe method method test_long_chain_only_asterisk_and_pipe L697–709
+ test_long_linear_chain_100_commits method method test_long_linear_chain_100_commits L683–695
+ test_sequential_merges_no_crash method method test_sequential_merges_no_crash L711–735
+ test_wide_fan_three_branches method method test_wide_fan_three_branches L737–756
+ TestTopoSort class class TestTopoSort L1130–1204
+ _make_record method method _make_record L1136–1152
+ test_all_commits_present_in_result method method test_all_commits_present_in_result L1193–1204
+ test_merge_commit_before_both_parents method method test_merge_commit_before_both_parents L1172–1191
+ test_parent_comes_after_child method method test_parent_comes_after_child L1161–1170
+ test_single_commit_returned method method test_single_commit_returned L1154–1159
+ _capture_graph function function _capture_graph L157–166
+ _commit_counter variable variable _commit_counter L91–91
+ _commit_prefix function function _commit_prefix L174–181
+ _env function function _env L152–154
+ _graph_lines function function _graph_lines L169–171
+ _init_repo function function _init_repo L61–88
+ _make_commit function function _make_commit L94–149
+ _prefixes function function _prefixes L184–186
+ cli variable variable cli L54–54
+ CliRunner import import CliRunner L44–44
+ CommitRecord import import CommitRecord L48–48
+ SnapshotRecord import import SnapshotRecord L49–49
+ _collect_all_commits import import _collect_all_commits L51–51
+ _render_graph import import _render_graph L51–51
+ _topo_sort import import _topo_sort L51–51
+ annotations import import annotations L33–33
+ blob_id import import blob_id L45–45
+ contextlib import import contextlib L35–35
+ datetime import import datetime L36–36
+ fake_id import import fake_id L45–45
+ hash_commit import import hash_commit L50–50
+ hash_snapshot import import hash_snapshot L50–50
+ heads_dir import import heads_dir L47–47
+ io import import io L37–37
+ json import import json L38–38
+ muse_dir import import muse_dir L47–47
+ pathlib import import pathlib L39–39
+ pytest import import pytest L42–42
+ ref_path import import ref_path L47–47
+ time import import time L40–40
+ write_commit import import write_commit L48–48
+ write_object import import write_object L46–46
+ write_snapshot import import write_snapshot L49–49
+ runner variable variable runner L53–53
← 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:06203cde0ee7e4470022a20a3f337417ec4d848c11a45899913786956c922a66 --body "your comment"