test: add deterministic typed event fixture validation - #157
Merged
El-swaggerito merged 1 commit intoJul 29, 2026
Merged
Conversation
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.
Description
This PR strengthens the deterministic event fixture workflow for Aegis Contracts.
Changes
fixtures/sdk/04-events.json.Harness::assert_eventsandHarness::assert_no_eventshelpers.Files Modified
tests/sdk_fixtures.rs— adds typed expectations for all canonical event scenarios.tests/support/mod.rs— adds typed event assertions, no-event assertions, and cross-platform comparison handling.docs/sdk-fixtures.md— documents generation, validation, edge cases, and compliance boundaries.docs/testing-standards.md— requires typed expectations for event fixture changes.README.md— describes and links to the deterministic event fixture workflow.No contract storage, public entrypoints, event schemas, error codes, or roles were changed.
Related Issues
Closes #36
Completion Table
typed_events!andHarness::assert_eventsvalidate live typed events before04-events.jsonverification or regeneration. The workflow is specified indocs/sdk-fixtures.md.fixture_eventspasses against the committed event fixture.Harness::assert_no_events. Fixture comparisons normalize only CRLF/LF differences while preserving exact content and XDR validation. Multi-event compliance ordering is asserted explicitly.fixture_eventscovers reverted transfer silence;fixture_comparison_normalizes_only_windows_line_endingscovers cross-platform determinism and verifies content drift remains detectable.docs/sdk-fixtures.mdstates that fixtures validate protocol behavior and wire compatibility, not legal, regulatory, investment, or financial compliance. It links to the Legal Boundary Disclaimer.fixtures_contain_no_real_user_datatest cover fixture privacy assumptions.docs/testing-standards.md.04-events.jsonremains unchanged because the observed wire behavior did not change.Detailed Traceability Mapping
typed_events!constructs exported payload types and callsHarness::assert_eventsbefore serialization.fixture_eventsHarness::assert_no_eventsand canonical CRLF/LF comparison.fixture_events;fixture_comparison_normalizes_only_windows_line_endingsdocs/sdk-fixtures.md.docs/testing-standards.mdwith typed-event and no-event requirements.Type of Change
PR Evidence Checklist
Before opening this PR, complete every applicable item in the evidence
checklist below. See PR Evidence Checklist
for detailed guidance.
1. Issue Reference
#<issue-number>above).2. Implementation Summary
3. Tests Added or Justification
fixture_eventsintests/sdk_fixtures.rsfixture_comparison_normalizes_only_windows_line_endingsintests/support/mod.rsfixtures_are_deterministicintests/sdk_fixtures.rsfixtures_contain_no_real_user_dataintests/sdk_fixtures.rs4. Commands Run
make verifypasses locally. See Additional Context for the targeted results and existing unrelated repository failures.5. CI Status
6. Acceptance Criteria Coverage
Policy & Standards
CONTRIBUTING.mdguidelines.rustfmt --check.cargo clippyshould be confirmed after existing repository warnings are resolved).Additional Context
Verification Results