Skip to content

ci(docs): add contract event documentation drift validator (#714) - #738

Open
ravendevhub wants to merge 1 commit into
Core-Foundry:mainfrom
ravendevhub:ci/contract-event-docs-validation-714
Open

ci(docs): add contract event documentation drift validator (#714)#738
ravendevhub wants to merge 1 commit into
Core-Foundry:mainfrom
ravendevhub:ci/contract-event-docs-validation-714

Conversation

@ravendevhub

Copy link
Copy Markdown

Summary

Resolves #714 by introducing an automated documentation drift checker (scripts/validate-contract-events.py) and comprehensive event catalog (docs/CONTRACT_EVENTS.md) that parses Rust source files to ensure all 34 public Soroban contract events and their topics/data payloads remain synchronized with documentation.

Changes

  1. Event Drift Validator (scripts/validate-contract-events.py):
    • Parses contract/contracts/hello-world/src/base/events.rs for #[contractevent] struct definitions.
    • Cross-references event names, topics, and payload fields against documentation.
    • Detects drift and exits with actionable warnings.
  2. Contract Event Taxonomy (docs/CONTRACT_EVENTS.md):
    • Documents all 34 contract events including group lifecycle, financial, administrative, and notification events.
  3. CI Integration (.github/workflows/validate-contract-events.yml):
    • Runs automatically on pull requests modifying contract events.

Acceptance Criteria

  • Documented event names are validated.
  • Required event fields are checked.
  • Documentation drift can be detected during development or CI.

…dry#714)

- Create scripts/validate-contract-events.py extracting contractevent structs and cross-referencing docs
- Catalog all 34 public Soroban contract events in docs/CONTRACT_EVENTS.md
- Add GitHub Actions CI workflow to detect event documentation drift on PRs
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 Contract Event Documentation Validation

1 participant