Closed
#26
Bug
Workspace tests use stash.json and stash_count instead of shelf
0
Anchors
—
Blast radius
—
Churn 30d
0
Proposals
Bug
tests/test_core_workspace.py contains several tests that reference .muse/stash.json and stash_count — the pre-rename terminology. The production code (muse/core/workspace.py) correctly uses .muse/shelf.json and shelf_count, but the tests were never updated to match.
The tests write directly to .muse/stash.json and assert on stash_count, so they pass against their own stubs but are completely disconnected from the actual field name the production code reads.
Affected Tests
| Test | Wrong term | Correct term |
|---|---|---|
test_stash_count_does_not_spawn_subprocess |
stash.json, stash_count |
shelf.json, shelf_count |
test_stash_count_read_from_file |
stash.json, stash_count |
shelf.json, shelf_count |
test_stash_count_zero_when_file_empty |
stash.json |
shelf.json |
test_stash_count_zero_when_file_absent |
stash.json |
shelf.json |
test_list_members_parallel_performance |
stash in comment |
shelf |
Relevant Code
| File | Symbol / Line | Notes |
|---|---|---|
tests/test_core_workspace.py |
test_stash_count_* functions |
all use wrong file name and field name |
muse/core/workspace.py |
line 117 — shelf_count: int |
correct production field |
muse/core/workspace.py |
line 488 — shelf.json |
correct production path |
Fix
- Rename
.muse/stash.json→.muse/shelf.jsonin all test fixtures and writes - Rename
stash_count→shelf_countin all assertions - Rename the test functions from
test_stash_count_*→test_shelf_count_* - Update docstrings and comments to use shelf terminology
Acceptance Criteria
- No reference to
stash.jsonorstash_countremains intests/test_core_workspace.py - Tests pass against the real
shelf_countfield inWorkspaceMemberStatus _make_present_repofixture creates.muse/shelf.json(notstash.json)
Activity1
closed this issue
42 days ago
Closing — the working tree on
devalready has the correctshelf.json/shelf_countterminology. Thestash.jsonreferences were in a historical object in the object store from before the rename. No code change needed.