gabriel / muse public
Closed #26 Bug
filed by gabriel human · 42 days ago

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.json in all test fixtures and writes
  • Rename stash_countshelf_count in 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.json or stash_count remains in tests/test_core_workspace.py
  • Tests pass against the real shelf_count field in WorkspaceMemberStatus
  • _make_present_repo fixture creates .muse/shelf.json (not stash.json)
Activity1
gabriel opened this issue 42 days ago
gabriel 42 days ago

Closing — the working tree on dev already has the correct shelf.json/shelf_count terminology. The stash.json references were in a historical object in the object store from before the rename. No code change needed.

closed this issue 42 days ago