fix(string): apply context-dependent final sigma lowercasing - #10226
proggeramlug wants to merge 2 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (7)
Included review availability: Your plan provides up to 8 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughChangesThe string runtime now applies context-dependent Greek final-sigma lowercasing. Valid UTF-8 uses whole-string lowercasing. WTF-8 scalar runs are lowercased as units, while lone surrogates and malformed tails remain unchanged. Tests cover Unicode and boundary cases. Greek final-sigma lowercasing
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix · Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to The final-sigma behavior and WTF-8 boundary handling are covered without an unresolved actionable issue, so the change is ready to merge. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
String.prototype.toLowerCase()now applies Unicode's Final_Sigma rule:"ΑΣ"becomes"ας", while"ΑΣΑ"remains"ασα". Combining marks and other case-ignorable characters are skipped when determining the surrounding cased letters.Changes
Related issue
Fixes #10116.
Test plan
RUST_TEST_THREADS=1 cargo test -p perry-runtime --lib string:: -j 3: 153 passed after the fix (unoptimized profile, debug information disabled).perry,perry-runtime-static, andperry-stdlib-statictogether, verified the artifacts postdate the fix, and pinnedPERRY_RUNTIME_DIRfor compilation.test_gap_10116_final_sigma.tsandtest_gap_10090_string_case_ascii_fastpath.tswith--no-auto-optimize; both outputs match Node 26.5.1 byte-for-byte.python3 scripts/check_node_version_consistency.pyandgit diff --check: passed.bash scripts/pre-tag-check.sh --quick: all checks passed except public benchmark evidence freshness. Its checker, artifact, and every fingerprint input are unchanged from basebb9aa5a641.The same base has unrelated CI failures in unused
registered_extern_handle/wasm_memory_descriptor_maximumfunctions and an unregistered raw thread-local inregex/perex_owner.rs(also reproduced locally). Those files are unchanged here.Summary by CodeRabbit
Bug Fixes
String.prototype.toLowerCase()handling for context-sensitive Greek final sigma across Unicode text, combining marks, punctuation, symbols, and mixed scripts.Tests
CI follow-up
CI is not green. The runtime suite fails in
native_stack::tests::stack_top_respects_custom_thread_stack_sizes(bound must belong to this worker); the warnings gate reports unused WebAssembly helpers; and the checker self-test rejects a rawthread_local!inregex/perex_owner.rs. Those files are unchanged by this PR. Lint also reports the benchmark artifact freshness failure noted above.The
checkjob additionally reports generated API docs drift (manifest and generated docs are unchanged here). The newtest_gap_10116_final_sigmafixture passes in Linux CI. Gap shard 2's new regression istest_gap_iterator_prototype_next_patch: the Node oracle exits 1; the other listed parity failures were already in the snapshot. The remaining shards were still running when this note was added.