Skip to content

feat: introduce EVENT_INDEXED_V3 topic with dual-emit migration path#494

Open
Sendi0011 wants to merge 2 commits into
RevoraOrg:masterfrom
Sendi0011:feat/event-indexed-v3
Open

feat: introduce EVENT_INDEXED_V3 topic with dual-emit migration path#494
Sendi0011 wants to merge 2 commits into
RevoraOrg:masterfrom
Sendi0011:feat/event-indexed-v3

Conversation

@Sendi0011

Copy link
Copy Markdown
Contributor

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

  • EventIndexTopicV3 struct with _reserved: u32 field for additive schema evolution
  • EVENT_INDEXED_V3 topic constant (ev_idx3)
  • emit_v2_and_v3() helper: dual-emits V2 (unchanged) + V3 events from all state-changing entries
  • test_event_indexed_v3.rs: coverage for dual emission and V2-only backward compatibility
  • Migration table in README and docs mapping V2 → V3 fields with deprecation policy

Modified

  • All 6 emission sites (register_offering, report_revenue init/override/reject/generic, claim) now call emit_v2_and_v3
  • get_indexer_fixture_topics() returns (Vec<EventIndexTopicV2>, Vec<EventIndexTopicV3>) tuple
  • Bumped INDEXER_EVENT_SCHEMA_VERSION from 2 → 3
  • Updated fixture tests for V3 assertions
  • Updated test_security_doc_sync.rs idx_sch assertion from 2 → 3

Deprecation Policy

V2 events continue to emit at ev_idx2 for at least two contract minor versions after V3 introduction. V2-only subscribers are safe during this window.

Closes #462

- 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
@drips-wave

drips-wave Bot commented Jun 29, 2026

Copy link
Copy Markdown

@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! 🚀

Learn more about application limits

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.

Add indexer event-topic versioning with EVENT_INDEXED_V3 schema migration path

1 participant