Add compiled_action type and governance event promotion#11
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 14011c645f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if recordType == "compiled_action" { | ||
| if _, ok := eventPayload["gate_verdict"]; !ok { | ||
| eventPayload["gate_verdict"] = strings.TrimSpace(event.Verdict) |
There was a problem hiding this comment.
Handle
pending verdict before mapping script events
ValidateGovernanceEvent accepts verdict: "pending", but NewRecordFromEvent unconditionally copies any non-empty event.Verdict into gate_verdict for script_evaluation events. This produces a compiled_action record that fails schema validation because gate_verdict does not allow pending, so a governance event that passes validation cannot be promoted. This breaks the documented validate-then-promote flow for pending script evaluations.
Useful? React with 👍 / 👎.
Summary
compiled_actionproof record type schema and registry entryNewRecordFromEventpromotion helperValidation