fix(parser_cli): keep text display fixture diagnostics-agnostic#301
Open
shahan-khatchadourian-anchorage wants to merge 1 commit into
Open
fix(parser_cli): keep text display fixture diagnostics-agnostic#301shahan-khatchadourian-anchorage wants to merge 1 commit into
shahan-khatchadourian-anchorage wants to merge 1 commit into
Conversation
The stagex parser_cli build runs `cargo test --no-default-features --features solana`, which disables the default `diagnostics` feature. The post-#228 `solana-text.display.expected` had the new `Diagnostic { ... }` blocks baked in, so the actual binary output (no diagnostics emitted) diverged from the fixture and the test failed inside the container. Restore the same separation the JSON path already enforces: the display fixture covers only display fields, the diagnostics fixture covers only diagnostics. Strip `Diagnostic { ... }` blocks from the text Debug dump before comparing, gated on the `diagnostics` feature. Tested both `cargo test -p parser_cli` (default features) and `cargo test -p parser_cli --no-default-features --features solana` (stagex config); both pass. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot started reviewing on behalf of
shahan-khatchadourian-anchorage
May 14, 2026 18:56
View session
Contributor
There was a problem hiding this comment.
Pull request overview
Updates parser_cli integration tests so text/human display fixtures remain stable when the diagnostics feature is disabled (e.g., Stagex running --no-default-features --features solana). This aligns the text fixture comparison behavior with the existing JSON path, where diagnostics are already filtered out for display assertions.
Changes:
- Removed
Diagnostic { ... }entries from the Solana text display expected fixture. - Updated the CLI fixture test to strip
Diagnostic { ... },blocks from actual{:#?}(Debug) output before comparing against display fixtures (only whendiagnosticsis enabled).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/parser/cli/tests/fixtures/solana-text.display.expected |
Removes baked-in diagnostic blocks so the display fixture reflects only display fields. |
src/parser/cli/tests/cli_test.rs |
Filters diagnostics out of non-JSON (Debug/text) output during fixture comparison when diagnostics is enabled. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
parser_clibuild runscargo test --no-default-features --features solana, which disables the defaultdiagnosticsfeature. The post-feat: attested transaction lint diagnostics in SignablePayload #228solana-text.display.expectedbaked in the newDiagnostic { ... }blocks, so when the binary ran without diagnostics emitted, the actual output diverged from the fixture andtest_cli_with_fixturesfailed inside the container (visible on main's most recentstagexjob for1e4fe64).Diagnostic { ... },blocks from the Debug dump before comparing (gated on thediagnosticsfeature).Test plan
cd src && cargo test -p parser_cli(default features: diagnostics on) — 8 tests passcd src && cargo test -p parser_cli --no-default-features --features solana(stagex config) — 3 tests pass🤖 Generated with Claude Code