Skip to content

Add compare ignore path and field filters#558

Merged
Timi16 merged 4 commits intoTimi16:mainfrom
Obiajulu-gif:compare-ignore-filters
Mar 26, 2026
Merged

Add compare ignore path and field filters#558
Timi16 merged 4 commits intoTimi16:mainfrom
Obiajulu-gif:compare-ignore-filters

Conversation

@Obiajulu-gif
Copy link
Contributor

This pull request adds support for ignoring sfic fields and paths when comparing execution traces, making it easier to filter out noisy or irrelevant differences (such as timestamps or sequence numbers) in reports. It introduces new CLI options, updates the documentation, and refactors the comparison engine to apply these filters throughout the comparison process.

New filtering capabilities:

  • Added --ignore-field and --ignore-path options to the CLI, allowing users to exclude specific fields or JSON paths from the comparison (src/cli/args.rs, src/cli/commands.rs). [1] [2]
  • Updated documentation to describe the new ignore filters, including usage examples and explanations of how they affect the comparison (docs/doc/compare.md). [1] [2] [3]

Comparison engine refactor:

  • Introduced a CompareFilters struct and integrated it into all major comparison functions, so storage, budget, return values, call sequences, and events are normalized according to the provided filters (src/compare/engine.rs). [1] [2] [3] [4] [5] [6] [7] [8]

Diff output and reporting:

  • Modified the diff output for call sequences and events to show filtered results, ensuring that the report only reflects meaningful differences after applying ignore filters (src/compare/engine.rs). [1] [2] [3]

These changes make the comparison tool more robust and flexible, especially for use cases where certain fields or subtrees are expected to change and should not trigger false positives in regression tests.

Closes #509

@drips-wave
Copy link

drips-wave bot commented Mar 25, 2026

@Obiajulu-gif 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

@Timi16
Copy link
Owner

Timi16 commented Mar 25, 2026

This pull request adds support for ignoring sfic fields and paths when comparing execution traces, making it easier to filter out noisy or irrelevant differences (such as timestamps or sequence numbers) in reports. It introduces new CLI options, updates the documentation, and refactors the comparison engine to apply these filters throughout the comparison process.

New filtering capabilities:

  • Added --ignore-field and --ignore-path options to the CLI, allowing users to exclude specific fields or JSON paths from the comparison (src/cli/args.rs, src/cli/commands.rs). [1] [2]
  • Updated documentation to describe the new ignore filters, including usage examples and explanations of how they affect the comparison (docs/doc/compare.md). [1] [2] [3]

Comparison engine refactor:

  • Introduced a CompareFilters struct and integrated it into all major comparison functions, so storage, budget, return values, call sequences, and events are normalized according to the provided filters (src/compare/engine.rs). [1] [2] [3] [4] [5] [6] [7] [8]

Diff output and reporting:

  • Modified the diff output for call sequences and events to show filtered results, ensuring that the report only reflects meaningful differences after applying ignore filters (src/compare/engine.rs). [1] [2] [3]

These changes make the comparison tool more robust and flexible, especially for use cases where certain fields or subtrees are expected to change and should not trigger false positives in regression tests.

Closes #509

fix conflicts

@Timi16 Timi16 merged commit cd7b4a2 into Timi16:main Mar 26, 2026
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.

Compare command: add ignore-path and ignore-field filters for noisy trace diffs

2 participants