feat: complete verifiable birth-time rectification flow

This commit is contained in:
Jesse_Chen
2026-07-21 22:16:18 +08:00
parent eb8ed8bee4
commit bfc6870614
117 changed files with 6215 additions and 1038 deletions
+4
View File
@@ -14,12 +14,14 @@ from uuid import NAMESPACE_URL, uuid5
from scripts.dynamic_rectification_opportunities import (
ALGORITHM_VERSION,
OPPORTUNITY_MODEL_VERSION,
SUPPORTED_DIMENSIONS,
candidate_times,
candidate_window_rows,
canonical_hash,
compute_candidate_model,
experience_windows,
historical_event_fingerprint,
opportunities,
validate_candidate_model,
)
@@ -59,6 +61,8 @@ def build_difference_packet(request: dict) -> dict:
model = (
_compute_candidate_model(request)
if persisted is None
or persisted.get("opportunity_model_version") != OPPORTUNITY_MODEL_VERSION
or persisted.get("historical_event_fingerprint") != historical_event_fingerprint(request)
else _validate_candidate_model(persisted, request)
)
dismissed = set(request.get("dismissed_opportunity_ids", []))