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

feat: bridge Phases 4-6 — git-status drift, security validation, watch tests, CI docs

sha256:dac8aceb3bfad0bd1db1faed1024742806aa2ef45d90f1f026b27fed218e2c77 sha
+143 ~4 symbols
sha256:fddb1022a7db9d25ce2edef5a5deb74df26e6e2b53c5deac28b97dd4e66d62f8 snapshot
+143
symbols added
~4
symbols modified
0
dead code introduced
Semantic Changes 147 symbols
~ docs/bridge-ci.md .md 27 symbols added
+ muse bridge — CI Authentication & Usage section muse bridge — CI Authentication & Usage L1–214
+ toml — Bridge State File section .muse/git-bridge.toml — Bridge State File L20–47
+ Structure section Structure L31–47
+ code[toml]@L33 variable variable code[toml]@L33 L33–46
+ code@L26 variable variable code@L26 L26–30
+ Attribution Map section Attribution Map L180–203
+ code[bash]@L196 variable variable code[bash]@L196 L196–202
+ code[json]@L184 variable variable code[json]@L184 L184–191
+ CircleCI Example section CircleCI Example L144–180
+ code[yaml]@L146 variable variable code[yaml]@L146 L146–179
+ Environment Variables variable section Environment Variables L9–20
+ table@L11 section table@L11 L11–19
+ GitHub Actions Example section GitHub Actions Example L116–144
+ code[yaml]@L118 variable variable code[yaml]@L118 L118–143
+ Overview section Overview L3–9
+ Security Notes section Security Notes L203–214
+ Subcommand Reference section Subcommand Reference L47–116
+ --watch mode section --watch mode L96–116
+ code[bash]@L100 variable variable code[bash]@L100 L100–108
+ code[json]@L111 variable variable code[json]@L111 L111–115
+ muse bridge git-export section muse bridge git-export L62–75
+ code[bash]@L66 variable variable code[bash]@L66 L66–74
+ muse bridge git-import import section muse bridge git-import L49–62
+ code[bash]@L53 variable variable code[bash]@L53 L53–61
+ muse bridge git-status section muse bridge git-status L75–96
+ code[bash]@L79 variable variable code[bash]@L79 L79–82
+ code[json]@L85 variable variable code[json]@L85 L85–95
~ tests/test_bridge_git_status.py .py 35 symbols added
+ TestGitStatusAfterImport class class TestGitStatusAfterImport L144–191
+ test_git_status_after_import_json_shows_git_sha method method test_git_status_after_import_json_shows_git_sha L170–191
+ test_git_status_after_import_shows_git_sha method method test_git_status_after_import_shows_git_sha L147–168
+ TestGitStatusDrift class class TestGitStatusDrift L194–276
+ test_git_status_drift_none_without_import_state method method test_git_status_drift_none_without_import_state L263–276
+ test_git_status_with_git_dir_shows_drift method method test_git_status_with_git_dir_shows_drift L197–231
+ test_git_status_zero_drift_when_up_to_date method method test_git_status_zero_drift_when_up_to_date L233–261
+ TestGitStatusJsonOutput class class TestGitStatusJsonOutput L107–141
+ test_git_status_json_drift_absent_without_git_dir method method test_git_status_json_drift_absent_without_git_dir L119–125
+ test_git_status_json_drift_present_with_git_dir method method test_git_status_json_drift_present_with_git_dir L127–141
+ test_git_status_json_has_last_import_last_export method method test_git_status_json_has_last_import_last_export L110–117
+ TestGitStatusNoBridgeState class class TestGitStatusNoBridgeState L86–104
+ test_git_status_no_bridge_state_json_has_keys method method test_git_status_no_bridge_state_json_has_keys L97–104
+ test_git_status_no_bridge_state_shows_none method method test_git_status_no_bridge_state_shows_none L89–95
+ TestGitStatusTextOutput class class TestGitStatusTextOutput L279–354
+ test_git_status_text_no_drift_without_git_dir method method test_git_status_text_no_drift_without_git_dir L342–347
+ test_git_status_text_output_has_drift_section method method test_git_status_text_output_has_drift_section L282–310
+ test_git_status_text_shows_commits_to_import method method test_git_status_text_shows_commits_to_import L312–340
+ test_git_status_text_shows_header method method test_git_status_text_shows_header L349–354
+ _git_add_commit function function _git_add_commit L67–74
+ _git_head_sha function function _git_head_sha L60–64
+ _invoke function function _invoke L28–29
+ _make_git_repo function function _make_git_repo L39–57
+ _make_muse_repo function function _make_muse_repo L32–36
+ _write_bridge_state function function _write_bridge_state L77–79
+ CliRunner import import CliRunner L19–19
+ annotations import import annotations L8–8
+ fake_id import import fake_id L18–18
+ init_repo_dirs import import init_repo_dirs L17–17
+ json import import json L10–10
+ os import import os L11–11
+ pathlib import import pathlib L12–12
+ pytest import import pytest L15–15
+ subprocess import import subprocess L13–13
+ runner variable variable runner L21–21
~ tests/test_bridge_security.py .py 48 symbols added
+ TestAttributionMapControlCharsRejected class class TestAttributionMapControlCharsRejected L230–272
+ test_attribution_map_control_chars_rejected method method test_attribution_map_control_chars_rejected L250–262
+ test_attribution_map_control_chars_stripped method method test_attribution_map_control_chars_stripped L233–248
+ test_attribution_map_missing_email_gives_synthetic_handle method method test_attribution_map_missing_email_gives_synthetic_handle L264–272
+ TestCatFileRejectsInvalidSha class class TestCatFileRejectsInvalidSha L128–179
+ test_catfile_accepts_valid_sha method method test_catfile_accepts_valid_sha L164–179
+ test_catfile_rejects_invalid_sha method method test_catfile_rejects_invalid_sha L131–141
+ test_catfile_rejects_sha_with_injection method method test_catfile_rejects_sha_with_injection L153–162
+ test_catfile_rejects_short_sha method method test_catfile_rejects_short_sha L143–151
+ TestCommitMessageTemplateUsesDotFormat class class TestCommitMessageTemplateUsesDotFormat L203–223
+ test_commit_message_format_call_is_present method method test_commit_message_format_call_is_present L217–223
+ test_commit_message_template_uses_format method method test_commit_message_template_uses_format L206–215
+ TestNoShellTrueInSubprocess class class TestNoShellTrueInSubprocess L186–196
+ test_no_shell_true_in_subprocess method method test_no_shell_true_in_subprocess L189–196
+ TestValidateGitBranchName class class TestValidateGitBranchName L72–121
+ _fn method method _fn L75–77
+ test_branch_name_rejects_ampersand method method test_branch_name_rejects_ampersand L92–93
+ test_branch_name_rejects_backtick method method test_branch_name_rejects_backtick L98–99
+ test_branch_name_rejects_close_paren method method test_branch_name_rejects_close_paren L120–121
+ test_branch_name_rejects_control_char method method test_branch_name_rejects_control_char L114–115
+ test_branch_name_rejects_dollar method method test_branch_name_rejects_dollar L101–103
+ test_branch_name_rejects_dollar_sign_alone method method test_branch_name_rejects_dollar_sign_alone L105–106
+ test_branch_name_rejects_null_byte method method test_branch_name_rejects_null_byte L111–112
+ test_branch_name_rejects_open_paren method method test_branch_name_rejects_open_paren L117–118
+ test_branch_name_rejects_pipe method method test_branch_name_rejects_pipe L95–96
+ test_branch_name_rejects_semicolon method method test_branch_name_rejects_semicolon L88–90
+ test_branch_name_rejects_space method method test_branch_name_rejects_space L108–109
+ test_empty_string_returns_false method method test_empty_string_returns_false L85–86
+ test_feature_branch_returns_true method method test_feature_branch_returns_true L82–83
+ test_simple_branch_returns_true method method test_simple_branch_returns_true L79–80
+ TestValidateGitSha class class TestValidateGitSha L26–65
+ _fn method method _fn L29–31
+ test_39_chars_returns_false method method test_39_chars_returns_false L48–49
+ test_41_chars_returns_false method method test_41_chars_returns_false L45–46
+ test_empty_string_returns_false method method test_empty_string_returns_false L42–43
+ test_sha_with_newline_returns_false method method test_sha_with_newline_returns_false L64–65
+ test_sha_with_prefix_returns_false method method test_sha_with_prefix_returns_false L55–56
+ test_sha_with_semicolon_returns_false method method test_sha_with_semicolon_returns_false L58–59
+ test_sha_with_space_returns_false method method test_sha_with_space_returns_false L61–62
+ test_short_sha_returns_false method method test_short_sha_returns_false L39–40
+ test_uppercase_hex_returns_false method method test_uppercase_hex_returns_false L51–53
+ test_valid_40_char_hex_returns_true method method test_valid_40_char_hex_returns_true L33–34
+ test_valid_mixed_hex_returns_true method method test_valid_mixed_hex_returns_true L36–37
+ annotations import import annotations L12–12
+ init_repo_dirs import import init_repo_dirs L19–19
+ pathlib import import pathlib L14–14
+ pytest import import pytest L17–17
+ re import import re L15–15
~ tests/test_bridge_watch.py .py 27 symbols added
+ TestWatchCallsExportOnChange class class TestWatchCallsExportOnChange L239–322
+ test_watch_calls_export_on_change method method test_watch_calls_export_on_change L242–285
+ test_watch_no_export_when_head_unchanged method method test_watch_no_export_when_head_unchanged L287–322
+ TestWatchDetectsHeadChange class class TestWatchDetectsHeadChange L181–236
+ test_watch_detects_head_change method method test_watch_detects_head_change L184–236
+ TestWatchEmitsPollEvent class class TestWatchEmitsPollEvent L94–178
+ test_watch_emits_poll_event method method test_watch_emits_poll_event L97–136
+ test_watch_poll_event_has_required_keys method method test_watch_poll_event_has_required_keys L138–178
+ _fake_args function function _fake_args L61–87
+ _make_git_repo function function _make_git_repo L41–58
+ _make_muse_repo function function _make_muse_repo L34–38
+ Any import import Any L19–19
+ CliRunner import import CliRunner L25–25
+ MagicMock import import MagicMock L20–20
+ annotations import import annotations L10–10
+ argparse import import argparse L12–12
+ call import import call L20–20
+ init_repo_dirs import import init_repo_dirs L24–24
+ io import import io L13–13
+ json import import json L14–14
+ os import import os L15–15
+ patch import import patch L20–20
+ pathlib import import pathlib L16–16
+ pytest import import pytest L22–22
+ subprocess import import subprocess L17–17
+ sys import import sys L18–18
+ runner variable variable runner L27–27
~ muse/cli/commands/bridge.py .py 6 symbols added, 4 symbols modified
+ _BRANCH_UNSAFE_CHARS_RE variable variable _BRANCH_UNSAFE_CHARS_RE L1330–1330
+ _GIT_SHA_RE variable variable _GIT_SHA_RE L1327–1327
+ _compute_drift function function _compute_drift L2025–2078
+ _count_muse_commits_since function function _count_muse_commits_since L2081–2142
+ _validate_git_branch_name function function _validate_git_branch_name L1345–1361
+ _validate_git_sha function function _validate_git_sha L1333–1342
~ read
← Older Oldest on task/bridge-phase4-6
All commits
Newer → Latest on task/bridge-phase4-6

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