Skip to content

Allow idempotent replay of a bound security receipt - #223

Merged
saagpatel merged 1 commit into
mainfrom
codex/pdc-same-receipt-replay-20260805
Aug 5, 2026
Merged

Allow idempotent replay of a bound security receipt#223
saagpatel merged 1 commit into
mainfrom
codex/pdc-same-receipt-replay-20260805

Conversation

@saagpatel

@saagpatel saagpatel commented Aug 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • allow a prior PortfolioTruth generated after a security receipt only when receipt ID, content digest, and producer commit all match exactly
  • preserve the fail-closed timestamp rejection for every different or incomplete binding
  • add regression coverage for the live same-receipt race and all three mismatch dimensions

Live failure

An out-of-window controlled cycle correctly reached the current producer, but a concurrent truth publication used the same immutable security receipt 44 ms after its produced_at timestamp. The next replay failed with: Prior PortfolioTruth was generated after the current security receipt.

Verification

  • 5 focused prior-security-loader tests passed
  • 140 portfolio-truth tests passed
  • full suite: 3504 passed, 2 skipped
  • Ruff: all checks passed
  • exact live artifact reproduction: 11 prior alerts and 11 cohort repositories loaded from the same receipt
  • scoped mypy remains at the identical inherited baseline of 51 errors in 7 files

portfolio_catalog: Path,
legacy_registry: Path,
) -> None:
import src.portfolio_truth_publish as publish_mod
portfolio_catalog: Path,
legacy_registry: Path,
) -> None:
import src.portfolio_truth_publish as publish_mod
@saagpatel
saagpatel merged commit 650f8d9 into main Aug 5, 2026
4 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.

2 participants