Skip to content

Use wider diagnostic output in UI tests#3461

Open
joshlf wants to merge 1 commit into
mainfrom
codex/address-review-comment-on-pr-#3460
Open

Use wider diagnostic output in UI tests#3461
joshlf wants to merge 1 commit into
mainfrom
codex/address-review-comment-on-pr-#3460

Conversation

@joshlf

@joshlf joshlf commented Jun 14, 2026

Copy link
Copy Markdown
Member

Motivation

  • UI tests were intermittently showing truncation notes (long-type files) and spurious wrapping due to a narrow diagnostic width, causing brittle snapshots and extra noise.
  • Making the runner request a much wider diagnostic width and matching COLUMNS produces full diagnostics and more stable/meaningful .stderr snapshots.

Description

  • Increase the --diagnostic-width argument from 100 to 1000 in tools/ui-runner/src/main.rs and anneal/tests/ui.rs so rustc emits wider, less-truncated diagnostics.
  • Update the COLUMNS environment variable in tools/ui-runner to 1000 to match the requested diagnostic width.
  • Re-bless numerous UI .stderr snapshots in zerocopy/tests/ui/ (stable and nightly variants) to remove /long-type-HASH.txt truncation notes and reflect wider source spans.

Testing

  • Ran CARGO_ZEROCOPY_AUTO_INSTALL_TOOLCHAIN=1 BLESS=1 ./cargo.sh +stable test --test ui -p zerocopy --features=__internal_use_only_features_that_work_on_stable and the UI tests completed successfully.
  • Ran CARGO_ZEROCOPY_AUTO_INSTALL_TOOLCHAIN=1 BLESS=1 ./cargo.sh +nightly test --test ui -p zerocopy --all-features and the UI tests completed successfully.
  • Ran CARGO_ZEROCOPY_AUTO_INSTALL_TOOLCHAIN=1 BLESS=1 ./cargo.sh +msrv test --test ui -p zerocopy --features=__internal_use_only_features_that_work_on_stable and the UI tests completed successfully.
  • Attempted the full snapshot update script ../tools/update-expected-test-output.sh, but it failed early because cargo-asm was not available in this environment and that prevented the codegen step from completing.

Codex Task

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.85%. Comparing base (d35c00e) to head (0999137).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3461   +/-   ##
=======================================
  Coverage   91.85%   91.85%           
=======================================
  Files          20       20           
  Lines        6093     6093           
=======================================
  Hits         5597     5597           
  Misses        496      496           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants