Repository navigation
fix(lexer): keep $'\x1e' and $'\x1f' bytes as data - #2562
Merged
Merged
Conversation
chaliy
force-pushed
the
claude/ansi-c-control-bytes
branch
from
October 7, 2026 13:06
4f259cc to
3fad28f
Compare
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
bashkit | 925f088 | Commit Preview URL Branch Preview URL |
Oct 07 2026, 01:38 PM |
The decoded bytes collided with the lexer's quote-boundary markers and were dropped, breaking SEP=$'\x1f' composite keys. Claude-Session: https://claude.ai/code/session_019aFikmptPc91Fj4N2iDXQA
chaliy
force-pushed
the
claude/ansi-c-control-bytes
branch
from
October 7, 2026 13:37
3fad28f to
925f088
Compare
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 Михайло · project thread
What changed
$'\x1e'and$'\x1f'(the ASCII record and unit separators) now stay in the value. Before, they were silently dropped.Why
The lexer uses those two bytes internally to mark quote boundaries, so the decoded ANSI-C bytes were read as markers and removed. That breaks a common idiom for composite associative-array keys,
SEP=$'\x1f'; v["$section$SEP$key"]=.... Gap telemetry found it: the replayedconfig_ini_mergerun printed nothing.Before
After
New spec
ansi-c-control-bytes.test.sh(4 cases) matches bash 5.2; all 4 fail on main.Risk
Low. Decoded ANSI-C content now escapes those two bytes the same way it already escapes
$, using the existing NUL sentinel. The literal-word path drops markers and decodes the sentinels in a single pass.Checklist
cargo test -p bashkit --lib --tests, clippy, fmthttps://claude.ai/code/session_019aFikmptPc91Fj4N2iDXQA
Generated by Claude Code