Repository navigation
fix: verify publication history and reconcile existing review effects - #235
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A publisher run that stopped before posting or skipped execution could leave no attempt artifact. The previous workflow-wide history scan treated that missing record as unresolved for later PRs and counted runs created before the PR. A publisher rerun also could not confirm an existing exact review when receipt history was incomplete.
The opt-in v4 policy queries history from the authenticated PR creation time, validates every returned timestamp, and supports durable run-bound records proving this attempt never invoked review submission. It can also reconcile at most four exact operator-audited historical attempts; templates contain no production exceptions. Records bind to their own run’s validated policy and publisher source, so later legitimate policy edits do not invalidate valid earlier records. Missing, expired, contradictory, or unacknowledged evidence remains UNKNOWN.
Complete, bounded review pagination can confirm one existing effect matching the head, marker, body hash, actor and review state without another POST. New publication still requires complete applicable history, a fresh head and an acknowledged pre-POST intent receipt. The early no-effect capability cannot publish reviews; persistence uses the original remaining deadline and runs at most once. v1–v3 behavior remains unchanged, and no model, provider, profile, budget or disposition configuration changes.
Validation: 177 focused publication/history/frozen-runtime tests passed; independent review and focused checks passed; 48 atomic-pin tests, Ruff and diff checks passed. Realistic fixtures cover GitHub artifact metadata without an attempt field, known attempt-1 API proof, source failures before submission, recovery upload failure, historical policy A under current policy B, and skipped-job near misses. Long-lived PRs can still reach configured history/retention bounds; this remains fail-closed and is documented. Deployed publication/readback/replay are separate staged-rollout checks.