gabriel / muse public
test paths dev
AI Agent gabriel · 143 days ago · Apr 26, 2026 · Diff

test(paths): 7-tier tests for init_repo_dirs

Tier 1 Unit — each dir helper, return value, idempotency, missing root Tier 2 Integration — dirs writable by object/commit/snapshot/shelf layers Tier 3 E2E — CLI muse init produces the same layout as init_repo_dirs Tier 4 Stress — 100 sequential calls, 20 concurrent threads, threadpool Tier 5 State — no files written, no HEAD/repo.json, no extra dirs, existing files preserved Tier 6 Security — symlink root, spaces in path, unicode path Tier 7 Performance — single call <100ms, idempotent call <50ms

sha256:cc38f468248e290e26aaf7f2f839634bfc8927bc0b872ea8def891aa5558433e sha
+32 ~5 −2 symbols
sha256:4fab05264e1000dd2e1ebb9003d8aece06a57f0ba48db060b0d91a856f4be4f3 snapshot
+32
symbols added
~5
symbols modified
−2
symbols removed
0
dead code introduced
Semantic Changes 39 symbols
~ tests/test_core_paths_init_repo_dirs.py .py 32 symbols added, 2 symbols removed, 5 symbols modified
TestInitRepoDirs class class TestInitRepoDirs L30–59
test_no_files_written method method test_no_files_written L50–53
+ TestInitRepoDirsE2E class class TestInitRepoDirsE2E L120–136
+ test_bare_repo_dirs_subset_of_full_init method method test_bare_repo_dirs_subset_of_full_init L130–136
+ test_cli_init_produces_same_dirs method method test_cli_init_produces_same_dirs L121–128
+ TestInitRepoDirsIntegration class class TestInitRepoDirsIntegration L83–112
+ test_commits_dir_accepts_write method method test_commits_dir_accepts_write L90–94
+ test_heads_dir_accepts_ref_file method method test_heads_dir_accepts_ref_file L96–100
+ test_logs_dir_accepts_subdirs method method test_logs_dir_accepts_subdirs L102–106
+ test_objects_dir_accepts_write method method test_objects_dir_accepts_write L84–88
+ test_shelf_dir_accepts_msgpack_file method method test_shelf_dir_accepts_msgpack_file L108–112
+ TestInitRepoDirsPerformance class class TestInitRepoDirsPerformance L244–257
+ test_idempotent_call_under_50ms method method test_idempotent_call_under_50ms L252–257
+ test_single_call_under_100ms method method test_single_call_under_100ms L245–250
+ TestInitRepoDirsSecurity class class TestInitRepoDirsSecurity L217–236
+ test_root_with_spaces_in_path method method test_root_with_spaces_in_path L228–231
+ test_root_with_unicode_path method method test_root_with_unicode_path L233–236
+ test_symlink_root_does_not_escape method method test_symlink_root_does_not_escape L218–226
+ TestInitRepoDirsStateIntegrity class class TestInitRepoDirsStateIntegrity L181–209
+ test_existing_files_not_touched method method test_existing_files_not_touched L204–209
+ test_no_extra_toplevel_dirs method method test_no_extra_toplevel_dirs L195–202
+ test_no_files_written method method test_no_files_written L182–185
+ test_no_head_written method method test_no_head_written L187–189
+ test_no_repo_json_written method method test_no_repo_json_written L191–193
+ TestInitRepoDirsStress class class TestInitRepoDirsStress L144–173
+ test_100_sequential_calls_idempotent method method test_100_sequential_calls_idempotent L145–148
+ test_concurrent_calls_safe method method test_concurrent_calls_safe L150–166
+ test_threadpool_concurrent_different_roots method method test_threadpool_concurrent_different_roots L168–173
+ TestInitRepoDirsUnit class class TestInitRepoDirsUnit L40–75
+ test_creates_nested_missing_root method method test_creates_nested_missing_root L72–75
+ test_idempotent_dirs_still_present method method test_idempotent_dirs_still_present L60–64
+ futures import import concurrent.futures L15–15
+ threading import import threading L17–17
+ time import import time L18–18
← 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:cc38f468248e290e26aaf7f2f839634bfc8927bc0b872ea8def891aa5558433e --body "your comment"