feat(cabr): add optional persistence to consensus finalization (Phase 3)#581
Merged
Merged
Conversation
Integrate optional caller-provided CABRConsensusStore persistence into CABR consensus finalization. When a store is provided, records are automatically persisted after finalization. WSP 97 Critical: Auto-persist means storing the review-only record when a store is explicitly provided. It does NOT mean state progression, payout approval, DAO activation, or truth field mutation. Changes: - Add optional `store` parameter to finalize_cabr_consensus() - Add optional `store` parameter to finalize_cabr_consensus_batch() - Add finalize_cabr_consensus_with_result() for explicit persistence status - Add finalize_cabr_consensus_batch_with_results() for batch with status - Add CABRConsensusFinalizeResult dataclass for persistence status - No default DB path (caller must provide store explicitly) - Store failures logged but do not block record return - Duplicate record_id handled as idempotent (ALREADY_EXISTS) Test coverage: 26 new tests, 192 total tests passing (no regression) Slice: CABR_CONSENSUS_FINALIZATION_PHASE3_AUTO_PERSIST_INTEGRATION Worker: W1 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.
Summary
storeparameter added to finalize_cabr_consensus/batch functionsWSP 97 Compliance
Test plan
Slice: CABR_CONSENSUS_FINALIZATION_PHASE3_AUTO_PERSIST_INTEGRATION
Worker: W10
🤖 Generated with Claude Code