feat(proposals): phase 5 — API surface enrichment
ProposalResponse: + blocked_by / blocks / is_blocked — DAG position; populated by get_proposal + latest_simulations — inline dict of cached simulation results per type
get_proposal: loads DAG via load_dag_for_proposals and simulations via list_simulations; both feed _to_proposal_response so every single-read includes full context
list_proposals — new DB predicates: + proposal_type list filter (was accepted but silently ignored) + is_draft bool filter + merge_strategy list filter
ProposalListFilters: + is_draft: bool | None + merge_strategy: list[str] | None
ProposalListEntry: + merge_strategy — surfaces the ORM value per row + simulation_conflict_count — int | None; from prefetched conflict_scan
_enrich_one: uses dimensional_risk dict (Phase 1 ORM) for multi-domain risk instead of scalar risk_score → code-only; falls back to scalar for backwards compat
_prefetch_for_batch — Query 4: loads latest conflict_scan result per proposal in the current page; passes conflict_count to _enrich_one with zero per-row I/O
21 unit + integration tests; 187 total passing across all 5 phases.
0 comments
muse hub commit comment sha256:9daf3a0663bc8746a142735e585a136ab395abb72a8c5affe9d9c56fdf3c0d14 --body "your comment"
No comments yet. Be the first to start the discussion.