gabriel / musehub public
feat patch dev
AI Agent gabriel · 127 days ago · May 8, 2026 · Diff

feat: POST /proposals/{id}/reopen — reset merged/closed proposal to open

Adds reopen_proposal() service and the corresponding route so a proposal whose merge produced a corrupt commit_id (bug #36) can be reset to open and re-merged after the server-side fix is deployed.

Service clears merge_commit_id and merged_at on reopen. Returns 409 if the proposal is already open. Returns 404 if the proposal is not found.

Tests: tests/test_proposal_reopen.py (R1–R5, all GREEN).

sha256:3f552f64da0f6611dcea55fe957f72335078d2e96ffb49a5157ccd1fe1859e98 sha
+21 symbols
sha256:0d7f54d47c7ad9e9ed7afcdcc086c210793b827d4fc84228933361253eace40c snapshot
+21
symbols added
0
dead code introduced
Semantic Changes 21 symbols
~ tests/test_proposal_reopen.py .py 19 symbols added
+ _create_repo function async_function _create_repo L37–44
+ _seed_proposal function async_function _seed_proposal L47–87
+ AsyncClient import import AsyncClient L23–23
+ AsyncSession import import AsyncSession L24–24
+ MusehubBranch import import MusehubBranch L28–28
+ MusehubCommit import import MusehubCommit L28–28
+ MusehubProposal import import MusehubProposal L28–28
+ StrDict import import StrDict L29–29
+ annotations import import annotations L18–18
+ compute_branch_id import import compute_branch_id L27–27
+ datetime import import datetime L20–20
+ fake_id import import fake_id L26–26
+ pytest import import pytest L22–22
+ timezone import import timezone L20–20
+ test_r1_reopen_merged_proposal function async_function test_r1_reopen_merged_proposal L96–122
+ test_r2_reopen_closed_proposal function async_function test_r2_reopen_closed_proposal L131–145
+ test_r3_reopen_already_open_returns_409 function async_function test_r3_reopen_already_open_returns_409 L154–167
+ test_r4_reopen_requires_auth function async_function test_r4_reopen_requires_auth L176–187
+ test_r5_reopen_unknown_proposal_returns_404 function async_function test_r5_reopen_unknown_proposal_returns_404 L196–208
+ reopen_proposal function async_function reopen_proposal L366–388
+ reopen_proposal function async_function reopen_proposal L394–423
← Older Oldest on dev
All commits
Newer → Latest on dev

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:3f552f64da0f6611dcea55fe957f72335078d2e96ffb49a5157ccd1fe1859e98 --body "your comment"