gabriel / musehub public
feat BREAKING task/proposal-close-endpoint #1 / 1
AI Agent gabriel · 130 days ago · May 9, 2026 · Diff

feat: add POST /proposals/{id}/close endpoint

close_proposal() service sets state to 'closed' (open only; 409 on merged/closed). Route: POST /api/repos/{repo_id}/proposals/{proposal_id}/close. ProposalListQueryParams and list_proposals route pattern updated to accept 'closed' as a valid state filter. 5 new tests: sets state, 409 on double-close, 404 on unknown, 401 no auth, appears in ?state=closed list.

sha256:23eea09ca8c3a4e1273313b01b7cd662ccac26380a07d6f9b9a3b2ad19b9a021 sha
+7 ~2 symbols
sha256:b54c52abbce2dc554c4dac51352eb0f43897793df7e67c3293122908f25ce93e snapshot
+7
symbols added
~2
symbols modified
0
dead code introduced
Semantic Changes 9 symbols
~ musehub/api/routes/musehub/proposals.py .py 1 symbol added, 1 symbol modified
+ close_proposal function async_function close_proposal L593–611
+ close_proposal function async_function close_proposal L788–812
~ tests/test_musehub_proposals.py .py 5 symbols added
+ test_close_proposal_already_closed_returns_409 function async_function test_close_proposal_already_closed_returns_409 L1598–1615
+ test_close_proposal_requires_auth function async_function test_close_proposal_requires_auth L1632–1635
+ test_close_proposal_sets_state_closed function async_function test_close_proposal_sets_state_closed L1576–1595
+ test_close_unknown_proposal_returns_404 function async_function test_close_unknown_proposal_returns_404 L1618–1629
+ test_closed_proposal_appears_in_closed_list function async_function test_closed_proposal_appears_in_closed_list L1638–1657
← Older Oldest on task/proposal-close-endpoint
All commits
Newer → Latest on task/proposal-close-endpoint

0 comments

No comments yet. Be the first to start the discussion.

To add a comment, use the Muse CLI: muse hub commit comment sha256:23eea09ca8c3a4e1273313b01b7cd662ccac26380a07d6f9b9a3b2ad19b9a021 --body "your comment"