fix(rectification): enforce director evidence boundaries

This commit is contained in:
Jesse_Chen
2026-07-31 06:13:47 +08:00
parent 77b0079653
commit bab5647afc
21 changed files with 795 additions and 98 deletions
@@ -54,14 +54,6 @@ DOMAIN_CONFIG: Final[dict[EventDomain, DomainConfig]] = {
"finance": (("D2", "D11"), (2, 11)),
"health_pressure": (("D30",), (6, 8, 12)),
}
# ponytail: non-semantic audit offsets; replace only when calibrated kind rules exist.
EVENT_KIND_MODIFIERS: Final[dict[str, float]] = {
"relationship_start": 0.001,
"relationship_end": 0.002,
"relationship_change": 0.003,
}
class RectificationEventCalculationError(RuntimeError):
"""Raised when stored rectification evidence cannot be calculated safely."""
@@ -246,7 +238,6 @@ def _score_event(
if not rules:
rules.append("no_domain_activation")
rules.append(f"event_kind:{event_kind}")
points += EVENT_KIND_MODIFIERS.get(event_kind, 0.0)
weighted_points = round(points * precision_weight(event["precision"]), 4)
return {
"event_id": event["id"],