Skip to content

parity: sequence protocol follow-ups (0037) - #496

Merged
rmorozov merged 4 commits into
masterfrom
claude/project-thread-h69eut
Oct 12, 2026
Merged

rmorozov merged 4 commits into
masterfrom
claude/project-thread-h69eut

Conversation

@rmorozov

Copy link
Copy Markdown
Member

Requested by Ruslan · project thread

Before: five corpus cases named 0037 diverged: case-insensitive sort/min/max of non-ASCII narrow strings compared signed bytes, 'hello'|sum returned the string, wordwrap(0) returned its input, and {} is sequence was false.

After: all five match Python Jinja2 and their lines are gone from test/parity/divergences/sequences.txt.

Narrow case-insensitive compares order UTF-8 bytes unsigned after ASCII lower-casing; sum starts from int 0 and refuses a string start (as Python); wordwrap(width <= 0) raises (empty text returns early, as Python); is sequence is true for dicts only (not reflected objects, loop, namespace()).

How: changes in value_visitors.h, filters.cpp, string_converter_filter.cpp, testers.cpp. Three new corpus cases (loop/namespace, string sum start, empty wordwrap). Existing unit rows that encoded the old behaviour (Sum string rows, {...} is sequence) were removed or flipped.

Deliberate remaining divergence: non-ASCII letters are not case-folded (['é','É']|min), noted in the task file.

Roles: verifier ran 1 round (clang ASAN+UBSAN clean, preflight --perf passed); its 3 blocking findings are fixed in the last commit. 0 red CI pushes so far.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Ri8sWg6DtPeJ4tx4pkQeZf


Generated by Claude Code

Case-insensitive narrow compare orders bytes unsigned, sum starts from 0 and
raises on strings, wordwrap(width <= 0) raises, dict is a sequence.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ri8sWg6DtPeJ4tx4pkQeZf
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ri8sWg6DtPeJ4tx4pkQeZf
Empty wordwrap text returns early, loop and namespace are not sequences, sum
refuses a string start; corpus cases added.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ri8sWg6DtPeJ4tx4pkQeZf
@rmorozov rmorozov self-assigned this Oct 12, 2026
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ri8sWg6DtPeJ4tx4pkQeZf
@rmorozov
rmorozov merged commit 19cef9c into master Oct 12, 2026
41 checks passed
rmorozov added a commit that referenced this pull request Oct 12, 2026
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.

2 participants