test(linter/plugins): remove non-deterministic error output in conformance tester#16723
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
|
…mance tester (#16723) Report snapshot for conformance test results contains the errors thrown during linting. In the case of `AssertionError`s generated by `assert`, they sometimes contain diff markers e.g.: ``` + 'missingClosingLinebreak' - 'missingOpeningLinebreak' ^ ``` However, these `^` only appear sometimes, and seem to do so non-deterministically. They appear and disappear randomly from run to run in some places. Looks like this is a bug in NodeJS. Remove all such lines from the report to avoid meaningless churn in the snapshot.
There was a problem hiding this comment.
Pull request overview
This PR addresses non-deterministic test output in the conformance tester by removing caret (^) markers that appear randomly in AssertionError diffs. These markers are generated inconsistently by Node.js's assert module, causing unnecessary snapshot churn.
Key Changes:
- Added logic to filter out diff marker lines containing only
^in error formatting - Updated the conformance test snapshot to reflect the removal of these markers
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| apps/oxlint/conformance/src/report.ts | Added a conditional check to skip lines that contain only ^ (after trimming whitespace) when formatting error output |
| apps/oxlint/conformance/snapshot.md | Updated snapshot to remove all instances of non-deterministic ^ diff markers from AssertionError outputs |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
f509ef4 to
4d9e981
Compare
4beef87 to
ef1ef18
Compare
Conformance tester has been suffering from non-deterministic output from NodeJS's `assert` module. Fix this by setting `process.env.FORCE_COLOR` before loading any code. This also allows leaving the ` ^` diff marker lines in output which were removed in #16723, as they should now appear consistently.

Report snapshot for conformance test results contains the errors thrown during linting. In the case of
AssertionErrors generated byassert, they sometimes contain diff markers e.g.:However, these
^only appear sometimes, and seem to do so non-deterministically. They appear and disappear randomly from run to run in some places. Looks like this is a bug in NodeJS.Remove all such lines from the report to avoid meaningless churn in the snapshot.