Skip to content

docs(gfql): expr_const_fold module header 108 → 18 lines - #1867

Merged
lmeyerov merged 1 commit into
masterfrom
docs/gfql-constfold-diet
Aug 11, 2026
Merged

docs(gfql): expr_const_fold module header 108 → 18 lines#1867
lmeyerov merged 1 commit into
masterfrom
docs/gfql-constfold-diet

Conversation

@lmeyerov

Copy link
Copy Markdown
Contributor

The last large prose block in the GFQL diet.

Coverage check first (the correction from #1864): test_expr_const_fold.py has 49 tests grouped by the very criteria the header enumeratedTestAsciiGate, TestArgumentClosure, TestNullAndBooleanPolicy, TestTotality. The (P)/(A)/(E) enumeration was restating class names.

What survives

Only the thing those tests cannot say: why the ASCII gate exists. pandas>=3 defaults to an Arrow-backed str whose utf8_lower/utf8_upper are simple per-codepoint case mappings, while polars' and Python's are full mappings. Folding a non-ASCII literal in Python bakes in the full mapping and silently disagrees with the engine evaluating the column side (#1802).

Plus one directive: widening the gate requires proving engine agreement, not sampling it. A test cannot express "do not widen this on a spot check."

AST identical via bin/ci_docs_only_check.py; 222 const-fold tests pass.

🤖 Generated with Claude Code

https://claude.ai/code/session_01MF7uRZLKZaD6Q9FGWSmyXi

The last big prose block. Coverage check first: test_expr_const_fold.py has 49
tests GROUPED BY the very criteria the header enumerated -- TestAsciiGate,
TestArgumentClosure, TestNullAndBooleanPolicy, TestTotality. The (P)/(A)/(E)
enumeration was restating class names.

What survives is the one thing those tests cannot say: WHY the ASCII gate exists.
pandas>=3 defaults to Arrow-backed str whose utf8_lower/utf8_upper are SIMPLE
per-codepoint case mappings while polars' and Python's are FULL, so folding a
non-ASCII literal in Python bakes in a mapping the evaluating engine disagrees
with (#1802). Plus the directive that widening the gate needs a proof, not a
sample -- a test cannot express 'do not widen this on a spot check'.

AST identical; 222 const-fold tests pass.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MF7uRZLKZaD6Q9FGWSmyXi
@lmeyerov
lmeyerov merged commit b5916e7 into master Aug 11, 2026
57 checks passed
@lmeyerov
lmeyerov deleted the docs/gfql-constfold-diet branch August 11, 2026 02:46
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