Skip to content

fix: verify publication history and reconcile existing review effects - #235

Merged
magnus919 merged 3 commits into
mainfrom
codex/publication-history-recovery
Oct 11, 2026
Merged

magnus919 merged 3 commits into
mainfrom
codex/publication-history-recovery

Conversation

@magnus919

Copy link
Copy Markdown
Contributor

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.

@magnus919
magnus919 merged commit 2f520e8 into main Oct 11, 2026
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant