gabriel / musehub public
feat BREAKING proposals task/proposal-models-v2 #13 / 19
AI Agent gabriel · 127 days ago · May 8, 2026 · Diff

feat(proposals): Phase 6 — MCP tools for proposal simulation and enrichment

- _proposal_data: include all Phase 1-5 fields (proposal_type, is_draft, merge_strategy, merge_conditions, selective_domains, blocked_by, blocks, is_blocked, latest_simulations) - execute_create_proposal: forward proposal_type, is_draft, merge_strategy, merge_conditions, selective_domains, depends_on to service layer - execute_get_proposal: read enriched proposal with DAG + simulation data - execute_run_simulation: run and persist conflict_scan / risk_projection / dependency_order simulation for a proposal - execute_get_simulation: read cached simulation, return not_found when absent - execute_list_simulations: list all cached simulations (up to 3) for a proposal - Tool schemas: musehub_create_proposal updated with new fields; musehub_get_proposal, musehub_run_proposal_simulation, musehub_get_proposal_simulation, musehub_list_proposal_simulations added - Dispatcher: routes all 5 new/updated tool calls to the right executors - 38 tests added in test_proposal_reimagination_phase6.py, all passing

sha256:5f7e684d1452efe21423fe3e491fb1f4ade8882a4b8cebf7e6b8fafb045209fd sha
+73 ~6 symbols
sha256:85c5335c7adc3bca785d46f32b469d2029f2e857158c59945865bd80bc411448 snapshot
+73
symbols added
~6
symbols modified
0
dead code introduced
Semantic Changes 79 symbols
+ TestDispatcherRouting class class TestDispatcherRouting L680–808
+ _make_dispatcher_call method method _make_dispatcher_call L683–696
+ test_dispatcher_create_proposal_forwards_new_fields method async_method test_dispatcher_create_proposal_forwards_new_fields L774–808
+ test_dispatcher_routes_get_proposal method async_method test_dispatcher_routes_get_proposal L699–721
+ test_dispatcher_routes_list_simulations method async_method test_dispatcher_routes_list_simulations L752–771
+ test_dispatcher_routes_run_simulation method async_method test_dispatcher_routes_run_simulation L724–749
+ TestExecuteCreateProposalNewFields class class TestExecuteCreateProposalNewFields L170–251
+ test_new_kwargs_forwarded method async_method test_new_kwargs_forwarded L174–228
+ test_no_actor_rejected method async_method test_no_actor_rejected L231–240
+ test_same_branch_rejected method async_method test_same_branch_rejected L243–251
+ TestExecuteGetProposal class class TestExecuteGetProposal L256–346
+ _mock_proposal method method _mock_proposal L257–287
+ test_no_actor_rejected method async_method test_no_actor_rejected L339–346
+ test_not_found_when_proposal_missing method async_method test_not_found_when_proposal_missing L316–336
+ test_returns_enriched_proposal method async_method test_returns_enriched_proposal L290–313
+ TestExecuteGetSimulation class class TestExecuteGetSimulation L449–530
+ _mock_sim method method _mock_sim L450–462
+ test_invalid_type_rejected method async_method test_invalid_type_rejected L520–530
+ test_not_found_when_no_cached_simulation method async_method test_not_found_when_no_cached_simulation L493–517
+ test_returns_cached_result method async_method test_returns_cached_result L465–490
+ TestExecuteListSimulations class class TestExecuteListSimulations L535–619
+ _make_sim_list method method _make_sim_list L536–552
+ test_empty_list_when_none_run method async_method test_empty_list_when_none_run L583–607
+ test_no_actor_rejected method async_method test_no_actor_rejected L610–619
+ test_returns_all_simulations method async_method test_returns_all_simulations L555–580
+ TestExecuteRunSimulation class class TestExecuteRunSimulation L351–444
+ _mock_sim method method _mock_sim L352–364
+ test_all_valid_simulation_types_accepted method async_method test_all_valid_simulation_types_accepted L423–444
+ test_invalid_simulation_type_rejected method async_method test_invalid_simulation_type_rejected L396–406
+ test_no_actor_rejected method async_method test_no_actor_rejected L409–419
+ test_runs_and_returns_result method async_method test_runs_and_returns_result L367–393
+ TestProposalDataSerializer class class TestProposalDataSerializer L43–120
+ _make_proposal_response method method _make_proposal_response L44–76
+ test_core_fields_present method method test_core_fields_present L78–83
+ test_dates_iso_format method method test_dates_iso_format L108–114
+ test_merged_at_none_handled method method test_merged_at_none_handled L116–120
+ test_new_fields_present method method test_new_fields_present L85–106
+ TestSimulationDataSerializer class class TestSimulationDataSerializer L125–165
+ _make_sim method method _make_sim L126–140
+ test_all_fields_present method method test_all_fields_present L142–148
+ test_expires_at_iso_when_set method method test_expires_at_iso_when_set L161–165
+ test_is_stale_flag method method test_is_stale_flag L156–159
+ test_result_passthrough method method test_result_passthrough L150–154
+ TestToolSchemas class class TestToolSchemas L624–675
+ _get_tool_names method method _get_tool_names L625–627
+ test_all_new_tools_in_tool_names_set method method test_all_new_tools_in_tool_names_set L671–675
+ test_create_proposal_has_new_fields method method test_create_proposal_has_new_fields L641–650
+ test_get_proposal_in_write_tools method method test_get_proposal_in_write_tools L629–630
+ test_get_simulation_in_write_tools method method test_get_simulation_in_write_tools L635–636
+ test_list_simulations_in_write_tools method method test_list_simulations_in_write_tools L638–639
+ test_run_simulation_in_write_tools method method test_run_simulation_in_write_tools L632–633
+ test_run_simulation_schema_enum method method test_run_simulation_schema_enum L652–656
+ test_simulation_tools_require_proposal_id method method test_simulation_tools_require_proposal_id L658–669
+ _now function function _now L37–38
+ _sid function function _sid L27–29
+ _uid function function _uid L32–34
+ AsyncMock import import AsyncMock L18–18
+ MagicMock import import MagicMock L18–18
+ asyncio import import asyncio L15–15
+ blob_id import import blob_id L22–22
+ datetime import import datetime L17–17
+ fake_id import import fake_id L22–22
+ os import import os L16–16
+ patch import import patch L18–18
+ pytest import import pytest L20–20
+ short_id import import short_id L22–22
+ timezone import import timezone L17–17
~ musehub/mcp/dispatcher.py .py 1 symbol modified
~ musehub/mcp/write_tools/proposals.py .py 6 symbols added, 4 symbols modified
+ _simulation_data function function _simulation_data L46–58
+ execute_get_proposal function async_function execute_get_proposal L675–725
+ execute_get_simulation function async_function execute_get_simulation L796–862
+ execute_list_simulations function async_function execute_list_simulations L865–917
+ execute_run_simulation function async_function execute_run_simulation L728–793
+ SimulationResponse import import SimulationResponse L9–9

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:5f7e684d1452efe21423fe3e491fb1f4ade8882a4b8cebf7e6b8fafb045209fd --body "your comment"