test(linter/plugins): remove non-deterministic error output in conformance tester#16756
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
Merge activity
|
There was a problem hiding this comment.
Pull request overview
This PR addresses non-deterministic test output in the conformance tester by filtering out ^ diff marker lines from Node.js AssertionError stack traces. These marker lines appear sporadically due to a bug in Node.js's assert module, causing unnecessary churn in the snapshot file. This is a third attempt to fix the issue after previous attempts in #16723 and #16738.
Key Changes
- Added filtering logic in
formatError()to skip lines that are just^markers after trimming whitespace - Updated snapshot.md to remove 88 instances of these non-deterministic marker lines
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| apps/oxlint/conformance/src/report.ts | Added line.trimStart() === "^" check to filter out diff marker lines from error formatting |
| apps/oxlint/conformance/snapshot.md | Removed 88 occurrences of non-deterministic ^ diff marker lines from test snapshots |
The implementation is straightforward and well-documented. The use of trimStart() properly handles varying amounts of leading whitespace before the ^ marker. The snapshot changes are consistent and only remove the problematic marker lines while preserving all other error output information.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
bff78a0 to
4aefd29
Compare

Repeat of #16723.
^diff marker lines still appear and disappear non-deterministically. It seems #16738 didn't fix it after all. Grrr.