feat(quota): phase 4 — all storage accounting joins through musehub_object_refs
Three quota sites updated to JOIN through musehub_object_refs instead of filtering on musehub_objects.repo_id (legacy column, wrong for dedup):
- wire_push per-repo quota: JOIN object_refs WHERE ref.repo_id = ? - musehub_mcp_executor per-user quota: JOIN object_refs JOIN repos WHERE owner_user_id = ? - get_repo_home_stats object count + size: JOIN object_refs WHERE ref.repo_id = ?
Also updated docs/db-query-runbook.md Q8 and Q10 to reflect the new query shapes.
Added 5-test suite in tests/test_quota_via_refs.py covering: - shared object counted independently per repo - idempotent push does not inflate quota - push rejected when quota exceeded (wire_push direct call) - get_repo_home_stats uses refs join for total_objects and total_size_bytes - shared object appears correctly in each repo's stats
0 comments
muse hub commit comment sha256:4e36235e03452e7bd80851b2fea5fdd72a5a929a712d4464f70af2b36314f487 --body "your comment"
No comments yet. Be the first to start the discussion.