Skip to content

feat(cabr): add consensus time range and receipt correlation reporting#583

Merged
Foundup merged 1 commit into
mainfrom
feat/cabr-consensus-phase5-time-correlation
May 13, 2026
Merged

feat(cabr): add consensus time range and receipt correlation reporting#583
Foundup merged 1 commit into
mainfrom
feat/cabr-consensus-phase5-time-correlation

Conversation

@Foundup
Copy link
Copy Markdown
Member

@Foundup Foundup commented May 13, 2026

Summary

Phase 5 read-only reporting helpers for CABR consensus audit trails:

  • Time-range queries: Inclusive start_time/end_time filtering with timezone-aware bounds
  • Receipt correlation: Query by receipt_id or job_id where available
  • Missing receipts: Reported but not inferred — empty slots flagged, not filled
  • Truth anomalies: Flagged in reports, not corrected in store

WSP 97 Truth Boundaries

  • Read-only reporting helpers only
  • No store mutation
  • No payout/DAO/final consensus inference
  • No default DB path
  • No external attestation dependency
  • Truth boundary anomalies flagged, not corrected

Test Coverage

  • 46 new tests for time correlation reporting
  • 48 existing Phase 4 reporting tests
  • 35 store tests
  • 26 finalizer persistence tests
  • 155 total tests passing

Changed Files

  • cabr_consensus_reporting.py — Time range + receipt correlation helpers
  • test_cabr_consensus_reporting_time_correlation.py — 46 focused tests
  • Phase 5 audit doc
  • ModLog + TestModLog updates

Slice: CABR_CONSENSUS_FINALIZATION_PHASE5_TIME_RANGE_RECEIPT_CORRELATION
Worker: W1

Co-Authored-By: Claude Opus 4.5 noreply@anthropic.com

Phase 5 of CABR consensus finalization - time-range query helpers and
receipt correlation for filtered audits and cross-referencing consensus
records to original CABR receipts.

New API:
- CABRTimeRangeFilter with validate() method
- query_consensus_records_by_time() for filtered queries
- CABRReceiptCorrelation and correlate_consensus_records_to_receipts()
- CABRReceiptCorrelationReport and generate_receipt_correlation_report()
- export_receipt_correlation_report_json() for deterministic JSON export

WSP 97: All truth fields remain False. Observability only.

Test coverage: 46 new tests, 245 total passing (no regressions)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@Foundup Foundup merged commit 16d56ef into main May 13, 2026
3 checks passed
@Foundup Foundup deleted the feat/cabr-consensus-phase5-time-correlation branch May 13, 2026 09:17
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