feat: introduce EVENT_INDEXED_V3 topic with dual-emit migration path#494
Open
Sendi0011 wants to merge 2 commits into
Open
feat: introduce EVENT_INDEXED_V3 topic with dual-emit migration path#494Sendi0011 wants to merge 2 commits into
Sendi0011 wants to merge 2 commits into
Conversation
- Add EVENT_INDEXED_V3 topic constant (ev_idx3) and EventIndexTopicV3 struct with _reserved field for future additive fields (share_class, tax_bucket, etc.) - Bump INDEXER_EVENT_SCHEMA_VERSION from 2 to 3 - Add emit_v2_and_v3() helper that publishes both V2 and V3 indexed events - Update all 6 state-changing entries (register_offering, report_revenue init/ override/reject/generic, claim) to dual-emit V2+V3 via the helper - Update get_indexer_fixture_topics() to return (v2_fixtures, v3_fixtures) tuple - Add V2->V3 migration table and deprecation policy to README and docs - Add test_event_indexed_v3.rs with dual-emission and backward-compat tests - Update test_indexer_fixtures.rs for V3 fixture assertions - Update test_security_doc_sync.rs idx_sch assertion to 3 - V2 events continue to emit unchanged at ev_idx2 during the deprecation window Closes RevoraOrg#462
- Resolve conflict in get_indexer_fixture_topics: adopt HEAD's V2+V3 tuple return type with master's expanded 15-event-type fixture set - Resolve conflict in test_indexer_fixtures.rs: keep V3 assertions with master's 15-item expected count and additional event_type checks - Resolve conflict in docs/core-event-version-field.md: merge V3 migration documentation with master's success criteria text - Remove duplicate second claim function from merged impl block - Replace remaining direct EVENT_INDEXED_V2 publishes with emit_v2_and_v3 in event_only rev_init, rev_ovr, and rev_omiss paths
|
@Sendi0011 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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
Introduces explicit topic-versioning for indexed events. V3 fields (e.g.
share_class,tax_bucket) will land additively without breaking V2 subscribers, and the deprecation policy is documented.Changes
New
EventIndexTopicV3struct with_reserved: u32field for additive schema evolutionEVENT_INDEXED_V3topic constant (ev_idx3)emit_v2_and_v3()helper: dual-emits V2 (unchanged) + V3 events from all state-changing entriestest_event_indexed_v3.rs: coverage for dual emission and V2-only backward compatibilityModified
register_offering,report_revenueinit/override/reject/generic,claim) now callemit_v2_and_v3get_indexer_fixture_topics()returns(Vec<EventIndexTopicV2>, Vec<EventIndexTopicV3>)tupleINDEXER_EVENT_SCHEMA_VERSIONfrom 2 → 3test_security_doc_sync.rsidx_schassertion from 2 → 3Deprecation Policy
V2 events continue to emit at
ev_idx2for at least two contract minor versions after V3 introduction. V2-only subscribers are safe during this window.Closes #462