feat
BREAKING
harmony
task/harmony-phase3
#1 / 1
feat(harmony): Phase 3 — three-tier resolution engine
- harmony_engine.py: EngineStatus, HarmonyPlugin protocol, DefaultPlugin, EngineConfig (thresholds + limits), EngineResult (frozen dataclass), find_similar() (semantic search, plugin-extensible, capped at max_proposals), resolve() (four-tier pipeline: policy → exact replay → semantic → escalate) - harmony.py: add AuditEventType.ESCALATION_RECORDED constant - harmony.py CLI: _HarmonyEngineJson + _HarmonySimilarJson TypedDicts, engine subcommand (run_engine), similar subcommand (run_similar) - 364/364 tests green (Phase 1 + 2 + 3 engine + 3 CLI)
sha256:e85d7e2f58b6dfc4693fc15a24f365328e1b7243fddda8f6b98fb84edc01e81e
sha
+238
~2
symbols
sha256:5b4518b6e3b5e4c25981242bb6a2272b157d67331f5b8e12ef8c14c0105303ca
snapshot
+238
symbols added
~2
symbols modified
0
dead code introduced
Semantic Changes
240 symbols
+
test_engine_applied_applied_resolution_id_is_hex64
method
method test_engine_applied_applied_resolution_id_is_hex64 L420–426
+
test_engine_escalated_fields_all_present
method
method test_engine_escalated_fields_all_present L412–418
+
test_engine_proposed_proposal_confidence_in_range
method
method test_engine_proposed_proposal_confidence_in_range L434–440
+
test_similar_empty_proposals_is_list_not_null
method
method test_similar_empty_proposals_is_list_not_null L428–432
+
test_exact_replay_increments_applied_count_via_cli
method
method test_exact_replay_increments_applied_count_via_cli L376–384
+
test_engine_invalid_threshold_exits_1
method
method test_engine_invalid_threshold_exits_1 L317–324
+
test_engine_negative_threshold_exits_1
method
method test_engine_negative_threshold_exits_1 L326–333
+
test_engine_nonexistent_id_exits_0_escalated
method
method test_engine_nonexistent_id_exits_0_escalated L311–315
+
test_engine_escalated_via_escalate_policy
method
method test_engine_escalated_via_escalate_policy L232–237
+
test_engine_escalates_no_policy_no_resolution
method
method test_engine_escalates_no_policy_no_resolution L170–177
+
test_engine_proposed_via_policy_low_confidence
method
method test_engine_proposed_via_policy_low_confidence L224–230
+
test_similar_nonexistent_exits_0_empty
method
method test_similar_nonexistent_exits_0_empty L343–347
+
test_similar_entry_has_required_fields
method
method test_similar_entry_has_required_fields L266–275
+
test_similar_finds_shared_semantic_fingerprint
method
method test_similar_finds_shared_semantic_fingerprint L252–264
+
test_engine_json_has_applied_resolution_id
method
method test_engine_json_has_applied_resolution_id L134–135
+
test_engine_json_has_escalation_reason
method
method test_engine_json_has_escalation_reason L137–138
+
test_applied_result_has_no_escalation_reason
method
method test_applied_result_has_no_escalation_reason L859–865
+
test_engine_result_is_json_serialisable
method
method test_engine_result_is_json_serialisable L893–899
+
test_engine_result_pattern_id_matches_input
method
method test_engine_result_pattern_id_matches_input L876–880
+
test_escalated_result_fields_complete
method
method test_escalated_result_fields_complete L848–857
+
test_exact_replay_applied_writes_audit
method
method test_exact_replay_applied_writes_audit L682–694
+
test_find_similar_below_threshold_excluded
method
method test_find_similar_below_threshold_excluded L374–385
+
test_find_similar_respects_max_proposals
method
method test_find_similar_respects_max_proposals L357–372
+
test_find_similar_returns_semantically_matching_pattern
method
method test_find_similar_returns_semantically_matching_pattern L317–335
+
test_find_similar_sorted_by_confidence_desc
method
method test_find_similar_sorted_by_confidence_desc L337–355
+
test_find_similar_100_patterns_under_500ms
method
method test_find_similar_100_patterns_under_500ms L998–1010
+
test_plugin_returning_out_of_range_similarity_clamped
method
method test_plugin_returning_out_of_range_similarity_clamped L928–947
+
test_resolve_safe_with_nonexistent_root
method
method test_resolve_safe_with_nonexistent_root L955–959
+
test_engine_with_100_patterns_completes
method
method test_engine_with_100_patterns_completes L777–796
+
test_escalation_has_no_applied_resolution
method
method test_escalation_has_no_applied_resolution L638–643
+
test_no_policy_no_resolution_escalates
method
method test_no_policy_no_resolution_escalates L629–636
+
test_exact_replay_increments_applied_count
method
method test_exact_replay_increments_applied_count L543–554
+
test_exact_replay_prefers_highest_quality_resolution
method
method test_exact_replay_prefers_highest_quality_resolution L556–568
+
test_high_confidence_resolution_auto_applied
method
method test_high_confidence_resolution_auto_applied L511–519
+
test_human_verified_always_auto_applied
method
method test_human_verified_always_auto_applied L521–529
+
test_low_confidence_resolution_proposed
method
method test_low_confidence_resolution_proposed L531–541
+
test_policy_below_threshold_returns_proposed
method
method test_policy_below_threshold_returns_proposed L424–433
+
test_policy_delegate_returns_escalated
method
method test_policy_delegate_returns_escalated L459–471
+
test_policy_domain_filter_does_not_fire_for_wrong_domain
method
method test_policy_domain_filter_does_not_fire_for_wrong_domain L473–483
+
test_policy_escalate_action_returns_escalated
method
method test_policy_escalate_action_returns_escalated L435–448
+
test_policy_prefer_ours_above_threshold_returns_applied
method
method test_policy_prefer_ours_above_threshold_returns_applied L396–410
+
test_policy_prefer_theirs_above_threshold_returns_applied
method
method test_policy_prefer_theirs_above_threshold_returns_applied L412–422
+
test_policy_require_human_returns_escalated
method
method test_policy_require_human_returns_escalated L450–457
+
test_workspace_policy_fires_before_repo_policy
method
method test_workspace_policy_fires_before_repo_policy L485–505
+
test_custom_plugin_similarity_drives_semantic_match
method
method test_custom_plugin_similarity_drives_semantic_match L604–623
+
test_semantic_match_below_threshold_escalates
method
method test_semantic_match_below_threshold_escalates L592–602
~
register
0 comments
To add a comment, use the Muse CLI:
muse hub commit comment sha256:e85d7e2f58b6dfc4693fc15a24f365328e1b7243fddda8f6b98fb84edc01e81e --body "your comment"
No comments yet. Be the first to start the discussion.