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

test(proposals): Phase 1 — 43 tests for enums, models, ORM columns, dependency DAG, simulation cache

Covers: - ProposalType / ProposalState / MergeStrategy enum values and str behaviour - MergeConditions validation bounds (require_approvals ≥ 0, risk scores [0,1]) - ProposalCommentTarget domain fields and note_pitch bounds (0–127) - DimensionalRiskVector type alias - ProposalCreate / ProposalResponse new-field defaults and camelCase JSON round-trip - MusehubProposal 15 new ORM columns: default and explicit round-trip - MusehubProposalReview 3 new ORM columns - MusehubProposalDependency: edge creation, duplicate unique constraint, cascade delete - MusehubProposalSimulation: storage, duplicate type constraint, three types coexist

sha256:1a8a127ab769198fb116b4786cb4ea9a54670028e9de1711b007e2ef6d7578e6 sha
+75 symbols
sha256:59f58ea9d266f74f50eecafc15de39b6664cdcaae839697b2c59ee28c9860392 snapshot
+75
symbols added
0
dead code introduced
Semantic Changes 75 symbols
+ TestDimensionalRiskVector class class TestDimensionalRiskVector L252–260
+ test_empty_vector_is_valid method method test_empty_vector_is_valid L258–260
+ test_is_dict_alias method method test_is_dict_alias L253–256
+ TestMergeConditions class class TestMergeConditions L145–185
+ test_defaults method method test_defaults L146–156
+ test_max_agent_commit_ratio_clamped method method test_max_agent_commit_ratio_clamped L172–176
+ test_max_risk_score_clamped method method test_max_risk_score_clamped L164–170
+ test_require_approvals_non_negative method method test_require_approvals_non_negative L158–162
+ test_require_domains_approved_list method method test_require_domains_approved_list L178–180
+ test_round_trip_json method method test_round_trip_json L182–185
+ TestMergeStrategyEnum class class TestMergeStrategyEnum L130–137
+ test_all_five_values_exist method method test_all_five_values_exist L131–133
+ test_is_str_subclass class method test_is_str_subclass L135–137
+ TestMusehubProposalDependencyORM class class TestMusehubProposalDependencyORM L499–571
+ test_cascade_delete_on_proposal_delete method async_method test_cascade_delete_on_proposal_delete L546–571
+ test_dependency_edge_created method async_method test_dependency_edge_created L501–519
+ test_duplicate_edge_raises method async_method test_duplicate_edge_raises L522–543
+ TestMusehubProposalORM class class TestMusehubProposalORM L373–445
+ test_new_columns_default_values method async_method test_new_columns_default_values L375–394
+ test_new_columns_explicit_values method async_method test_new_columns_explicit_values L397–445
+ TestMusehubProposalReviewORM class class TestMusehubProposalReviewORM L448–496
+ test_new_review_columns_defaults method async_method test_new_review_columns_defaults L450–470
+ test_new_review_columns_explicit method async_method test_new_review_columns_explicit L473–496
+ TestMusehubProposalSimulationORM class class TestMusehubProposalSimulationORM L574–651
+ test_duplicate_simulation_type_raises method async_method test_duplicate_simulation_type_raises L600–625
+ test_simulation_stored_and_retrieved method async_method test_simulation_stored_and_retrieved L576–597
+ test_three_simulation_types_coexist method async_method test_three_simulation_types_coexist L628–651
+ TestProposalCommentTarget class class TestProposalCommentTarget L193–244
+ test_code_domain_fields method method test_code_domain_fields L199–208
+ test_default_target_type_is_general method method test_default_target_type_is_general L194–197
+ test_identity_domain_field method method test_identity_domain_field L233–235
+ test_midi_domain_fields method method test_midi_domain_fields L210–219
+ test_note_pitch_bounds method method test_note_pitch_bounds L221–227
+ test_payment_domain_field method method test_payment_domain_field L229–231
+ test_stem_domain_fields method method test_stem_domain_fields L237–244
+ TestProposalCreateNewFields class class TestProposalCreateNewFields L268–326
+ _minimal method method _minimal L269–270
+ test_camel_json_round_trip method method test_camel_json_round_trip L309–321
+ test_defaults_for_new_fields method method test_defaults_for_new_fields L272–279
+ test_depends_on_list method method test_depends_on_list L304–307
+ test_domain_selective_strategy method method test_domain_selective_strategy L295–302
+ test_existing_fields_unchanged method method test_existing_fields_unchanged L323–326
+ test_is_draft_set method method test_is_draft_set L285–287
+ test_merge_conditions_set method method test_merge_conditions_set L289–293
+ test_proposal_type_set method method test_proposal_type_set L281–283
+ TestProposalResponseNewFields class class TestProposalResponseNewFields L334–365
+ _base method method _base L335–344
+ test_defaults_present method method test_defaults_present L346–355
+ test_dimensional_risk_round_trip method method test_dimensional_risk_round_trip L357–359
+ test_risk_score_bounds method method test_risk_score_bounds L361–365
+ TestProposalStateEnum class class TestProposalStateEnum L120–127
+ test_all_seven_values_exist method method test_all_seven_values_exist L121–123
+ test_is_str_subclass class method test_is_str_subclass L125–127
+ TestProposalTypeEnum class class TestProposalTypeEnum L101–117
+ test_all_seven_values_exist method method test_all_seven_values_exist L102–108
+ test_is_str_subclass class method test_is_str_subclass L110–112
+ test_json_serialises_as_plain_string method method test_json_serialises_as_plain_string L114–117
+ _make_proposal function async_function _make_proposal L76–93
+ _make_repo function async_function _make_repo L52–73
+ _now function function _now L44–45
+ _uid function function _uid L48–49
+ AsyncSession import import AsyncSession L25–25
+ DimensionalRiskVector import import DimensionalRiskVector L27–27
+ MergeConditions import import MergeConditions L27–27
+ MergeStrategy import import MergeStrategy L27–27
+ ProposalCommentTarget import import ProposalCommentTarget L27–27
+ ProposalCreate import import ProposalCreate L27–27
+ ProposalResponse import import ProposalResponse L27–27
+ ProposalState import import ProposalState L27–27
+ ProposalType import import ProposalType L27–27
+ annotations import import annotations L19–19
+ datetime import import datetime L22–22
+ pytest import import pytest L24–24
+ timezone import import timezone L22–22
+ uuid import import uuid L21–21

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:1a8a127ab769198fb116b4786cb4ea9a54670028e9de1711b007e2ef6d7578e6 --body "your comment"