gabriel / muse public
fix BREAKING fix/flaky-tests #1 / 1
gabriel · 72 days ago · Apr 9, 2026 · Diff

fix: replace two flaky tests with deterministic assertions

test_missing_token_exits (TimeoutError): Was using the old token-based IdentityEntry shape. _hub_api now uses Ed25519 signing — with no handle/key_path it fell through to get_signing_identity(), found gabriel's real localhost:10003 identity, and made a live HTTP request that timed out. Fix: patch get_signing_identity to return None (the real 'no identity' condition) and assert urlopen is never called.

test_warm_walk_rate_exceeds_cold_walk_rate (timing assertion flip): 500 files × 512 bytes — SHA-256 of that content is near-instant. The msgpack cache load overhead exceeded the hashing savings, so the warm walk (46ms) was slower than the cold walk (19ms). Timing ratios are unreliable for small trees regardless of machine speed. Fix: replace timing assertion with call-count assertion. Cold walk populates the cache; warm walk must call _hash_str exactly 0 times — every file is a cache hit. This is 100% deterministic.

sha256:f2800536750706949f4ae9155d546ac1330f514755e60c162db5742eaa5fd8d0 sha
sha256:8d855db90c53293a0ac53a403fb6ab27ee0ad510701258db584d7ab57637cae4 snapshot
← Older Oldest on fix/flaky-tests
All commits
Newer → Latest on fix/flaky-tests

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