Skip to content

ci: gate event schema coverage against publish-site count - #466

Merged
greatest0fallt1me merged 3 commits into
CalloraOrg:mainfrom
temisan0x:ci/event-schema-coverage-gate
Jun 26, 2026
Merged

ci: gate event schema coverage against publish-site count#466
greatest0fallt1me merged 3 commits into
CalloraOrg:mainfrom
temisan0x:ci/event-schema-coverage-gate

Conversation

@temisan0x

@temisan0x temisan0x commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

What this does

Adds a CI gate that counts every env.events().publish( call in the three contract crates and checks each topic has a row in EVENT_SCHEMA.md. If someone adds a publish site without updating the schema, the build fails.

  • New script: scripts/check_event_schema_coverage.sh
  • New CI job: event-schema-coverage in .github/workflows/ci.yml
  • Skips #[cfg(test)] blocks and test-only files (test.rs, test_*.rs)

CI status

The new gate passes. Build (release) passes too.

Test and Coverage are red, but that was already true on main before this PR — settlement tests don't compile (missing imports, stale try_* usage). See main CI, June 19. Not in scope for #447.

How I tested

Ran the script locally — 36 topics, all documented.

Dropped a fake gate_test_fake_event publish into vault lib.rs to confirm it catches gaps:

FAIL: 1 topic(s) not documented in EVENT_SCHEMA.md:
  - gate_test_fake_event  (crate: vault)

Closes #447

temisan0x and others added 2 commits June 25, 2026 15:00
The coverage job was nested at the wrong YAML level and would never run.
Tighten the script to extract topics from publish sites across contract src.

Co-authored-by: Cursor <cursoragent@cursor.com>
@drips-wave

drips-wave Bot commented Jun 25, 2026

Copy link
Copy Markdown

@temisan0x 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

CI was failing on missing PAUSED_KEY/ERR_PAUSED in revenue_pool and
cargo fmt --check drift across the three contract crates.

Co-authored-by: Cursor <cursoragent@cursor.com>
@greatest0fallt1me
greatest0fallt1me merged commit 36a9959 into CalloraOrg:main Jun 26, 2026
2 of 4 checks passed
@greatest0fallt1me

Copy link
Copy Markdown
Contributor

event-schema coverage CI gate — merged 👍 (the workflow-file edit is deferred since the token can't push workflow changes, but the PR is in).

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 CI step that asserts EVENT_SCHEMA.md includes one row per env.events().publish site (grep gate)

2 participants