Calendar Day
Tuesday, June 23, 2026 (PR 2 of 2)
Planned Effort
3 story points — sprint item #6 (Medium)
Problem
api/workspaces.py contains an import that exists solely to support a test harness: from models import Bubble, Composer, Workspace # noqa: F401. The production module's import surface is shaped by test requirements — a test implementation detail leaks into production code. The test file tests/test_models_wired_at_read_sites.py should patch the actual consumption sites rather than relying on a re-export in the API layer.
Goal
One merged PR that removes the test-only re-export from api/workspaces.py and refactors the wired-at-read-sites test to patch model classes at their real usage sites in services/, preserving the same invariant.
Scope
Touch points
api/workspaces.py — remove the re-export import block and its comment
tests/test_models_wired_at_read_sites.py — patch services.workspace_listing.Bubble, etc. at actual usage sites
Out of scope
Acceptance Criteria
Verification
cd C:\Users\Jasen\CppAliance\cppa-cursor-browser
.\.venv\Scripts\Activate.ps1
ruff check api/workspaces.py
pytest tests/test_models_wired_at_read_sites.py
pytest
Calendar Day
Tuesday, June 23, 2026 (PR 2 of 2)
Planned Effort
3 story points — sprint item #6 (Medium)
Problem
api/workspaces.pycontains an import that exists solely to support a test harness:from models import Bubble, Composer, Workspace # noqa: F401. The production module's import surface is shaped by test requirements — a test implementation detail leaks into production code. The test filetests/test_models_wired_at_read_sites.pyshould patch the actual consumption sites rather than relying on a re-export in the API layer.Goal
One merged PR that removes the test-only re-export from
api/workspaces.pyand refactors the wired-at-read-sites test to patch model classes at their real usage sites inservices/, preserving the same invariant.Scope
Touch points
api/workspaces.py— remove the re-export import block and its commenttests/test_models_wired_at_read_sites.py— patchservices.workspace_listing.Bubble, etc. at actual usage sitesOut of scope
Acceptance Criteria
api/workspaces.pytests/test_models_wired_at_read_sites.pyis refactored to patch model classes at their actual usage sites inservices/api/workspaces.pyimports only symbols it actually uses (ruff F401 clean without the# noqa)Verification