gabriel / musehub public
test mwp8/phase0 task/mwp-8-cache-invalidation #6 / 6
AI Agent gabriel · 21 days ago · Jun 30, 2026 · Diff

test(mwp8/phase0): audit — repair+force-push leave stale cache (AU_01..AU_04)

sha256:0e5174da777684df43b2db71f282079030ef28bacffb93e19c29ee712b2a8bc4 sha
+82 symbols
2 changed · 990 in snapshot files
sha256:cb617ce202c4899bce9780ff62051d6bfbd73d33bdc17507e5fe1726317ec5bf snapshot
+82
symbols added
2
files changed
990
files in snapshot
0
dead code introduced
Semantic Changes 82 symbols
+ MWP-8 [musehub] — Cache-invalidation audit: bust musehub_fetch_mpack_cache on repair and force-push section MWP-8 [musehub] — Cache-invalidation audit: bust musehub_fetch_mpack_cache on repair and force-push L1–305
+ Acceptance criteria (whole-ticket gate) section Acceptance criteria (whole-ticket gate) L230–243
+ Background section Background L19–92
+ The cache HIT path (where stale bytes escape) section The cache HIT path (where stale bytes escape) L40–63
+ code[python] variable variable code[python] L44–60
+ Trigger 1 — repair endpoints do not invalidate section Trigger 1 — repair endpoints do not invalidate L63–75
+ table section table L67–72
+ Trigger 2 — force-push does not invalidate section Trigger 2 — force-push does not invalidate L75–82
+ What exists today for cache deletion section What exists today for cache deletion L86–92
+ What the cache is section What the cache is L21–40
+ code[python] variable variable code[python] L27–37
+ Why the prebuild does not self-heal a repair section Why the prebuild does not self-heal a repair L82–86
+ Branching & commits section Branching & commits L215–230
+ code[bash] variable variable code[bash] L217–225
+ Code Intelligence Appendix — symbol anchors section Code Intelligence Appendix — symbol anchors L260–305
+ Blast-radius checks (run before/after editing) section Blast-radius checks (run before/after editing) L282–290
+ code[bash] variable variable code[bash] L283–289
+ Existing tests to read (don't reinvent fixtures) section Existing tests to read (don't reinvent fixtures) L290–298
+ table section table L291–297
+ Primary edit sites section Primary edit sites L264–273
+ table section table L265–272
+ Reference / dependency reads section Reference / dependency reads L273–282
+ table section table L274–281
+ Test run discipline section Test run discipline L298–305
+ code[bash] variable variable code[bash] L299–305
+ Design section Design L103–147
+ Design decisions section Design decisions L243–250
+ The clone-after-repair contract (the load-bearing E2E) section The clone-after-repair contract (the load-bearing E2E) L141–147
+ The primitive — invalidate_fetch_mpack_cache section The primitive — invalidate_fetch_mpack_cache L105–136
+ code[python] variable variable code[python] L109–131
+ Wiring section Wiring L136–141
+ Goal — definition of done section Goal — definition of done L92–103
+ Out of scope section Out of scope L250–260
+ Phases — TDD-first, load-bearing, each green before the next section Phases — TDD-first, load-bearing, each green before the next L147–215
+ Phase 0 — Audit & red-repro (the gate) section Phase 0 — Audit & red-repro (the gate) L151–163
+ Phase 1 — The invalidation primitive section Phase 1 — The invalidation primitive L163–174
+ AU03 go green) section Phase 2 — Wire repair → invalidation (make AU01..AU03 go green) L174–185
+ Phase 3 — Wire force-push → invalidation (make AU_04 go green); protect the fast-forward path section Phase 3 — Wire force-push → invalidation (make AU_04 go green); protect the fast-forward path L185–195
+ Phase 4 — Optional prebuild-on-repair + end-to-end clone-after-repair section Phase 4 — Optional prebuild-on-repair + end-to-end clone-after-repair L195–203
+ Phase 5 — Suite wiring, regression sweep, close-out section Phase 5 — Suite wiring, regression sweep, close-out L203–215
~ tests/test_mwp8_cache_invalidation.py .py 42 symbols added
+ _build_valid_commit_dict function function _build_valid_commit_dict L151–180
+ _cache_rows_for_repo function async_function _cache_rows_for_repo L102–112
+ _empty_mpack_bytes function function _empty_mpack_bytes L473–482
+ _insert_commit_row function async_function _insert_commit_row L183–210
+ _insert_fresh_cache_row function async_function _insert_fresh_cache_row L80–99
+ _insert_object_row function async_function _insert_object_row L131–148
+ _now function function _now L76–77
+ _stub_fetch_backend function function _stub_fetch_backend L123–128
+ _stub_push_backend function function _stub_push_backend L115–120
+ Any import import Any L45–45
+ AsyncMock import import AsyncMock L46–46
+ AsyncSession import import AsyncSession L50–50
+ MPackNotReadyError import import MPackNotReadyError L69–69
+ MusehubBranch import import MusehubBranch L54–54
+ MusehubCommit import import MusehubCommit L54–54
+ MusehubCommitRef import import MusehubCommitRef L54–54
+ MusehubFetchMPackCache import import MusehubFetchMPackCache L54–54
+ MusehubObject import import MusehubObject L54–54
+ MusehubObjectRef import import MusehubObjectRef L54–54
+ annotations import import annotations L41–41
+ blob_id import import blob_id L53–53
+ compute_snapshot_id import import compute_snapshot_id L62–62
+ create_branch import import create_branch L70–70
+ create_repo import import create_repo L70–70
+ datetime import import datetime L44–44
+ fake_id import import fake_id L53–53
+ hash_commit import import hash_commit L52–52
+ hashlib import import hashlib L43–43
+ long_id import import long_id L52–52
+ patch import import patch L46–46
+ pytest import import pytest L48–48
+ select import import select L49–49
+ timedelta import import timedelta L44–44
+ timezone import import timezone L44–44
+ wire_fetch_mpack import import wire_fetch_mpack L63–63
+ wire_repair_commit import import wire_repair_commit L64–64
+ wire_repair_object import import wire_repair_object L64–64
+ wire_repair_snapshot import import wire_repair_snapshot L64–64
+ test_AU_01_repair_object_leaves_stale_cache_hit function async_function test_AU_01_repair_object_leaves_stale_cache_hit L220–263
+ test_AU_02_repair_snapshot_leaves_stale_cache_hit function async_function test_AU_02_repair_snapshot_leaves_stale_cache_hit L273–314
+ test_AU_03_repair_commit_leaves_stale_cache_hit function async_function test_AU_03_repair_commit_leaves_stale_cache_hit L324–379
+ test_AU_04_force_push_leaves_old_tip_cache_row function async_function test_AU_04_force_push_leaves_old_tip_cache_row L389–470
Files Changed
+2
990 in snapshot

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