gabriel / muse public
feat BREAKING verify-pack dev
AI Agent gabriel · 159 days ago · Apr 18, 2026 · Diff

feat(verify-pack): Phase 2 — required bundle meta field (mode + base_commits + created_at)

- MPackBundle now requires a 'meta' field: mode ('full'|'incremental'), base_commits (list), created_at (ISO 8601). Missing or invalid meta exits USER_ERROR — no fallbacks, no backward compat. - build_mpack and build_mpack_from_walk always write meta; mode is 'incremental' when have-list is non-empty, 'full' otherwise. - verify-pack reads meta and reflects bundle_mode, base_commits, base_objects in JSON output. - Incremental bundles with --no-local get leniency: unresolved snapshot refs are counted as base_objects, not failures (--strict overrides). - _VerifyPackResult extended: promised_objects, base_objects, bundle_mode, base_commits. TestJsonOutputContract._REQUIRED updated accordingly. - 122 tests passing (107 verify-pack + 15 TestBundleMeta).

sha256:e29c5e490d5e0f26b81add6d351b030d2165663cbbbe88bc64e19911389c2a2a sha
+36 ~48 symbols
sha256:54ab24b5e321c46e10759237d48b6fa2a3686c066aa32f97a6849f763192fe4e snapshot
+36
symbols added
~48
symbols modified
0
dead code introduced
Semantic Changes 84 symbols
~ muse/core/pack.py .py 2 symbols added, 3 symbols modified
+ BundleMeta class class BundleMeta L109–127
+ datetime import import datetime L35–35
~ tests/test_cmd_verify_pack.py .py 18 symbols added, 43 symbols modified
+ TestBundleMetaInVerifyPack class class TestBundleMetaInVerifyPack L1269–1403
+ test_all_phase2_keys_in_envelope method method test_all_phase2_keys_in_envelope L1397–1403
+ test_base_commits_empty_for_full_bundle method method test_base_commits_empty_for_full_bundle L1315–1318
+ test_base_commits_key_present method method test_base_commits_key_present L1307–1313
+ test_base_commits_populated_for_incremental method method test_base_commits_populated_for_incremental L1320–1327
+ test_base_objects_key_present method method test_base_objects_key_present L1333–1337
+ test_base_objects_zero_for_self_contained_bundle method method test_base_objects_zero_for_self_contained_bundle L1339–1342
+ test_bundle_mode_default_is_full method method test_bundle_mode_default_is_full L1284–1288
+ test_bundle_mode_full_reflected_from_meta method method test_bundle_mode_full_reflected_from_meta L1290–1293
+ test_bundle_mode_incremental_reflected method method test_bundle_mode_incremental_reflected L1295–1301
+ test_bundle_mode_key_present_no_meta method method test_bundle_mode_key_present_no_meta L1276–1282
+ test_no_local_full_bundle_fails_on_missing_refs method method test_no_local_full_bundle_fails_on_missing_refs L1355–1370
+ test_no_local_incremental_treats_refs_as_base_objects method method test_no_local_incremental_treats_refs_as_base_objects L1344–1353
+ test_stat_mode_works_with_meta method method test_stat_mode_works_with_meta L1386–1391
+ test_strict_incremental_treats_base_objects_as_failures method method test_strict_incremental_treats_base_objects_as_failures L1372–1380
+ _FULL_META variable variable _FULL_META L58–58
+ _full_meta_bundle function function _full_meta_bundle L1226–1248
+ _incremental_meta_bundle function function _incremental_meta_bundle L1251–1266
~ tests/test_mpack_bundle.py .py 16 symbols added
+ TestBundleMeta class class TestBundleMeta L279–404
+ test_bundle_meta_has_base_commits_annotation method method test_bundle_meta_has_base_commits_annotation L296–300
+ test_bundle_meta_has_created_at_annotation method method test_bundle_meta_has_created_at_annotation L302–306
+ test_bundle_meta_has_mode_annotation method method test_bundle_meta_has_mode_annotation L290–294
+ test_bundle_meta_typeddict_exists method method test_bundle_meta_typeddict_exists L286–288
+ test_empty_have_list_means_full method method test_empty_have_list_means_full L398–404
+ test_full_bundle_base_commits_empty method method test_full_bundle_base_commits_empty L332–337
+ test_full_bundle_created_at_is_iso method method test_full_bundle_created_at_is_iso L347–355
+ test_full_bundle_created_at_is_str method method test_full_bundle_created_at_is_str L339–345
+ test_full_bundle_has_meta method method test_full_bundle_has_meta L318–323
+ test_full_bundle_mode_is_full method method test_full_bundle_mode_is_full L325–330
+ test_incremental_bundle_base_commits_populated method method test_incremental_bundle_base_commits_populated L369–375
+ test_incremental_bundle_has_created_at method method test_incremental_bundle_has_created_at L386–392
+ test_incremental_bundle_mode_is_incremental method method test_incremental_bundle_mode_is_incremental L361–367
+ test_incremental_bundle_multiple_have method method test_incremental_bundle_multiple_have L377–384
+ test_mpack_bundle_has_meta_field method method test_mpack_bundle_has_meta_field L308–312
← 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:e29c5e490d5e0f26b81add6d351b030d2165663cbbbe88bc64e19911389c2a2a --body "your comment"