gabriel / muse public
feat patch msign+store main #41 / 55
gabriel · 141 days ago · Apr 16, 2026 · Diff

feat(msign+store): upgrade MSign to 6-field canonical message; enforce sha256: prefix at every layer

MSign wire format (6-field canonical message, alg in header): - canonical_message: {alg}\n{METHOD}\n{host}\n{path}\n{ts}\n{body_hash} - Header: MSign handle=\"...\" alg=\"ed25519\" ts=... sig=\"...\" - _normalise_host: strips :443/:80, keeps :10003 and other non-standard ports - ParsedMSign gains alg field; parse/verify/regex updated accordingly - sign.py: remove unused canonical_message import

sha256: prefix defense-in-depth (all layers): - snapshot.py: hash_file, compute_snapshot_id, compute_commit_id normalize inputs - store.py: _commit_path/_snapshot_path strip prefix; write_branch_ref, write_head_commit, read_head updated to require/accept sha256: prefix - object_store.py: all 4 integrity-check sites compare with sha256: prefix - validation.py: validate_object_id/validate_ref_id require sha256: prefix - stat_cache.py: _hash_str returns sha256: prefix; get_cached normalizes hits - workdir.py: verify_workdir_integrity hashes with sha256: prefix - transport.py: normalize bases/missing at API boundary

Tests: 50 msign tests + 108 transport/sign/dual-sig tests all green

