Fix Governor idempotency and #350 human-gating#35
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7d0d333dab
ℹ️ 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".
| return None | ||
| prefix = f"{_slug(record.repo)}-{record.issue_number}-*.json" | ||
| signature = stable_decision_signature(record) | ||
| for path in sorted(root.glob(prefix)): |
There was a problem hiding this comment.
Use only the latest prior decision for idempotency
When an issue has an earlier approved record, is later edited to a different decision, and then is reverted while the Knowledge pack id/export has rotated, this scan can return the old matching JSON file even though a newer conflicting Reliability Decision Record comment exists. governor_once then skips reposting or just reapplies labels, but the daemon consumes the latest trusted Decision Record comment, so the issue can be labeled loop:approved while the daemon still sees the later needs_human/stale record and refuses to run it. Treat a match as idempotent only if it is the newest decision for that issue, or post a fresh record when newer conflicting records exist.
Useful? React with 👍 / 👎.
Summary
Checks