Create EVENT_SCHEMA.md#885
Merged
greatest0fallt1me merged 1 commit intoJul 24, 2026
Merged
Conversation
|
@karanjakevin39-collab 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! 🚀 |
Contributor
|
LGTM ✅ nice iteration. Thanks! |
4 tasks
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
Adds
docs/EVENT_SCHEMA.md, a structured reference documenting every eventemitted by the
predictify-hybridcontract: topic (SorobanSymbolkey),full payload schema, and a stability guarantee per event.
Closes #837
What's covered
Oracle, Dispute & Governance, Fees & Treasury, Admin/Config/Access Control,
Upgrade & Storage, Monitoring/Errors/Diagnostics, and Unstable
tuple-payload events.
(
field: type, with notes where the meaning isn't obvious from the name).unstable tuple payload) so indexers and frontend consumers know what they
can safely build against.
event_archive.rs) — pagination,cursors,
EventHistoryEntryshape, and the archive size cap — documentedas the counterpart to the live event stream.
changes require a documented notice and version bump.
Notable findings (flagged in the doc, not fixed here)
While going through
events.rsto build this, I found a few things worth amaintainer's attention. Left them documented inline as call-outs rather than
changing behavior, since that's out of scope for a docs-only issue:
emit_oracle_callback,emit_security_event,emit_oracle_degradation, andemit_manual_resolution_requiredeach existas both a typed
EventEmitter::emit_*method (struct payload, scoped topic)and a free function of the same purpose that publishes a raw tuple under a
differently-named topic (e.g.
"oracle_degradation"vs"ora_deg"). Thetuple versions have no named schema and are candidates for deprecation.
AdminPermissionEventis dead code. The struct is defined but has nocorresponding
EventEmitter::emit_*method — nothing ever publishes it.CircuitBreakerEventnever gets a scoped topic. Every other eventpublishes under
(event_name_symbol, some_scoped_id), but circuit breakerevents only go out under the flat
("cb_event",)topic viastore_event'sinternal publish — consumers filtering by a second topic element will miss
these entirely.
ResolutionTimeoutEventhas no emission timestamp field, unlike everyother event in the file —
timeout_timestampis the only time reference.Happy to open follow-up issues for any of these if useful.
Testing
This is a documentation-only change (no contract logic touched). Added
test_event_schema_doc_covers_all_event_structsinevent_creation_tests.rs, a source-scan test that fails CI if a futurepub struct *Eventis added toevents.rswithout a corresponding entry inEVENT_SCHEMA.md, so the doc can't silently drift out of sync.cargo testpassescargo clippycleanunwrap()/ no state-changing code touched (docs + one test only)Checklist
docs/EVENT_SCHEMA.md)