feat
BREAKING
proposals
task/proposal-list-models
#1 / 1
feat(proposals): Phase 1 list enrichment models and service
Add ProposalListEntry, ProposalListFilters, DomainHeatResponse, and MergeReadinessResponse Pydantic models. Implement zero-N+1 enrichment via _prefetch_for_batch + _enrich_one, plus enrich_proposal_list_batch, enrich_proposal_list_entry, get_domain_heat, and get_merge_readiness in musehub_proposals.py.
Delete infer_list_risk_band (branch-name heuristic with no DB backing) from musehub_proposal_risk.py and all three call sites; replace with _score_to_band using proposal.risk_score.
Add 64 Tier-1 (unit) and Tier-5 (data-integrity) tests covering band mapping, enrich_one risk/approval/metadata logic, Pydantic field constraints, and output invariants.
sha256:0614a3162653d62006dff44ec86e0fddc614adcbc0010fcc1af59f5af0347f68
sha
+115
~11
−18
symbols
sha256:f0f37864b4c1990e80969f58b066567df7756306f922b8ba2aa2d3346dbd9967
snapshot
+115
symbols added
~11
symbols modified
−18
symbols removed
0
dead code introduced
Semantic Changes
144 symbols
+
test_active_domains_subset_of_domain_risk_keys
method
method test_active_domains_subset_of_domain_risk_keys L468–472
+
test_aggregate_band_consistent_with_score
method
method test_aggregate_band_consistent_with_score L512–519
+
test_aggregate_risk_score_always_in_0_1
method
method test_aggregate_risk_score_always_in_0_1 L453–459
+
test_domain_risk_values_always_in_0_1
method
method test_domain_risk_values_always_in_0_1 L461–466
+
test_domains_approved_subset_of_active_domains
method
method test_domains_approved_subset_of_active_domains L474–480
+
test_domains_pending_review_complement_of_approved_within_active
method
method test_domains_pending_review_complement_of_approved_within_active L482–490
+
test_merge_condition_met_only_when_no_breakage_and_sufficient_approvals
method
method test_merge_condition_met_only_when_no_breakage_and_sufficient_approvals L521–535
+
test_null_touched_symbols_treated_as_empty
method
method test_null_touched_symbols_treated_as_empty L537–540
+
test_touched_symbols_preview_never_longer_than_3
method
method test_touched_symbols_preview_never_longer_than_3 L505–510
+
test_all_merge_conditions_met_requires_approvals_and_no_breakage
method
method test_all_merge_conditions_met_requires_approvals_and_no_breakage L227–235
+
test_breakage_blocks_merge_even_with_enough_approvals
method
method test_breakage_blocks_merge_even_with_enough_approvals L237–245
+
test_domains_approved_populated_when_code_active_and_approved
method
method test_domains_approved_populated_when_code_active_and_approved L258–263
+
test_domains_pending_review_when_not_approved
method
method test_domains_pending_review_when_not_approved L265–270
+
test_non_approved_reviews_not_counted
method
method test_non_approved_reviews_not_counted L247–256
+
test_one_approved_review_increments_count
method
method test_one_approved_review_increments_count L215–220
+
test_required_approvals_default_is_two
method
method test_required_approvals_default_is_two L222–225
+
test_author_type_defaults_to_human_if_missing
method
method test_author_type_defaults_to_human_if_missing L314–317
+
test_author_type_resolved_from_prefetch
method
method test_author_type_resolved_from_prefetch L305–312
+
test_is_draft_true_for_drafting_state
method
method test_is_draft_true_for_drafting_state L295–298
+
test_touched_symbols_preview_capped_at_three
method
method test_touched_symbols_preview_capped_at_three L319–323
+
test_touched_symbols_preview_empty_list
method
method test_touched_symbols_preview_empty_list L325–328
+
test_aggregate_score_equals_code_when_only_domain
method
method test_aggregate_score_equals_code_when_only_domain L171–175
+
test_aggregate_score_rounded_to_4_decimal_places
method
method test_aggregate_score_rounded_to_4_decimal_places L192–196
+
test_invalid_risk_score_raises_value_error
method
method test_invalid_risk_score_raises_value_error L182–185
+
test_negative_risk_score_raises_value_error
method
method test_negative_risk_score_raises_value_error L187–190
+
test_nonzero_risk_activates_code_domain
method
method test_nonzero_risk_activates_code_domain L164–169
+
test_zero_risk_score_yields_no_active_domains
method
method test_zero_risk_score_yields_no_active_domains L156–162
+
test_assigned_reviewer_pattern_rejects_spaces
method
method test_assigned_reviewer_pattern_rejects_spaces L398–401
+
test_domain_heat_entry_rejects_negative_count
method
method test_domain_heat_entry_rejects_negative_count L431–434
+
test_domain_heat_entry_rejects_risk_above_1
method
method test_domain_heat_entry_rejects_risk_above_1 L436–439
+
test_merge_readiness_response_defaults
method
method test_merge_readiness_response_defaults L424–429
+
test_below_critical_threshold_returns_high
method
method test_below_critical_threshold_returns_high L133–134
+
test_below_high_threshold_returns_medium
method
method test_below_high_threshold_returns_medium L127–128
+
test_below_low_threshold_returns_none
method
method test_below_low_threshold_returns_none L114–116
+
test_below_medium_threshold_returns_low
method
method test_below_medium_threshold_returns_low L121–122
+
test_exactly_critical_threshold_returns_critical
method
method test_exactly_critical_threshold_returns_critical L136–137
+
test_exactly_high_threshold_returns_high
method
method test_exactly_high_threshold_returns_high L130–131
+
test_exactly_low_threshold_returns_low
method
method test_exactly_low_threshold_returns_low L118–119
+
test_exactly_medium_threshold_returns_medium
method
method test_exactly_medium_threshold_returns_medium L124–125
−
test_no_slash_treats_whole_name_as_prefix
method
method test_no_slash_treats_whole_name_as_prefix L248–250
~
_band
0 comments
To add a comment, use the Muse CLI:
muse hub commit comment sha256:0614a3162653d62006dff44ec86e0fddc614adcbc0010fcc1af59f5af0347f68 --body "your comment"
No comments yet. Be the first to start the discussion.