Skip to content

expand_prompt renders the E400 escape pair for a stored U+E314 value instead of the raw char #3038

Closed

Description

@caomengxuan666

Repro

Via the public Session API (rubash::api::Session::expand_prompt):

let mut session = Session::builder().build().unwrap();
session.run("pua=$'\\uE314'", &RunOptions::default()).unwrap();
assert_eq!(session.expand_prompt("<$pua>"), "<\u{E314}>");

Actual: "<\u{E400}\u{E314}>" — the E400 literal-char escape pair survives into the rendered prompt.

Expected

"<\u{E314}>" — the raw char. GNU has no E400 concept and renders the stored char as-is; and the same prompt path already decodes the E401 guard for TAB (sweep open Q1, captain-verified PASS on master e8f1bb04: tab=$'A\tB' renders as a real TAB, no E401 leak). The E314 guard must decode the same way.

Evidence

Suspected owner

The E400-pair decoder used by Session::expand_prompt covers the ANSI_C_IFS_GUARD (U+E401) but not PARAM_WORD_BACKSLASH_GUARD (U+E314). Contrast with #3016 (E316 folds to a backslash in assignment-concat) — same E400-pair family, different site and guard; not the same fix.

Destination

1.5.1 (rubash #2885 E6 follow-up; fix lane to be dispatched).

Activity

  1. added
    bug
    gnu-baseline
    area:carrier
    on Nov 7, 2026
  2. caomengxuan666 commented on Nov 8, 2026

    @caomengxuan666
    MemberAuthor

    已由 PR #3072 合入 master(squash merge 1d5be81f)。

    根因(订正立案时的疑似面):不是解码器漏覆盖——decode_raw_byte_markers 无条件折叠 E400 对;真缺陷是 decode_prompt_transport 的存在性门只查 U+E000 原始字节族,展开结果只携带 E400 对时门不开、整对漏进渲染(折不折取决于同一提示串里是否有无关的原始字节对在场)。修法按机制修门:markers::contains_decodable_transport 双族存在性门,漏斗改走该门,解码器本体零改动;同漏斗的 PS4 与 read -p 通道同根同修。GNU 锚点 parse.y:6265/6689、parse.y:5694-5706、subst.c:4692。

    队长复核(真基底 4984ce5c):

    • golden marker_leak_golden 头 20/0;fail-first(基底 + 仅钉文件)19p/1f,唯一败格 prompts_via_public_api_carry_no_markers,left "<\u{e400}\u{e314}>" 与本单逐字一致;$pua 钉已改回正确断言并新增门独立性混合腿
    • lib 头/基底双边 1200/0/4 一致;邻茎 PTY 2/0、registry 10/0、issue431 4/0、issue824 9/0
    • RUSTFLAGS="-D warnings" / fmt / hygiene / CR 全净;marker-lint OK(117 consts / 257 sites)
    • GNU 探针字节对照双边同为 3c ee 8c 94 3e 0a;合入头 1afb1186 的 CI 全集 10 pass + 1 skipping
  3. added 2 commits that reference this issue on Nov 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area:carrierbuggnu-baseline

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions