Skip to content

fix(buffer): align both write entry points on encoding tags - #10987

Closed
proggeramlug wants to merge 2 commits into
mainfrom
fix/10645-buffer-write-encodings
Closed

proggeramlug wants to merge 2 commits into
mainfrom
fix/10645-buffer-write-encodings

Conversation

@proggeramlug

Copy link
Copy Markdown
Contributor

Fixes #10645.

js_buffer_write handled hex and base64 but fell back to raw UTF-8 for utf16le/ucs2, base64url, latin1, and ascii tags. Both buffer write entry points now use the existing shared string-to-encoding helper, so their tag tables cannot drift independently.

A runtime unit test writes through both entry points with tags 0–6 and checks the byte counts, encoded bytes, and untouched surrounding bytes.

Verification: RUST_TEST_THREADS=1 cargo test -p perry-runtime --lib both_write_entry_points_decode_every_encoding_tag -- --test-threads=1, rustfmt --check --edition 2021 crates/perry-runtime/src/buffer/copy_write.rs, and git diff --check.

@coderabbitai

coderabbitai Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 6 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 8 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 48383e6d-b161-49cc-a152-d03f3346a507

📥 Commits

Reviewing files that changed from the base of the PR and between c1569e2 and 36c3070.

📒 Files selected for processing (2)
  • changelog.d/10987-buffer-write-encodings.md
  • crates/perry-runtime/src/buffer/copy_write.rs

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@proggeramlug

Copy link
Copy Markdown
Contributor Author

Landed on main in merge train 257 (#11039, v0.5.1640), main 990b3eeada.

Carried at head 36c3070cae. CI on the train head passed every job except the known public-baseline lint step: all 6 gap shards, cargo-test, e2e-scoped, gc-stress, check, warnings and security-audit green.

This train was split by blast radius after an earlier 35-PR assembly hit five gap regressions: it carries only PRs touching no lowering path. Trains rebase-merge, so commits get new SHAs and GitHub cannot mark this merged. Closed as landed.

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.

js_buffer_write does not handle encoding tag 6 (utf16le/ucs2), the same dormant gap PR #10644 fixed in its js_buffer_write_len sibling

1 participant