Skip to content

Marker protocol enforcement gates: per-channel leak-golden coverage, blind-consumer lint, registry completeness (sweep #2879 follow-up) #2885

Closed

Description

@caomengxuan666

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

  1. added this to the 1.5.1 milestone on Nov 6, 2026
  2. added
    enhancement
    on Nov 6, 2026
  3. added
    area:expansion
    on Nov 6, 2026
  4. caomengxuan666 commented on Nov 6, 2026

    @caomengxuan666
    MemberAuthor

    E9 合并后验收 — 通过(captain 核)

    对现行 master e8f1bb04(含 #2878 合入 a412873d,已核为 HEAD 祖先)重跑 #2878 的全部单元,工件在验收车道 ~/workspace/pua-e9/(REPORT.md + 逐格日志):

    • c21(PS4 ← comsub ESC + 变量 ESC,脚本电池):PASS,与 GNU 逐字节一致;od 证据显示 trace 前缀为真 ESC 字节 1b,修复前的 E000+E01C 对已消失。
    • s1 / s2 / s3(PTY:PS1 ← comsub ESC、PS1 ← 变量 ESC、PS2 ← comsub ESC):全部 PASS (both)。
    • Q1(U+E401 制表载体经 $'A\tB' 值进入 PS1/PS2/PS4):PASS — 无外泄。三格渲染均为真 TAB 字节 0x09,U+E401 的 UTF-8 序列(EE 90 81)在任何位置均未出现;另有前提核验(两壳存储值均为 41 09 42,排除空过)与脚本模式 PS4 差分与 GNU 逐字节一致。故 Q1 以证据关闭,不另立 bug 单。
    • 范围注记:PS0 无专属 sweep 单元;其与 PS1/PS2 共用 expand_prompt_string 路径,已由 s1/s2 覆盖。Q1 结论限于本单所指形状;其他可能把 E401 停进存储值的传输形状未探,亦无任何通道需要它才失败。

    E9 项就此销账。#2885 余项(E6/E7/E8 门)仍开。

  5. caomengxuan666 commented on Nov 8, 2026

    @caomengxuan666
    MemberAuthor

    已由 PR #3015 合入关闭。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area:expansionenhancement

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions