refactor(api): remove test-only model re-export from workspaces#118
refactor(api): remove test-only model re-export from workspaces#118clean6378-max-it wants to merge 2 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthrough
ChangesTest spy re-import cleanup
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
closes #109
Summary
Remove the test-only
from models import Bubble, Composer, Workspace # noqa: F401re-export fromapi/workspaces.py. Refactortests/test_models_wired_at_read_sites.pyto patch model classes at their actual usage sites inservices/instead of relying on an API-layer re-export.Sprint item #6 (Tuesday PR 2 of 2, 3 pt).
Problem
api/workspaces.pycontained imports that existed only to support the wired-at-read-sites spy harness. That let test implementation details shape the production import surface.Changes
api/workspaces.py: remove the test-only model re-export block and comment; remove unusedlookup_workspace_display_nameimporttests/test_models_wired_at_read_sites.py: retarget spy patches to real consumption sites:services.workspace_db.Bubblefor/api/workspaces/.../tabsbubble validationservices.workspace_tabs.Composerfor/api/workspaces/.../tabscomposer validationservices.workspace_resolver.Workspaceforlookup_workspace_display_nameOut of scope
Test plan
ruff check api/workspaces.pypytest tests/test_models_wired_at_read_sites.py(13 passed)pytest(full suite)mypy --strict(if run in CI)Acceptance criteria
api/workspaces.pyservices/usage sitesapi/workspaces.pyimports only symbols it uses (ruff F401 clean)Summary by CodeRabbit