Repository navigation
parity: sequence protocol follow-ups (0037) - #496
Merged
Merged
Conversation
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
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ri8sWg6DtPeJ4tx4pkQeZf
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.
Requested by Ruslan · project thread
Before: five corpus cases named 0037 diverged: case-insensitive
sort/min/maxof non-ASCII narrow strings compared signed bytes,'hello'|sumreturned the string,wordwrap(0)returned its input, and{} is sequencewas 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;
sumstarts from int 0 and refuses a stringstart(as Python);wordwrap(width <= 0)raises (empty text returns early, as Python);is sequenceis 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, stringsumstart, emptywordwrap). 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