Skip to content

Commit 2fb254f

Browse files
authored
Refactor obligation pressure constants and methods
1 parent dea54d0 commit 2fb254f

1 file changed

Lines changed: 4 additions & 12 deletions

File tree

src/ix_cognition_kernel/wave6_ix_obligation_pressure.py

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,7 @@ class WaveSixIxObligationPressureDecision(StrEnum):
5151
"""Fail-closed decision for imported IX obligation pressure."""
5252

5353
NEEDS_MORE_EVIDENCE = "needs-more-evidence"
54-
BLOCKED_BY_MISSING_OBLIGATION_EVIDENCE = (
55-
"blocked-by-missing-obligation-evidence"
56-
)
54+
BLOCKED_BY_MISSING_OBLIGATION_EVIDENCE = "blocked-by-missing-obligation-evidence"
5755

5856

5957
class WaveSixIxObligationPressureStatus(StrEnum):
@@ -105,13 +103,9 @@ class WaveSixIxObligationPressureStatus(StrEnum):
105103
}
106104
)
107105

108-
_TRANSFER_OBLIGATION_IDS: frozenset[str] = frozenset(
109-
{"cross_domain_transfer_probe"}
110-
)
106+
_TRANSFER_OBLIGATION_IDS: frozenset[str] = frozenset({"cross_domain_transfer_probe"})
111107

112-
_NOVELTY_OBLIGATION_IDS: frozenset[str] = frozenset(
113-
{"novelty_generality_pressure"}
114-
)
108+
_NOVELTY_OBLIGATION_IDS: frozenset[str] = frozenset({"novelty_generality_pressure"})
115109

116110
_CONTRADICTION_OBLIGATION_IDS: frozenset[str] = frozenset(
117111
{
@@ -603,7 +597,5 @@ def _require_sha256(value: str, label: str) -> str:
603597
def _stable_sha256(payload: Mapping[str, Any]) -> str:
604598
"""Return deterministic SHA-256 over a canonical JSON payload."""
605599

606-
encoded = json.dumps(payload, sort_keys=True, separators=(",", ":")).encode(
607-
"utf-8"
608-
)
600+
encoded = json.dumps(payload, sort_keys=True, separators=(",", ":")).encode("utf-8")
609601
return hashlib.sha256(encoded).hexdigest()

0 commit comments

Comments
 (0)