Repository navigation
Description
Summary
Follow-up to the #2879 systematic carrier-protocol sweep. Sweep verdict: the protocol is sound but under-enforced. Of 55 classified marker incidents, classes (a) missing-decode (22) + (f) transport-into-views/enforcement (13) = 64% — both are enrollment failures: a channel/consumer/entry that never got wired to the E400-aware helpers, invisible because nothing forces enrollment. #729 censused the same thing in its day and incidents continued, because a census is not a gate. This issue carries the gates; the per-case fixes are filed separately (F1/F2/F4/F5/F6 from the sweep).
Items
E6 — Golden-gate expansion (load-bearing). tests/marker_leak_golden.rs currently covers 3 of ~20 output channels (stdout echo, declare -p, xtrace + reparse/printf %q). Grow one cell per channel from the sweep's §2.1 matrix: prompts via public API, PS4 template, diagnostics shapes, external env/argv against a real child binary, compgen, read -p (PTY sibling). Cell generation should be registry-driven so a new marker automatically gets cells. (Sweep finding F8. #727 is the precedent for the watchman itself failing silently — the golden once scanned the wrong lead byte and saw nothing.)
E7 — Blind-consumer lint (load-bearing). CI check forbidding .replace( / .contains( / trim_*_matches on registry consts, and raw '\u{E…}' / C0 marker literals in code positions, outside markers.rs + an allowlist for data uses (readline key tables, ANSI-C decode tables). Convert the existing raw literals to named consts: the sweep counted 78 '\u{Exxx}' literals outside the registry — '\u{E302}' used as code (trim/match/starts_with) across src/executor/assignment_expansion.rs, '\u{11}' as CTLESC in lexer/quotes.rs (6×) + 4 more files. A future codepoint renumber (cf. #1634) would silently miss every one. (Sweep finding F7.)
E8 — Registry completeness. Enumerate the __RUBASH_* env-serialization namespace (~40 names, only 7 in markers.rs) in the registry docs/table so the env protocol has a census home; add the missing boundary claims for the unclaimed rows (PATSUB set, guards — currently boundaries: &[]) or mark them explicitly internal.
E9 — Post-merge acceptance for PR #2878 (merged 2026-11-06 before the sweep report landed): run the sweep battery cells c21 + PTY s1–s3 against the merged tree, plus the open Q1 cell — does a U+E401 (ANSI_C_IFS_GUARD, e.g. TAB from $'a\tb') carried by a value survive into a rendered PS1/PS2/PS4? #2878's decode_prompt_transport decodes raw-byte pairs only. If Q1 fails, file it as its own bug.
Why this is one issue
E6+E7 are the load-bearing pair: E1–E5-style case fixes without them are just the next round of case fixes. If these gates are judged not credible, the sweep's §8 scopes the structural alternative (typed text segments at the value boundaries) as a Stage-2 ③ input — that decision point is recorded here.
Activity
caomengxuan666 commentedon Nov 6, 2026
E9 合并后验收 — 通过(captain 核)
对现行 master
e8f1bb04(含 #2878 合入a412873d,已核为 HEAD 祖先)重跑 #2878 的全部单元,工件在验收车道~/workspace/pua-e9/(REPORT.md + 逐格日志):1b,修复前的 E000+E01C 对已消失。$'A\tB'值进入 PS1/PS2/PS4):PASS — 无外泄。三格渲染均为真 TAB 字节0x09,U+E401 的 UTF-8 序列(EE 90 81)在任何位置均未出现;另有前提核验(两壳存储值均为41 09 42,排除空过)与脚本模式 PS4 差分与 GNU 逐字节一致。故 Q1 以证据关闭,不另立 bug 单。expand_prompt_string路径,已由 s1/s2 覆盖。Q1 结论限于本单所指形状;其他可能把 E401 停进存储值的传输形状未探,亦无任何通道需要它才失败。E9 项就此销账。#2885 余项(E6/E7/E8 门)仍开。
lint: marker blind-consumer gate + raw-literal conversions (Refs #2885)
docs+test: env-namespace census + boundary claims for unclaimed rows …
test: move registry typed-data cells to an integration test (Refs #2885)
test: adjudicate the four golden cells against the GNU oracle (Refs #…
test: only take CARGO_BIN_EXE_bash when the shim exists (Refs #2885)
chore(2885): captain merge-time reconciliation on merged master (Refs #…
test+lint: marker protocol enforcement gates — golden expansion, blin…
caomengxuan666 commentedon Nov 8, 2026
已由 PR #3015 合入关闭。
4984ce5c(master 现行头)。8c19e23a,update-branch 后):全量 11 项 = 10 pass + 1 skipping(Bash upstream test progress),零 pending / 零 fail——含 GNU regression goldens and canaries、Rust tests(含 macOS)、cross-target 三腿、Windows tests compile check、API ledger tripwire、niubash builds against this tree。RUSTFLAGS="-D warnings"rc=0;hygiene / fmt / CR 全净。22852ec4):census 补__RUBASH_CURRENT_FILEEXACT 条;registry 四例外全摘(E002×3 经 Escaped user U+E002 is eaten by blind QUOTED_NULL consumers (printf emits stray U+E400, echo emits nothing, concat drops the char) #2882、E316×1 经 fix: U+E316 (PROMPT_ESCAPE_GUARD) typed-data folds to backslash in assignment concatenation #3016);Escaped user U+E002 is eaten by blind QUOTED_NULL consumers (printf emits stray U+E400, echo emits nothing, concat drops the char) #2882 两条 KNOWN BLIND SPOT allowlist 删除,另删两条被主干侧变更作废的条目(fix(builtins): set listing ansic-quotes marker-carried C0 scalars via shared byte-stream ports (Refs #3017) #3044 set.rs 渲染表、fix: convert blind QUOTED_NULL consumers to E400-aware helpers (Refs #2882) #3006 command_prepare 转换);一格 golden 期望按 GNU ansic-quote 形订正(与 GNU bash 5.3.20 逐字节核对)。fix(marker-lint): remove stale allowlist entry left by #3974 (#3979)