Skip to content

fix(artifacts): bound invariant diagnostics and preserve literal comparisons - #1304

Merged
aviggiano merged 3 commits into
unstablefrom
codex/fup-1296-oracle-warnings
Oct 15, 2026
Merged

aviggiano merged 3 commits into
unstablefrom
codex/fup-1296-oracle-warnings

Conversation

@aviggiano

@aviggiano aviggiano commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

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.

RetriggerView in GreptileConfidence 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.

  • Invariant checks keep string contents when comparing expressions.
  • Invariant warning scans stop at a count or byte limit.
  • Production calls in assertions are recognized with either import quote style.

Reviews (2) · Last reviewed commit: "fix(artifacts): compare string contents ..." · Reviewed by Greptile

@aviggiano
aviggiano requested a review from a team as a code owner October 15, 2026 00:10
Comment thread packages/artifacts/src/invariant-oracle-warnings.ts Outdated
@aviggiano
aviggiano merged commit 809b702 into unstable Oct 15, 2026
17 checks passed
@aviggiano
aviggiano deleted the codex/fup-1296-oracle-warnings branch October 15, 2026 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant