You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
atlas-search(pyjson): dumps_compact emits U+007F (DEL) raw — CPython ensure_ascii escapes it as \u007f, breaking --text byte parity #5404
atlas-search's CPython-parity JSON writer emits U+007F (DEL) raw in the ensure_ascii mode, where CPython escapes it as \u007f. The module's stated
contract is byte-identical output to the Python's (json.dumps with default
separators and ensure_ascii=True for the --text fragments).
Evidence (verified this run, main 8854bf748)
pkgs/atlas-search/crates/atlas-search/src/pyjson.rs:107 — the escape arm is c if ensure_ascii && (c as u32) > 0x7f. CPython's ASCII encoder escapes
every character outside 0x20..=0x7e (its escape regex is [^\ -~]), so 0x7f itself is escaped: json.dumps("\x7f") → "\u007f" (checked against
CPython 3.14 / Unicode 16 on the laptop).
Laptop probe ~/git/fleet/probe-pyjson-del (compiles the real pyjson.rs,
comment-stripped copy, code identical):
py_string("a\u{7f}b", true) → raw DEL — CPython: "a\u007fb" ✗
dumps_compact({"k": "x\u{7f}y"}) → raw DEL — CPython: {"k": "x\u007fy"} ✗
Neighbouring cases all match CPython: U+0080 → \u0080, U+001F → \u001f, café → caf\u00e9, plain ASCII unchanged.
Reachable output: dumps_compact renders the --text fragments in crates/atlas-search/src/render.rs:36,72,103 (including filters_applied,
whose values are user-supplied filter strings), so a filter value containing
DEL renders differently from the Python CLI this binary replaces.
Why it matters
The atlas Rust port's acceptance bar is byte-parity with the Python surface
(steps 1–4 of the Atlas port). A raw DEL byte in --text output is a silent
parity break in exactly the hand-rolled writer built to prevent parity breaks,
and DEL in terminal output is a control character the escaping exists to keep
out of rendered text.
Acceptance criteria
py_string with ensure_ascii=true escapes U+007F as \u007f; the ensure_ascii=false (envelope) path keeps emitting it raw, as CPython does
with ensure_ascii=False.
A unit test pins DEL (and the neighbouring boundary characters U+007E raw,
U+0080 escaped) in both modes.
cargo test -p atlas-search pyjson (or the crate's targeted test filter)
passes; no other rendering changes.
Session / ID: cron new-issue-creator-code-b, run 2026-11-04 04:50 CST
Found via: filed this run
Task: Filed after verifying against CPython and the real pyjson.rs via laptop probe ~/git/fleet/probe-pyjson-del; taking it as a guarded self-solve this run (one-character escape-boundary fix + pinning test).
Expectation: effort xs — PR opened and merged this run when the targeted atlas-search tests pass on the laptop.
Session / ID: cron new-issue-creator-code-b, run 2026-11-04 04:50 CST
Found via: filed this run
Task: Guarded self-solve complete: PR fix(atlas-search): escape U+007F in pyjson ensure_ascii mode (#5404) #5405 squash-merged (fab2f4d) — py_string ensure_ascii arm now >= 0x7f; new test compact_escapes_del_like_cpython pins DEL in both modes plus the U+007E/U+0080 boundaries; full atlas-search suite green on laptop (15 unit + 4 cli_parity).
Expectation: done — issue closed by the merge; work labels stripped.
Activity
dezren39 commentedon Nov 4, 2026
🤖 Agent note · state: filed
fix(atlas-search): escape U+007F in pyjson ensure_ascii mode (#5404) (#…
dezren39 commentedon Nov 4, 2026
🤖 Agent note · state: done
>= 0x7f; new test compact_escapes_del_like_cpython pins DEL in both modes plus the U+007E/U+0080 boundaries; full atlas-search suite green on laptop (15 unit + 4 cli_parity).