Skip to content

chore: revert "mongo: fold constant arithmetic expressions with JavaScript semantics (#393)" - #396

Merged
h3n4l merged 2 commits into
mainfrom
claude/revert-mongo-arith-fold
Jul 30, 2026
Merged

chore: revert "mongo: fold constant arithmetic expressions with JavaScript semantics (#393)"#396
h3n4l merged 2 commits into
mainfrom
claude/revert-mongo-arith-fold

Conversation

@h3n4l

@h3n4l h3n4l commented Jul 30, 2026

Copy link
Copy Markdown
Member

What

Reverts #393 (constant arithmetic folding in the mongo parser), which was merged unexpectedly. Arithmetic expressions such as expireAfterSeconds: 90 * 24 * 60 * 60 are parse errors again.

The strict-Parse test from #395 that asserted the BYT-9950 statement parses is flipped to pin the intended behavior instead: the statement fails with a ParseError, which strict Parse surfaces rather than silently dropping the statement.

Consumer impact

Testing

go test ./mongo/... passes.

🤖 Generated with Claude Code

h3n4l and others added 2 commits July 30, 2026 10:39
With the constant-folding revert, the BYT-9950 statement fails to parse
again; the strict Parse contract now guarantees the error is surfaced
instead of the statement being silently dropped.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@h3n4l
h3n4l requested a review from rebelice as a code owner July 30, 2026 02:44
@h3n4l h3n4l changed the title Revert "mongo: fold constant arithmetic expressions with JavaScript semantics (#393)" chore: revert "mongo: fold constant arithmetic expressions with JavaScript semantics (#393)" Jul 30, 2026
@h3n4l
h3n4l merged commit 8e82223 into main Jul 30, 2026
23 checks passed
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