Skip to content

fix(outcome): preserve colliding decision receipts - #603

Merged
solomonneas merged 1 commit into
mainfrom
fix/564-collision-safe-receipts
Jul 28, 2026
Merged

fix(outcome): preserve colliding decision receipts#603
solomonneas merged 1 commit into
mainfrom
fix/564-collision-safe-receipts

Conversation

@solomonneas

Copy link
Copy Markdown
Collaborator

Summary

  • Give outcome decision receipts collision-resistant filenames even when decisions share a second or artifact IDs normalize to the same slug.
  • Publish fully written JSON through an exclusive hard link, so concurrent writers cannot replace an existing receipt and readers never observe partial JSON.
  • Keep loading legacy second-resolution receipt filenames through the existing *.json discovery path.

Root cause

Decision receipt paths used a second-resolution timestamp plus a lossy artifact slug. The mutable JSON helper then published with os.replace, so a later decision selecting the same path silently replaced the earlier receipt.

Verification

  • RED receipt 20260728-025815-work-verify-492587: 5 collision and exclusivity tests failed against the previous production behavior.
  • GREEN receipt 20260728-030103-work-verify-35a8c4: deterministic slug collisions, atomic publication, 8 concurrent fixed-path writers, concurrent decision-writer retries, retry exhaustion, and legacy loading passed.
  • Focused suite receipt 20260728-025848-work-verify-cf2722: 119 outcome and scorecard tests passed.
  • Full gate receipt 20260728-030128-work-verify-e1e0e0: 4,662 passed, 3 skipped, 82.93% coverage, with one shared editable-install failure in test_verify_reused_receipt_stamps_harness_session_from_outer_env_prefix.
  • Clean origin/main baseline receipt 20260728-031031-work-verify-7a5022: the same isolated test failed with the same No module named brigade stderr under the shared virtualenv override. The test was not changed or skipped. CI's clean install is the deciding gate.
  • Independent review after the atomic-publication fix found no Critical, Important, or Minor findings.

Closes #564

Co-Authored-By: Codex <codex@openai.com>
@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • coderabbit-review

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository: escoffier-labs/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 2e46e7fb-bfff-4f9e-8f40-03934eecb11d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/564-collision-safe-receipts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@solomonneas solomonneas self-assigned this Jul 28, 2026
@solomonneas
solomonneas merged commit df0db63 into main Jul 28, 2026
28 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.

outcome: make decision receipt filenames collision-safe and write-exclusive

1 participant