feat(proposals): phase 4 — simulation engine
Three simulation types cached in musehub_proposal_simulations:
conflict_scan — dry-runs the merge strategy and returns per-domain conflict breakdown (conflict_count, conflicting_files, conflicts_by_domain, files_added/modified/removed)
risk_projection — projects post-merge dimensional risk using a weighted blend of change_ratio (40%) + conflict_ratio (40%) + existing dimensional_risk (20%); returns risk_band and risk_delta
dependency_order — topological sort of the live dependency DAG; groups nodes into parallel execution phases; surfaces cycles
New symbols: genesis.py: compute_simulation_id(proposal_id, simulation_type, from_branch_commit_id) models/musehub.py: SimulationType enum, SimulationResponse, SimulationListResponse proposal_simulation.py: pure engine — simulate_conflict_scan, simulate_risk_projection, simulate_dependency_order (no DB I/O) musehub_proposals.py: run_simulation, get_simulation, list_simulations service functions; upsert semantics on re-run; is_stale=True when from_branch advances proposals.py routes: POST/GET /simulations/{type}, GET /simulations (list)
38 tests all passing.
0 comments
muse hub commit comment sha256:18d2953fc912010676a67b6797f26ef794a268a0479a9ab0c9d5fdfa8769f02d --body "your comment"
No comments yet. Be the first to start the discussion.