Repository navigation
fix(artifacts): bound invariant diagnostics and preserve literal comparisons - #1304
Merged
Merged
Conversation
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.
Invariant-oracle warnings could incorrectly classify comparisons of different string literals as constant true because the analyzer masked their contents before comparing expressions. Preserve literal identity while masking strings for delimiter parsing, so punctuation and assertion-like text inside strings cannot change the parse. Also recognize production imports written with single quotes.
Large generated suites previously collected every warning and rescanned the file prefix for every line number. Index line starts once, generate findings lazily, and stop at the existing diagnostic count/byte budget. Truncation notices explicitly avoid an exact omitted count when scanning stopped early.
Post-merge follow-up to #1296.
Validation: full artifact suite and focused analyzer/validation tests passed, including a 100,000-assertion suite, exact source locations, no later-file scan after the budget, nested truncation, literal comparisons, escaped punctuation, and imports in both quote styles. Strict ESLint and formatting passed. The two changes were independently reviewed.


Confidence Score: 5/5
The PR appears safe to merge; the previous finding is fixed and no new actionable issues were found.Summary
This PR preserves string contents when checking constant comparisons and bounds the warnings produced for large suites.
Reviews (2) · Last reviewed commit: "fix(artifacts): compare string contents ..." · Reviewed by Greptile