feat
patch
harmony
task/code-harmony-plugin
#1 / 1
feat(harmony): code domain plugin — normalized token-bag fingerprint + Tanimoto similarity
- muse/core/plugins/code_harmony.py: CodePlugin (HarmonyPlugin Protocol), code_fingerprint() (Python tokenize + regex fallback, sorted token-bag), Tanimoto coefficient on token multisets, 512 KiB input guard - muse/core/harmony.py: _validate_fingerprint() (non-empty, no null bytes, ≤4 KiB) replacing hex64 requirement for semantic_fingerprint field - harmony CLI: --semantic-fingerprint now accepts any valid fingerprint string (token-bag or hex64) — no breaking change for existing callers - 548/548 tests green
sha256:507c3a1973c87fec6ce0deff8bcb4dcb540bd31829800b3dc7f2955329a76b19
sha
+120
~37
symbols
sha256:5a5fc012c5452d1af12ba1220dfd851b6357d63111f26777525e82d65e1739e6
snapshot
+120
symbols added
~37
symbols modified
0
dead code introduced
Semantic Changes
157 symbols
+
test_cli_accepts_code_fingerprint_as_semantic
method
method test_cli_accepts_code_fingerprint_as_semantic L639–664
+
test_validate_fingerprint_accepts_hex64
method
method test_validate_fingerprint_accepts_hex64 L620–622
+
test_validate_fingerprint_accepts_token_string
method
method test_validate_fingerprint_accepts_token_string L615–618
+
test_validate_fingerprint_rejects_empty
method
method test_validate_fingerprint_rejects_empty L624–627
+
test_validate_fingerprint_rejects_null_byte
method
method test_validate_fingerprint_rejects_null_byte L629–632
+
test_validate_fingerprint_rejects_oversized
method
method test_validate_fingerprint_rejects_oversized L634–637
+
test_single_quoted_strings_become_STR
method
method test_single_quoted_strings_become_STR L162–164
+
test_same_assignment_different_names_high
method
method test_same_assignment_different_names_high L242–245
+
test_same_import_different_module_is_1
method
method test_same_import_different_module_is_1 L237–240
+
test_same_structure_different_names_is_1
method
method test_same_structure_different_names_is_1 L231–235
+
test_fingerprint_deterministic_across_calls
method
method test_fingerprint_deterministic_across_calls L476–479
+
test_code_plugin_satisfies_harmony_plugin_protocol
method
method test_code_plugin_satisfies_harmony_plugin_protocol L376–378
+
test_dissimilar_patterns_not_proposed
method
method test_dissimilar_patterns_not_proposed L359–374
+
test_engine_finds_similar_code_patterns
method
method test_engine_finds_similar_code_patterns L333–357
+
test_partial_match_above_threshold_proposed
method
method test_partial_match_above_threshold_proposed L380–399
+
test_find_similar_20_patterns_under_100ms
method
method test_find_similar_20_patterns_under_100ms L587–604
+
test_fingerprint_100_functions_under_100ms
method
method test_fingerprint_100_functions_under_100ms L569–577
+
test_fingerprint_typical_function_under_10ms
method
method test_fingerprint_typical_function_under_10ms L554–567
+
test_binary_looking_text_does_not_raise
method
method test_binary_looking_text_does_not_raise L520–523
+
test_similarity_of_large_fingerprints
method
method test_similarity_of_large_fingerprints L422–429
0 comments
To add a comment, use the Muse CLI:
muse hub commit comment sha256:507c3a1973c87fec6ce0deff8bcb4dcb540bd31829800b3dc7f2955329a76b19 --body "your comment"
No comments yet. Be the first to start the discussion.