refactor
BREAKING
harmony
task/harmony-decompose
#6 / 13
refactor(harmony): Phase 7 — extract policies.py
Move policy serialisation, CRUD, and matching logic out of the harmony god-object into muse/core/harmony/policies.py.
- policies.py: _MAX_POLICY_BYTES, _MAX_POLICIES, _policy_condition_to_dict, _policy_to_dict, _dict_to_policy, save_policy, load_policy, list_policies, remove_policy, _condition_matches, match_policy - __init__.py: re-exports extracted symbols; fnmatch import removed (no longer used after policy matching moved out)
707/707 harmony tests green.
sha256:42ccf3b0a358cb985acab8d086d9cff35f61b8f647fa4639e523151b277ba864
sha
+42
−12
symbols
sha256:bf7f0fb917f651b184c1952ce65fb1348270a58c8aa94445c7feaa0ad0a05393
snapshot
+42
symbols added
−12
symbols removed
0
dead code introduced
Semantic Changes
54 symbols
+
_MAX_POLICY_BYTES
variable
variable _MAX_POLICY_BYTES L33–33 ← moved from muse/core/harmony/__init__.py
+
_condition_matches
function
function _condition_matches L231–253 ← moved from muse/core/harmony/__init__.py
+
_dict_to_policy
function
function _dict_to_policy L64–88 ← moved from muse/core/harmony/__init__.py
+
_policy_condition_to_dict
function
function _policy_condition_to_dict L42–48 ← moved from muse/core/harmony/__init__.py
+
_policy_to_dict
function
function _policy_to_dict L50–62 ← moved from muse/core/harmony/__init__.py
−
_MAX_POLICY_BYTES
variable
variable _MAX_POLICY_BYTES L200–200 → moved to muse/core/harmony/policies.py
−
_condition_matches
function
function _condition_matches L399–421 → moved to muse/core/harmony/policies.py
−
_dict_to_policy
function
function _dict_to_policy L234–258 → moved to muse/core/harmony/policies.py
−
_policy_condition_to_dict
function
function _policy_condition_to_dict L212–218 → moved to muse/core/harmony/policies.py
−
_policy_to_dict
function
function _policy_to_dict L220–232 → moved to muse/core/harmony/policies.py
Older
refactor(harmony): Phase 6 — extract audit.py
sha256:f85ef10979de86932a635d67bc0363742979e3d858f64b84f225f9a3368f5b01
All commits
Newer
refactor(harmony): Phase 8 — extract escalations + engine into p…
sha256:340607e5ffa9f61ae5150b14dde6ebfa3085efe24cba3d01840a765e244f97f2
0 comments
To add a comment, use the Muse CLI:
muse hub commit comment sha256:42ccf3b0a358cb985acab8d086d9cff35f61b8f647fa4639e523151b277ba864 --body "your comment"
No comments yet. Be the first to start the discussion.