feat(verdicts): promoted verdicts carry a verified field with the actor verbatim

Co-Authored-By: Claude <claude-opus-5>
This commit is contained in:
Kjell Tore Guttormsen 2026-09-02 20:29:32 +02:00
commit 3d76a46d76
3 changed files with 170 additions and 1 deletions

View file

@ -697,6 +697,10 @@ def promote_verdict(
"verdict_id": verdict.id,
"provenance": f"godkjent av {approver}; eksperiment {experiment}; {timestamp}",
"timestamp": timestamp,
# SPEC §5.2 provenance, reusing the EXISTING required ``timestamp`` keyword so no
# wall-clock default sneaks in. The approver is written verbatim: a scripted stand-in lands
# in ``machine-confirmed``, which is true of it.
"verified": okf.verified_field(approver, timestamp),
"tags": "[verdict, promoted, HITL]",
}
codes = ", ".join(sorted(f.affected_codes))