sha256:cd1681509826d0afe21392145109fa851c079cb4ae5a47c7363e56add0f7677d sha
+722 symbols
sha256:2e35abc023c92f00793db4d018f7298fd75dba44c082ca2ac82292d77fa43aa9 snapshot
+722
symbols added
0
dead code introduced
Semantic Changes 722 symbols
~ muse/cli/commands/sign.py .py 20 symbols added
+ _add_body_flags function function _add_body_flags L416–429
+ _add_common_flags function function _add_common_flags L381–413
+ _emit function function _emit L144–150
+ _load_signing function function _load_signing L92–119
+ _public_key_info function function _public_key_info L136–141
+ _read_body function function _read_body L122–133
+ TYPE_CHECKING import import TYPE_CHECKING L82–82
+ annotations import import annotations L74–74
+ argparse import import argparse L76–76
+ base64 import import base64 L77–77
+ hashlib import import hashlib L78–78
+ json import import json L79–79
+ pathlib import import pathlib L80–80
+ sys import import sys L81–81
+ register function function register L432–563
+ run_curl function function run_curl L300–333
+ run_header function function run_header L157–204
+ run_payment function function run_payment L340–374
+ run_request function function run_request L243–293
+ run_verify function function run_verify L211–236
~ muse/core/msign.py .py 23 symbols added
+ EMPTY_BODY_HASH variable variable EMPTY_BODY_HASH L89–89
+ ParsedMSign class class ParsedMSign L96–101
+ PaymentClaim class class PaymentClaim L118–147
+ REPLAY_WINDOW_SECONDS variable variable REPLAY_WINDOW_SECONDS L71–71
+ _ALGORITHM variable variable _ALGORITHM L74–74
+ _MSIGN_RE variable variable _MSIGN_RE L80–86
+ _PaymentClaimRequired class class _PaymentClaimRequired L104–115
+ _STANDARD_PORTS variable variable _STANDARD_PORTS L77–77
+ _normalise_host function function _normalise_host L154–165
+ build_msign_header function function build_msign_header L207–253
+ build_payment_claim function function build_payment_claim L376–482
+ canonical_message function function canonical_message L172–204
+ Any import import Any L62–62
+ TYPE_CHECKING import import TYPE_CHECKING L62–62
+ TypedDict import import TypedDict L62–62
+ annotations import import annotations L55–55
+ base64 import import base64 L57–57
+ hashlib import import hashlib L58–58
+ re import import re L59–59
+ time import import time L60–60
+ parse import import urllib.parse L61–61
+ parse_msign_header function function parse_msign_header L256–281
+ verify_msign_header function function verify_msign_header L284–369
~ muse/core/object_store.py .py 37 symbols added
+ _CLEANUP_MIN_AGE_SECS variable variable _CLEANUP_MIN_AGE_SECS L77–77
+ _DEFAULT_SHARD_PREFIX_LEN variable variable _DEFAULT_SHARD_PREFIX_LEN L66–66
+ _OBJECTS_DIR variable variable _OBJECTS_DIR L65–65
+ _OBJECT_MODE variable variable _OBJECT_MODE L70–70
+ _VALID_SHARD_PREFIX_LENS variable variable _VALID_SHARD_PREFIX_LENS L67–67
+ _cached_shard_prefix_len function function _cached_shard_prefix_len L126–141
+ _created_object_shards variable variable _created_object_shards L178–178
+ _ensure_object_shard function function _ensure_object_shard L181–209
+ _fsync_fd function function _fsync_fd L80–109
+ _fsync_path function function _fsync_path L112–122
+ _object_path_with_fallback function function _object_path_with_fallback L323–349
+ _shard_prefix_len function function _shard_prefix_len L144–154
+ cleanup_stale_object_temps function function cleanup_stale_object_temps L212–267
+ has_object function function has_object L352–366
+ MAX_FILE_BYTES import import MAX_FILE_BYTES L55–55
+ MAX_OBJECT_WRITE_BYTES import import MAX_OBJECT_WRITE_BYTES L55–55
+ annotations import import annotations L42–42
+ assert_not_symlink import import assert_not_symlink L55–55
+ assert_write_inside_repo import import assert_write_inside_repo L55–55
+ fcntl import import fcntl L44–44
+ functools function import functools L45–45
+ hashlib import import hashlib L46–46
+ logging import import logging L47–47
+ os import import os L48–48
+ pathlib import import pathlib L49–49
+ shutil import import shutil L50–50
+ sys import import sys L51–51
+ tempfile import import tempfile L52–52
+ time import import time L53–53
+ validate_object_id import import validate_object_id L55–55
+ logger variable variable logger L63–63
+ object_path function function object_path L291–320
+ objects_dir function function objects_dir L270–288
+ read_object function function read_object L541–598
+ restore_object function function restore_object L601–732
+ write_object function function write_object L369–451
+ write_object_from_path function function write_object_from_path L454–538
~ muse/core/snapshot.py .py 27 symbols added
+ _ALWAYS_PRUNE_DIRS variable variable _ALWAYS_PRUNE_DIRS L69–87
+ _BUILTIN_SECRET_PATTERNS variable variable _BUILTIN_SECRET_PATTERNS L97–111
+ _SEP variable variable _SEP L173–173
+ _build_filename_filter function function _build_filename_filter L114–144
+ build_snapshot_manifest function function build_snapshot_manifest L188–193
+ compute_commit_id function function compute_commit_id L473–496
+ compute_snapshot_id function function compute_snapshot_id L335–361
+ detect_directory_renames function function detect_directory_renames L364–411
+ diff_workdir_vs_snapshot function function diff_workdir_vs_snapshot L414–470
+ directories_from_manifest function function directories_from_manifest L196–217
+ hash_file function function hash_file L176–185
+ Manifest import import Manifest L61–61
+ _stat import import _stat L59–59
+ annotations import import annotations L51–51
+ fnmatch import import fnmatch L53–53
+ hashlib import import hashlib L54–54
+ is_ignored import import is_ignored L62–62
+ json import import json L55–55
+ load_cache import import load_cache L63–63
+ load_ignore_config import import load_ignore_config L62–62
+ os import import os L56–56
+ pathlib import import pathlib L57–57
+ re import import re L58–58
+ resolve_patterns import import resolve_patterns L62–62
+ load_ignore_patterns function function load_ignore_patterns L147–171
+ walk_workdir function function walk_workdir L293–332
+ walk_workdir_with_dirs function function walk_workdir_with_dirs L220–290
~ muse/core/stat_cache.py .py 33 symbols added
+ FileCacheEntry class class FileCacheEntry L101–111
+ MAX_CACHE_BYTES variable variable MAX_CACHE_BYTES L92–92
+ StatCache class class StatCache L144–417
+ __init__ method method __init__ L159–164
+ empty method method empty L236–238
+ get_cached method method get_cached L244–290
+ get_dimension method method get_dimension L316–340
+ get_object_hash method method get_object_hash L292–310
+ load method method load L171–233
+ prune method method prune L372–386
+ save method method save L388–417
+ set_dimension method method set_dimension L342–366
+ _CACHE_FILENAME variable variable _CACHE_FILENAME L87–87
+ _CACHE_VERSION variable variable _CACHE_VERSION L86–86
+ _CHUNK variable variable _CHUNK L88–88
+ _CacheDoc class class _CacheDoc L114–118
+ _DimensionMap variable variable _DimensionMap L83–83
+ _EntryMap variable variable _EntryMap L84–84
+ _MAX_ARRAY_LEN variable variable _MAX_ARRAY_LEN L97–97
+ _MAX_MAP_LEN variable variable _MAX_MAP_LEN L98–98
+ _MAX_STR_LEN variable variable _MAX_STR_LEN L96–96
+ _hash_bytes function function _hash_bytes L121–128
+ _hash_str function function _hash_str L131–141
+ TypedDict import import TypedDict L77–77
+ annotations import import annotations L70–70
+ hashlib import import hashlib L72–72
+ logging import import logging L73–73
+ msgpack import import msgpack L79–79
+ os import import os L74–74
+ pathlib import import pathlib L75–75
+ tempfile import import tempfile L76–76
+ load_cache function function load_cache L420–435
+ logger variable variable logger L81–81
~ muse/core/store.py .py 156 symbols added
+ CommitDict class class CommitDict L722–806
+ CommitReadCorrupt class class CommitReadCorrupt L1520–1523
+ CommitReadNotFound class class CommitReadNotFound L1516–1517
+ CommitReadOk class class CommitReadOk L1511–1513
+ CommitRecord class class CommitRecord L840–1019
+ from_dict method method from_dict L975–1019
+ from_msgpack method method from_msgpack L906–972
+ to_dict method method to_dict L878–903
+ DetachedHead class class DetachedHead L632–636
+ HeadState variable variable HeadState L639–639
+ MAX_MSGPACK_BYTES variable variable MAX_MSGPACK_BYTES L115–115
+ MAX_PACK_MSGPACK_BYTES variable variable MAX_PACK_MSGPACK_BYTES L120–120
+ ReleaseDict class class ReleaseDict L583–600
+ ReleaseRecord class class ReleaseRecord L1167–1275
+ from_dict method method from_dict L1252–1275
+ from_msgpack method method from_msgpack L1224–1249
+ to_dict method method to_dict L1203–1221
+ SnapshotDict class class SnapshotDict L809–816
+ SnapshotReadCorrupt class class SnapshotReadCorrupt L1999–2002
+ SnapshotReadNotFound class class SnapshotReadNotFound L1995–1996
+ SnapshotReadOk class class SnapshotReadOk L1990–1992
+ SnapshotRecord class class SnapshotRecord L1023–1093
+ from_dict method method from_dict L1077–1093
+ from_msgpack method method from_msgpack L1052–1074
+ to_dict method method to_dict L1042–1049
+ SymbolicHead class class SymbolicHead L625–629
+ TagDict class class TagDict L819–830
+ TagRecord class class TagRecord L1097–1163
+ from_dict method method from_dict L1146–1163
+ from_msgpack method method from_msgpack L1126–1143
+ to_dict method method to_dict L1112–1123
+ WalkResult class class WalkResult L1839–1849
+ _COMMITS_DIR variable variable _COMMITS_DIR L578–578
+ _MSGPACK_MAX_ARRAY_LEN variable variable _MSGPACK_MAX_ARRAY_LEN L130–130
+ _MSGPACK_MAX_BIN_LEN variable variable _MSGPACK_MAX_BIN_LEN L128–128
+ _MSGPACK_MAX_BIN_LEN_PACK variable variable _MSGPACK_MAX_BIN_LEN_PACK L129–129
+ _MSGPACK_MAX_MAP_LEN variable variable _MSGPACK_MAX_MAP_LEN L131–131
+ _MSGPACK_MAX_STR_LEN variable variable _MSGPACK_MAX_STR_LEN L127–127
+ _RELEASES_DIR variable variable _RELEASES_DIR L581–581
+ _SNAPSHOTS_DIR variable variable _SNAPSHOTS_DIR L579–579
+ _TAGS_DIR variable variable _TAGS_DIR L580–580
+ _as_structured_delta function function _as_structured_delta L219–228
+ _commit_path function function _commit_path L1305–1306
+ _commits_dir function function _commits_dir L1283–1284
+ _find_commit_by_prefix function function _find_commit_by_prefix L1722–1739
+ _int_val function function _int_val L176–185
+ _known_commits_dirs variable variable _known_commits_dirs L1331–1331
+ _parse_changelog_entries function function _parse_changelog_entries L267–294
+ _parse_semver_tag function function _parse_semver_tag L247–264
+ _read_msgpack function function _read_msgpack L539–560
+ _read_msgpack_dict function function _read_msgpack_dict L563–575
+ _releases_dir function function _releases_dir L1299–1302
+ _resolve_branch_commit_id function function _resolve_branch_commit_id L1759–1781
+ _sem_ver_bump_val function function _sem_ver_bump_val L231–244
+ _snapshot_path function function _snapshot_path L1309–1310
+ _snapshots_dir function function _snapshots_dir L1287–1288
+ _str_dict function function _str_dict L209–216
+ _str_list function function _str_list L199–206
+ _str_or_none function function _str_or_none L188–196
+ _str_val function function _str_val L164–173
+ _tags_dir function function _tags_dir L1291–1296
+ _validated_store_parents variable variable _validated_store_parents L386–386
+ _verify_commit_id function function _verify_commit_id L1402–1448
+ _verify_snapshot_id function function _verify_snapshot_id L1451–1480
+ _write_msgpack_atomic function function _write_msgpack_atomic L389–439
+ build_changelog function function build_changelog L2236–2268
+ commit_exists function function commit_exists L1318–1326
+ commit_read_is_corrupt function function commit_read_is_corrupt L1540–1544
+ commit_read_is_not_found function function commit_read_is_not_found L1533–1537
+ commit_read_is_ok function function commit_read_is_ok L1526–1530
+ delete_release function function delete_release L2221–2233
+ delete_tag function function delete_tag L2107–2115
+ find_commits_by_prefix function function find_commits_by_prefix L1742–1756
+ get_all_branch_heads function function get_all_branch_heads L1623–1645
+ get_all_commits function function get_all_commits L1820–1836
+ get_all_tags function function get_all_tags L2118–2133
+ get_commit_snapshot_manifest function function get_commit_snapshot_manifest L2042–2058
+ get_commits_for_branch function function get_commits_for_branch L1784–1817
+ get_head_commit_id function function get_head_commit_id L1613–1620
+ get_head_snapshot_id function function get_head_snapshot_id L1648–1660
+ get_head_snapshot_manifest function function get_head_snapshot_manifest L2061–2071
+ get_release_for_tag function function get_release_for_tag L2174–2185
+ get_tag_by_name function function get_tag_by_name L2136–2143
+ get_tags_for_commit function function get_tags_for_commit L2089–2104
+ ApiChangeSummary import import ApiChangeSummary L85–85
+ BranchHeads import import BranchHeads L149–149
+ ChangelogEntry import import ChangelogEntry L85–85
+ FileHotspot import import FileHotspot L85–85
+ JsonValue import import JsonValue L149–149
+ LanguageStat import import LanguageStat L85–85
+ Literal import import Literal L75–75
+ Manifest import import Manifest L149–149
+ Metadata import import Metadata L149–149
+ MsgpackDict import import MsgpackDict L149–149
+ MsgpackValue import import MsgpackValue L149–149
+ RefactorEventSummary import import RefactorEventSummary L85–85
+ ReleaseChannel import import ReleaseChannel L85–85
+ SemVerBump import import SemVerBump L101–101
+ SemVerTag import import SemVerTag L85–85
+ SemanticReleaseReport import import SemanticReleaseReport L85–85
+ StructuredDelta import import StructuredDelta L101–101
+ SymbolKindCount import import SymbolKindCount L85–85
+ TypeGuard import import TypeGuard L75–75
+ TypedDict import import TypedDict L75–75
+ _CHANNEL_MAP import import _CHANNEL_MAP L85–85
+ _ChannelMap import import _ChannelMap L85–85
+ annotations import import annotations L59–59
+ assert_not_symlink import import assert_not_symlink L78–78
+ compute_commit_id import import compute_commit_id L77–77
+ compute_snapshot_id import import compute_snapshot_id L77–77
+ dataclass class import dataclass L73–73
+ datetime import import datetime L61–61
+ errno import import errno L62–62
+ fcntl import import fcntl L63–63
+ field import import field L73–73
+ logging import import logging L64–64
+ msgpack import import msgpack L72–72
+ os import import os L65–65
+ parse_semver import import parse_semver L85–85
+ pathlib import import pathlib L66–66
+ re import import re L67–67
+ sanitize_glob_prefix import import sanitize_glob_prefix L78–78
+ semver_channel import import semver_channel L85–85
+ semver_to_str import import semver_to_str L85–85
+ sys import import sys L68–68
+ tempfile import import tempfile L69–69
+ uuid import import uuid L70–70
+ validate_branch_name import import validate_branch_name L78–78
+ validate_ref_id import import validate_ref_id L78–78
+ validate_repo_id import import validate_repo_id L78–78
+ list_releases function function list_releases L2188–2218
+ logger variable variable logger L103–103
+ overwrite_commit function function overwrite_commit L1574–1589
+ read_commit function function read_commit L1483–1508
+ read_commit_result function function read_commit_result L1547–1571
+ read_current_branch function function read_current_branch L673–686
+ read_head function function read_head L642–670
+ read_msgpack_file function function read_msgpack_file L499–536
+ read_release function function read_release L2160–2171
+ read_snapshot function function read_snapshot L1963–1987
+ read_snapshot_result function function read_snapshot_result L2019–2039
+ resolve_commit_ref function function resolve_commit_ref L1663–1719
+ safe_unpackb function function safe_unpackb L442–496
+ snapshot_read_is_corrupt function function snapshot_read_is_corrupt L2012–2016
+ snapshot_read_is_ok function function snapshot_read_is_ok L2005–2009
+ update_commit_metadata function function update_commit_metadata L1592–1610
+ walk_commits_between function function walk_commits_between L1852–1879
+ walk_commits_between_result function function walk_commits_between_result L1882–1920
+ write_branch_ref function function write_branch_ref L349–380
+ write_commit function function write_commit L1334–1399
+ write_head_branch function function write_head_branch L689–699
+ write_head_commit function function write_head_commit L702–714
+ write_release function function write_release L2151–2157
+ write_snapshot function function write_snapshot L1928–1960
+ write_tag function function write_tag L2080–2086
+ write_text_atomic function function write_text_atomic L302–346
~ muse/core/transport.py .py 152 symbols added
+ CHUNK_COMMITS variable variable CHUNK_COMMITS L209–209
+ CHUNK_OBJECTS variable variable CHUNK_OBJECTS L197–197
+ ConfirmObjectsResponse class class ConfirmObjectsResponse L235–239
+ FilterObjectsResult class class FilterObjectsResult L177–187
+ HttpTransport class class HttpTransport L822–1358
+ _build_request method method _build_request L829–891
+ _decode method method _decode L894–910
+ _execute method method _execute L912–950
+ _execute_fetch method method _execute_fetch L952–1001
+ _iter_object_stream method method _iter_object_stream L1029–1074
+ confirm_objects method method confirm_objects L1233–1252
+ create_release method method create_release L1297–1312
+ delete_branch_remote method method delete_branch_remote L1348–1358
+ delete_release_remote method method delete_release_remote L1336–1346
+ fetch_objects method method fetch_objects L1076–1101
+ fetch_pack method method fetch_pack L1011–1027
+ fetch_remote_info method method fetch_remote_info L1003–1009
+ filter_objects method method filter_objects L1167–1201
+ list_releases_remote method method list_releases_remote L1314–1334
+ negotiate method method negotiate L1254–1279
+ presign_objects method method presign_objects L1203–1231
+ push_object_pack method method push_object_pack L1149–1165
+ push_objects method method push_objects L1135–1147
+ push_pack method method push_pack L1103–1133
+ push_tags method method push_tags L1281–1295
+ LARGE_OBJECT_THRESHOLD variable variable LARGE_OBJECT_THRESHOLD L214–214
+ LocalFileTransport class class LocalFileTransport L1745–2230
+ _repo_root method method _repo_root L1761–1792
+ confirm_objects method method confirm_objects L2076–2084
+ create_release method method create_release L2145–2160
+ delete_branch_remote method method delete_branch_remote L2210–2230
+ delete_release_remote method method delete_release_remote L2188–2208
+ fetch_objects method method fetch_objects L1840–1853
+ fetch_pack method method fetch_pack L1818–1838
+ fetch_remote_info method method fetch_remote_info L1794–1816
+ filter_objects method method filter_objects L2045–2064
+ list_releases_remote method method list_releases_remote L2162–2186
+ negotiate method method negotiate L2086–2117
+ presign_objects method method presign_objects L2066–2074
+ push_object_pack method method push_object_pack L2005–2043
+ push_objects method method push_objects L1977–2003
+ push_pack method method push_pack L1855–1975
+ push_tags method method push_tags L2119–2143
+ MuseTransport class class MuseTransport L438–814
+ confirm_objects method method confirm_objects L654–681
+ create_release method method create_release L732–750
+ delete_branch_remote method method delete_branch_remote L794–814
+ delete_release_remote method method delete_release_remote L772–792
+ fetch_objects method method fetch_objects L476–501
+ fetch_pack method method fetch_pack L456–474
+ fetch_remote_info method method fetch_remote_info L444–454
+ filter_objects method method filter_objects L595–621
+ list_releases_remote method method list_releases_remote L752–770
+ negotiate method method negotiate L683–709
+ presign_objects method method presign_objects L623–652
+ push_object_pack method method push_object_pack L558–593
+ push_objects method method push_objects L526–556
+ push_pack method method push_pack L503–524
+ push_tags method method push_tags L711–730
+ NEGOTIATE_DEPTH variable variable NEGOTIATE_DEPTH L219–219
+ NegotiateResponse class class NegotiateResponse L242–247
+ PresignResponse class class PresignResponse L228–232
+ SigningIdentity class class SigningIdentity L119–123
+ TransportError class class TransportError L420–430
+ __init__ method method __init__ L428–430
+ _CommitBundle variable variable _CommitBundle L175–175
+ _HeadersDict variable variable _HeadersDict L174–174
+ _HttpHeaders class class _HttpHeaders L264–267
+ get method method get L267–267
+ _HttpResponse class class _HttpResponse L271–289
+ __enter__ method method __enter__ L282–282
+ __exit__ method method __exit__ L284–289
+ read method method read L280–280
+ _MsgDict variable variable _MsgDict L171–171
+ _MsgVal variable variable _MsgVal L166–170
+ _NoRedirectHandler class class _NoRedirectHandler L325–358
+ redirect_request method method redirect_request L340–358
+ _PushPayload class class _PushPayload L250–256
+ _STRICT_OPENER variable variable _STRICT_OPENER L363–363
+ _TIMEOUT_SECONDS variable variable _TIMEOUT_SECONDS L160–160
+ _WireDict variable variable _WireDict L173–173
+ _WireVal variable variable _WireVal L1563–1563
+ _coerce_commit_dict function function _coerce_commit_dict L1581–1643
+ _coerce_sem_ver_bump function function _coerce_sem_ver_bump L1475–1483
+ _coerce_snapshot_dict function function _coerce_snapshot_dict L1646–1669
+ _http_error_message function function _http_error_message L297–317
+ _ignore_sigpipe function function _ignore_sigpipe L367–396
+ _int_or function function _int_or L1576–1578
+ _is_ancestor function function _is_ancestor L1677–1737
+ _open_url function function _open_url L399–412
+ _parse_bundle function function _parse_bundle L1396–1443
+ _parse_objects_response function function _parse_objects_response L1464–1472
+ _parse_push_result function function _parse_push_result L1446–1461
+ _parse_releases_list function function _parse_releases_list L1486–1549
+ _parse_remote_info function function _parse_remote_info L1370–1393
+ _str function function _str L1566–1568
+ _str_or_none function function _str_or_none L1571–1573
+ BranchHeads import import BranchHeads L139–139
+ ChangelogEntry import import ChangelogEntry L138–138
+ CommitDict import import CommitDict L139–139
+ FetchRequest import import FetchRequest L129–129
+ IO import import IO L113–113
+ Iterator import import Iterator L113–113
+ MAX_FETCH_BYTES import import MAX_FETCH_BYTES L149–149
+ MAX_RESPONSE_BYTES import import MAX_RESPONSE_BYTES L149–149
+ Manifest import import Manifest L139–139
+ Metadata import import Metadata L139–139
+ MsgpackDict import import MsgpackDict L139–139
+ NamedTuple import import NamedTuple L113–113
+ ObjectPayload import import ObjectPayload L129–129
+ ObjectsChunkResponse import import ObjectsChunkResponse L129–129
+ PackBundle import import PackBundle L129–129
+ Protocol import import Protocol L113–113
+ PushResult import import PushResult L129–129
+ ReleaseDict import import ReleaseDict L139–139
+ RemoteInfo import import RemoteInfo L129–129
+ SemVerBump import import SemVerBump L156–156
+ SemVerTag import import SemVerTag L138–138
+ SnapshotDict import import SnapshotDict L139–139
+ TYPE_CHECKING import import TYPE_CHECKING L113–113
+ TypedDict import import TypedDict L113–113
+ WireTag import import WireTag L129–129
+ annotations import import annotations L95–95
+ apply_delta import import apply_delta L128–128
+ base64 import import base64 L97–97
+ abc import import collections.abc L98–98
+ compress_zlib import import compress_zlib L128–128
+ compute_delta import import compute_delta L128–128
+ contain_path import import contain_path L149–149
+ contextlib import import contextlib L99–99
+ decompress_zlib import import decompress_zlib L128–128
+ hashlib import import hashlib L100–100
+ client import import http.client L101–101
+ json import import json L102–102
+ logging import import logging L103–103
+ msgpack import import msgpack L126–126
+ pathlib import import pathlib L104–104
+ runtime_checkable import import runtime_checkable L113–113
+ safe_unpackb import import safe_unpackb L139–139
+ sanitize_display import import sanitize_display L149–149
+ signal import import signal L105–105
+ threading import import threading L106–106
+ time import import time L107–107
+ types import import types L108–108
+ error import import urllib.error L109–109
+ parse import import urllib.parse L110–110
+ request import import urllib.request L111–111
+ response import import urllib.response L112–112
+ validate_branch_name import import validate_branch_name L149–149
+ logger variable variable logger L158–158
+ make_transport function function make_transport L2238–2252
+ negotiate_have function function negotiate_have L2255–2297
~ muse/core/validation.py .py 40 symbols added
+ MAX_AST_BYTES variable variable MAX_AST_BYTES L23–23
+ MAX_FETCH_BYTES variable variable MAX_FETCH_BYTES L21–21
+ MAX_FILE_BYTES variable variable MAX_FILE_BYTES L19–19
+ MAX_OBJECT_WRITE_BYTES variable variable MAX_OBJECT_WRITE_BYTES L34–34
+ MAX_PACK_OBJECTS variable variable MAX_PACK_OBJECTS L35–35
+ MAX_RESPONSE_BYTES variable variable MAX_RESPONSE_BYTES L20–20
+ MAX_SYSEX_BYTES variable variable MAX_SYSEX_BYTES L22–22
+ _BRANCH_FORBIDDEN_RE variable variable _BRANCH_FORBIDDEN_RE L63–75
+ _CONTROL_CHARS_RE variable variable _CONTROL_CHARS_RE L84–84
+ _DOMAIN_RE variable variable _DOMAIN_RE L79–79
+ _DOTDOT_RE variable variable _DOTDOT_RE L219–219
+ _GLOB_META_RE variable variable _GLOB_META_RE L87–87
+ _HEX64_RE variable variable _HEX64_RE L41–41
+ _MAX_TOKEN_LEN variable variable _MAX_TOKEN_LEN L454–454
+ _MAX_WORKSPACE_PATH_LEN variable variable _MAX_WORKSPACE_PATH_LEN L215–215
+ _PROVENANCE_STRIP_RE variable variable _PROVENANCE_STRIP_RE L418–418
+ _SHA256_PREFIXED_RE variable variable _SHA256_PREFIXED_RE L42–42
+ _TOKEN_CTRL_RE variable variable _TOKEN_CTRL_RE L450–450
+ assert_not_symlink function function assert_not_symlink L306–329
+ assert_write_inside_repo function function assert_write_inside_repo L332–355
+ clamp_int function function clamp_int L489–495
+ clamp_natural function function clamp_natural L498–503
+ contain_path function function contain_path L358–380
+ finite_float function function finite_float L506–510
+ annotations import import annotations L9–9
+ math import import math L11–11
+ pathlib import import pathlib L12–12
+ re import import re L13–13
+ sanitize_display function function sanitize_display L402–412
+ sanitize_glob_prefix function function sanitize_glob_prefix L388–394
+ sanitize_provenance function function sanitize_provenance L421–447
+ sanitize_token function function sanitize_token L457–481
+ validate_branch_name function function validate_branch_name L130–175
+ validate_domain_name function function validate_domain_name L198–206
+ validate_object_id function function validate_object_id L94–107
+ validate_output_path function function validate_output_path L513–520
+ validate_path_prefix function function validate_path_prefix L276–303
+ validate_ref_id function function validate_ref_id L110–122
+ validate_repo_id function function validate_repo_id L178–195
+ validate_workspace_path function function validate_workspace_path L222–273
~ muse/core/workdir.py .py 13 symbols added
+ apply_manifest function function apply_manifest L24–104
+ Manifest import import Manifest L19–19
+ annotations import import annotations L9–9
+ contain_path import import contain_path L18–18
+ filter_manifest_sparse import import filter_manifest_sparse L17–17
+ hashlib import import hashlib L11–11
+ logging import import logging L12–12
+ pathlib import import pathlib L13–13
+ read_sparse_config import import read_sparse_config L17–17
+ restore_object import import restore_object L15–15
+ walk_workdir import import walk_workdir L16–16
+ logger variable variable logger L21–21
+ verify_workdir_integrity function function verify_workdir_integrity L107–156
~ tests/test_cmd_sign.py .py 54 symbols added
+ TestLoadSigning class class TestLoadSigning L500–537
+ test_exits_1_when_no_identity method method test_exits_1_when_no_identity L501–510
+ test_key_path_override_loads_from_file method method test_key_path_override_loads_from_file L512–537
+ TestRunCurl class class TestRunCurl L275–361
+ _args method method _args L276–291
+ test_authorization_header_embedded method method test_authorization_header_embedded L304–314
+ test_body_file_uses_data_binary method method test_body_file_uses_data_binary L327–338
+ test_curl_starts_with_curl method method test_curl_starts_with_curl L293–302
+ test_get_method method method test_get_method L353–361
+ test_inline_body_uses_data_flag method method test_inline_body_uses_data_flag L340–351
+ test_url_appears_in_output method method test_url_appears_in_output L316–325
+ TestRunHeader class class TestRunHeader L61–151
+ _args method method _args L65–80
+ setUp method method setUp L62–63
+ test_empty_body_uses_empty_sha256 method method test_empty_body_uses_empty_sha256 L127–138
+ test_inline_body_reflected_in_sha256 method method test_inline_body_reflected_in_sha256 L140–151
+ test_json_output_fields method method test_json_output_fields L94–109
+ test_path_plus_hub_constructs_url method method test_path_plus_hub_constructs_url L111–125
+ test_text_output_is_msign_header method method test_text_output_is_msign_header L82–92
+ TestRunPayment class class TestRunPayment L368–493
+ _args method method _args L371–387
+ test_canonical_message_has_mpay_prefix method method test_canonical_message_has_mpay_prefix L408–418
+ test_deterministic_at_fixed_timestamp method method test_deterministic_at_fixed_timestamp L461–478
+ test_domain_separation_from_http_msign method method test_domain_separation_from_http_msign L439–459
+ test_json_output_has_all_fields method method test_json_output_has_all_fields L389–406
+ test_signature_is_verifiable method method test_signature_is_verifiable L420–437
+ test_text_output_prints_signature_to_stdout method method test_text_output_prints_signature_to_stdout L480–493
+ TestRunVerify class class TestRunVerify L158–268
+ _args method method _args L166–179
+ setUp method method setUp L159–164
+ test_body_mismatch_exits_1 method method test_body_mismatch_exits_1 L251–258
+ test_custom_max_age_accepted method method test_custom_max_age_accepted L260–268
+ test_expired_timestamp_exits_1 method method test_expired_timestamp_exits_1 L221–229
+ test_malformed_header_exits_1 method method test_malformed_header_exits_1 L231–240
+ test_method_mismatch_exits_1 method method test_method_mismatch_exits_1 L242–249
+ test_valid_header_exits_0 method method test_valid_header_exits_0 L181–186
+ test_valid_header_json_output method method test_valid_header_json_output L188–196
+ test_wrong_public_key_exits_1 method method test_wrong_public_key_exits_1 L198–206
+ test_wrong_public_key_json_valid_false method method test_wrong_public_key_json_valid_false L208–219
+ _make_header function function _make_header L43–47
+ _make_signing function function _make_signing L29–34
+ _public_key_b64 function function _public_key_b64 L37–40
+ _run_cmd function function _run_cmd L50–54
+ MagicMock import import MagicMock L22–22
+ annotations import import annotations L12–12
+ argparse import import argparse L14–14
+ base64 import import base64 L15–15
+ io import import io L16–16
+ json import import json L17–17
+ patch import import patch L22–22
+ sys import import sys L18–18
+ time import import time L19–19
+ unittest import import unittest L20–20
+ mock import import unittest.mock L21–21
~ tests/test_core_msign.py .py 69 symbols added
+ TestBuildMsignHeader class class TestBuildMsignHeader L156–229
+ test_contains_all_components method method test_contains_all_components L165–172
+ test_different_hosts_produce_different_sigs method method test_different_hosts_produce_different_sigs L224–229
+ test_format method method test_format L157–163
+ test_none_body_treated_as_empty method method test_none_body_treated_as_empty L186–191
+ test_nonstandard_port_kept method method test_nonstandard_port_kept L216–222
+ test_sig_is_base64url_no_padding method method test_sig_is_base64url_no_padding L174–184
+ test_standard_http_port_stripped method method test_standard_http_port_stripped L209–214
+ test_standard_https_port_stripped method method test_standard_https_port_stripped L200–207
+ test_url_query_string_included_in_signing method method test_url_query_string_included_in_signing L193–198
+ TestBuildPaymentClaim class class TestBuildPaymentClaim L527–604
+ test_canonical_message_format method method test_canonical_message_format L551–566
+ test_chain_linkage method method test_chain_linkage L593–604
+ test_deterministic method method test_deterministic L583–591
+ test_domain_separation_from_http_signing method method test_domain_separation_from_http_signing L568–581
+ test_structure method method test_structure L528–549
+ TestCanonicalMessage class class TestCanonicalMessage L80–149
+ test_algorithm_is_first_field method method test_algorithm_is_first_field L130–133
+ test_body_hash_covers_raw_bytes_not_repr method method test_body_hash_covers_raw_bytes_not_repr L110–116
+ test_custom_algorithm_field method method test_custom_algorithm_field L146–149
+ test_different_hosts_different_output method method test_different_hosts_different_output L140–144
+ test_empty_body_uses_empty_sha256 method method test_empty_body_uses_empty_sha256 L91–95
+ test_format method method test_format L81–89
+ test_host_in_canonical method method test_host_in_canonical L135–138
+ test_method_uppercase method method test_method_uppercase L104–108
+ test_query_string_included method method test_query_string_included L97–102
+ test_six_newline_separated_fields method method test_six_newline_separated_fields L118–128
+ TestDeterminism class class TestDeterminism L236–278
+ test_different_body_different_signature method method test_different_body_different_signature L255–260
+ test_different_ts_different_signature method method test_different_ts_different_signature L248–253
+ test_known_vector method method test_known_vector L262–278
+ test_same_inputs_same_signature method method test_same_inputs_same_signature L237–246
+ TestParseMsignHeader class class TestParseMsignHeader L285–339
+ test_alg_field_present method method test_alg_field_present L323–327
+ test_empty_raises_value_error method method test_empty_raises_value_error L313–316
+ test_full_authorization_prefix method method test_full_authorization_prefix L295–300
+ test_invalid_raises_value_error method method test_invalid_raises_value_error L302–305
+ test_old_four_field_format_raises method method test_old_four_field_format_raises L307–311
+ test_roundtrip_with_build method method test_roundtrip_with_build L329–339
+ test_ts_is_int method method test_ts_is_int L318–321
+ test_valid_header method method test_valid_header L286–293
+ TestPerformance class class TestPerformance L611–624
+ test_10000_sequential_header_calls_under_2s method method test_10000_sequential_header_calls_under_2s L612–624
+ TestVerifyMsignHeader class class TestVerifyMsignHeader L346–520
+ _sign_and_header method method _sign_and_header L347–356
+ test_bad_public_key_rejected method method test_bad_public_key_rejected L437–448
+ test_different_host_rejected method method test_different_host_rejected L495–507
+ test_different_method_rejected method method test_different_method_rejected L472–482
+ test_different_url_rejected method method test_different_url_rejected L484–493
+ test_expired_timestamp_rejected method method test_expired_timestamp_rejected L385–396
+ test_future_timestamp_rejected method method test_future_timestamp_rejected L398–409
+ test_garbage_header_rejected method method test_garbage_header_rejected L450–458
+ test_localhost_nonstandard_port_in_canonical method method test_localhost_nonstandard_port_in_canonical L509–520
+ test_none_body_same_as_empty method method test_none_body_same_as_empty L460–470
+ test_tampered_body_rejected method method test_tampered_body_rejected L372–383
+ test_timestamp_at_edge_of_window_accepted method method test_timestamp_at_edge_of_window_accepted L411–421
+ test_valid_round_trip method method test_valid_round_trip L358–370
+ test_wrong_key_rejected method method test_wrong_key_rejected L423–435
+ _Identity class class _Identity L52–55
+ _KNOWN_SEED variable variable _KNOWN_SEED L66–66
+ _known_identity function function _known_identity L69–73
+ _make_identity function function _make_identity L58–62
+ Ed25519PrivateKey import import Ed25519PrivateKey L45–45
+ NamedTuple import import NamedTuple L42–42
+ annotations import import annotations L37–37
+ base64 import import base64 L39–39
+ hashlib import import hashlib L40–40
+ pytest import import pytest L44–44
+ time import import time L41–41
~ tests/test_core_transport.py .py 98 symbols added
+ TestBuildMsignHeader class class TestBuildMsignHeader L172–312
+ _make_signing method method _make_signing L173–176
+ test_different_bodies_produce_different_sigs method method test_different_bodies_produce_different_sigs L289–302
+ test_different_methods_produce_different_headers method method test_different_methods_produce_different_headers L274–287
+ test_handle_embedded_in_header method method test_handle_embedded_in_header L304–312
+ test_header_format method method test_header_format L178–182
+ test_none_body_treated_as_empty_bytes method method test_none_body_treated_as_empty_bytes L248–272
+ test_query_string_included_in_canonical method method test_query_string_included_in_canonical L223–246
+ test_signature_is_verifiable method method test_signature_is_verifiable L194–221
+ test_timestamp_is_recent method method test_timestamp_is_recent L184–192
+ TestBuildRequest class class TestBuildRequest L577–659
+ _build method method _build L580–585
+ test_127_0_0_1_http_with_token_allowed method method test_127_0_0_1_http_with_token_allowed L593–595
+ test_accept_header_always_set method method test_accept_header_always_set L643–645
+ test_arbitrary_hostname_http_token_raises method method test_arbitrary_hostname_http_token_raises L621–623
+ test_body_sets_content_type method method test_body_sets_content_type L651–655
+ test_host_docker_internal_http_with_token_allowed method method test_host_docker_internal_http_with_token_allowed L601–609
+ test_host_docker_internal_lookalike_http_token_raises method method test_host_docker_internal_lookalike_http_token_raises L630–633
+ test_https_any_host_with_token_allowed method method test_https_any_host_with_token_allowed L611–613
+ test_ipv6_loopback_http_with_token_allowed method method test_ipv6_loopback_http_with_token_allowed L597–599
+ test_localhost_http_with_token_allowed method method test_localhost_http_with_token_allowed L589–591
+ test_localhost_lookalike_http_token_raises method method test_localhost_lookalike_http_token_raises L625–628
+ test_method_preserved method method test_method_preserved L647–649
+ test_no_body_omits_content_type method method test_no_body_omits_content_type L657–659
+ test_non_loopback_http_token_raises_transport_error method method test_non_loopback_http_token_raises_transport_error L617–619
+ test_non_loopback_http_without_token_allowed method method test_non_loopback_http_without_token_allowed L637–639
+ TestHttpTransportFetchPack class class TestHttpTransportFetchPack L498–532
+ test_http_409_raises_transport_error method method test_http_409_raises_transport_error L526–532
+ test_posts_to_fetch_endpoint method method test_posts_to_fetch_endpoint L499–524
+ TestHttpTransportFetchRemoteInfo class class TestHttpTransportFetchRemoteInfo L415–495
+ test_calls_correct_endpoint method method test_calls_correct_endpoint L416–431
+ test_http_401_raises_transport_error method method test_http_401_raises_transport_error L454–460
+ test_http_404_raises_transport_error method method test_http_404_raises_transport_error L462–468
+ test_http_500_raises_transport_error method method test_http_500_raises_transport_error L470–476
+ test_msign_header_sent method method test_msign_header_sent L433–442
+ test_no_token_no_auth_header method method test_no_token_no_auth_header L444–452
+ test_trailing_slash_stripped_from_url method method test_trailing_slash_stripped_from_url L487–495
+ test_url_error_raises_transport_error_with_code_0 method method test_url_error_raises_transport_error_with_code_0 L478–485
+ TestHttpTransportPushPack class class TestHttpTransportPushPack L535–569
+ test_force_flag_sent method method test_force_flag_sent L551–559
+ test_posts_to_push_endpoint method method test_posts_to_push_endpoint L536–549
+ test_push_rejected_raises_transport_error method method test_push_rejected_raises_transport_error L561–569
+ TestParseBundle class class TestParseBundle L320–378
+ test_branch_heads_extracted method method test_branch_heads_extracted L375–378
+ test_commits_extracted method method test_commits_extracted L329–351
+ test_empty_msgpack_object_returns_empty_bundle method method test_empty_msgpack_object_returns_empty_bundle L321–323
+ test_non_dict_returns_empty_bundle method method test_non_dict_returns_empty_bundle L325–327
+ test_object_missing_content_excluded method method test_object_missing_content_excluded L370–373
+ test_objects_extracted method method test_objects_extracted L353–368
+ TestParsePushResult class class TestParsePushResult L386–407
+ test_failure_response method method test_failure_response L394–398
+ test_missing_ok_defaults_false method method test_missing_ok_defaults_false L404–407
+ test_non_msgpack_raises_transport_error method method test_non_msgpack_raises_transport_error L400–402
+ test_success_response method method test_success_response L387–392
+ TestParseRemoteInfo class class TestParseRemoteInfo L86–164
+ test_invalid_msgpack_raises_transport_error method method test_invalid_msgpack_raises_transport_error L102–104
+ test_missing_fields_get_defaults method method test_missing_fields_get_defaults L112–118
+ test_non_dict_response_returns_defaults method method test_non_dict_response_returns_defaults L106–110
+ test_non_string_branch_heads_excluded method method test_non_string_branch_heads_excluded L120–124
+ test_pack_origin_absent_when_not_in_response method method test_pack_origin_absent_when_not_in_response L139–142
+ test_pack_origin_empty_string_not_set method method test_pack_origin_empty_string_not_set L156–159
+ test_pack_origin_none_value_not_set method method test_pack_origin_none_value_not_set L151–154
+ test_pack_origin_populated_when_present method method test_pack_origin_populated_when_present L126–137
+ test_pack_origin_whitespace_only_not_set method method test_pack_origin_whitespace_only_not_set L161–164
+ test_pack_origin_whitespace_stripped method method test_pack_origin_whitespace_stripped L144–149
+ test_valid_response method method test_valid_response L87–100
+ TestSigpipeRegression class class TestSigpipeRegression L710–764
+ _run_early_close_scenario method method _run_early_close_scenario L719–752
+ test_sigpipe_not_fatal_401_large_body method method test_sigpipe_not_fatal_401_large_body L758–760
+ test_sigpipe_not_fatal_409_large_body method method test_sigpipe_not_fatal_409_large_body L754–756
+ test_sigpipe_not_fatal_500_large_body method method test_sigpipe_not_fatal_500_large_body L762–764
+ _early_close_server function function _early_close_server L667–707
+ _http_error function function _http_error L71–78
+ _make_signing function function _make_signing L36–40
+ _mock_response function function _mock_response L43–63
+ _mp function function _mp L66–68
+ BytesIO import import BytesIO L13–13
+ HttpTransport import import HttpTransport L21–21
+ MsgpackDict import import MsgpackDict L18–18
+ PackBundle import import PackBundle L19–19
+ RemoteInfo import import RemoteInfo L19–19
+ SigningIdentity import import SigningIdentity L21–21
+ TransportError import import TransportError L21–21
+ _parse_bundle import import _parse_bundle L21–21
+ _parse_push_result import import _parse_push_result L21–21
+ _parse_remote_info import import _parse_remote_info L21–21
+ annotations import import annotations L3–3
+ build_msign_header import import build_msign_header L20–20
+ json import import json L5–5
+ msgpack import import msgpack L15–15
+ pytest import import pytest L16–16
+ signal import import signal L6–6
+ socket import import socket L7–7
+ threading import import threading L8–8
+ time import import time L9–9
+ mock import import unittest.mock L10–10
+ error import import urllib.error L11–11
+ request import import urllib.request L12–12

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