fix(compare): normalize numeric literals and object literal formatting#54
Merged
Brooooooklyn merged 1 commit intomainfrom Mar 3, 2026
Merged
Conversation
Member
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Add two normalizations to the comparison tool to reduce false positives: - Numeric literals: AST-based normalization using oxc-parser converts scientific notation (1e3, 2e3) to decimal form (1000, 2000). Key finding: oxc-parser returns character offsets, not byte offsets. - Object literal formatting: regex-based collapsing of multi-line simple object literals in function call arguments to single lines. Only targets objects with identifier/member-expression values. Results: numeric diffs 4 → 0, line count diffs 304 → 301, 0 parse errors. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
c403ad1 to
568a8a3
Compare
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.

Add two normalizations to the comparison tool to reduce false positives:
Numeric literals: AST-based normalization using oxc-parser converts
scientific notation (1e3, 2e3) to decimal form (1000, 2000). Key
finding: oxc-parser returns character offsets, not byte offsets.
Object literal formatting: regex-based collapsing of multi-line simple
object literals in function call arguments to single lines. Only
targets objects with identifier/member-expression values.
Results: numeric diffs 4 → 0, line count diffs 304 → 301, 0 parse errors.
Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com
Note
Cursor Bugbot is generating a summary for commit c403ad1. Configure here.