Repository navigation
docs(hygiene): #849 注释/坐标漂移清扫 + #768 README byte-identical 措辞(closes #849 #716 #768 #767) - #865
Merged
Merged
Conversation
…itation, judgment-comment line, patsub expander attribution Three rubash-side items of the #849 hygiene pack (items 3/4 are the niubash-side typeahead_guard.rs comment and repl.rs cast, tracked in the cross-repo ticket): 1. pipeline_exec.rs (wc fast paths): the comments claimed feeding payload text to decode_to_visible_text 'trips its postcondition (locale.rs:545)'. The whole output-side debug_assert block was removed by #838 (fires on well-formed user-literal marker text, #824) — the citation is dead and the line number was stale even before. The prohibition itself stands: a payload control byte (0x11) is decoded as the CTLESC carrier that consumes the following character, so the corruption is now silent. Comments state that mechanism; no assertion is claimed. 2. glob.rs doc + tests/issue832_* header: both quote the glob_expand_word_list judgment comment ('If the word isn't an assignment and contains an unquoted pattern matching character, then glob it') but cited subst.c:12601 — the function's definition start. In the vendored source (third_party/bash @ b4608166, bash-5.3 patch 15) the quoted words sit at subst.c:12626. CR-841 NIT-1's prescribed 12611/6641 are pristine bash-5.3.0 line numbers (verified: pristine 5.3.0 has comsub_shouldquote@6641, patch 15 has it @6643 — already cited correctly everywhere, left unchanged; AGENTS.md's coordinate table matches the patch-15 baseline 4/4). Correction targets the mirror baseline: 12626 where the comment is quoted; the function-definition citations keep 12601. 3. tests/issue843_*, tests/issue323_*, expand_braced_replacement.rs: the patsub replacement-side expansion was attributed to 'subst.c:4462 expand_string_for_rhs' — that is the =/:= RHS expander (#853 CR NIT-1). The patsub expander is subst.c:3950 expand_string_for_patsub, called at parameter_brace_patsub:9433; the ANSI-C decode chain runs expand_string_for_pat -> call_expand_word_internal, so the downstream ansicstr claims stay verbatim-true. Legitimate RHS uses of 4462 (parameter_ops/parameter_words/issue315/issue428/command_prepare) are untouched. Comment-only: zero behavior change. cargo fmt --check clean; touched suites green (issue323 11, issue832 5, issue843 12, issue383 12, issue158 5); lib 689/689 with --test-threads=1 (one pre-existing parallel-timing flake in executor::path windows_listing_cache, green in isolation and on pristine master).
…measure (env-audited, not raw stdout equality)
'Byte-identical: 82 suites (0 diff)' sat directly above the Env-zeroed
list, so it read as raw stdout byte-equality — which cannot coexist with
an env-zeroing list (if 82 suites had literally zero diff there would be
nothing left to zero). Both READMEs now say explicitly what the 82 is:
byte-identical under the env-audited measure defined in the block header
('environment-bound diffs counted as zero after audit'), not raw
equality — the same precise claim README line 17 makes (82 byte-identical
suites plus nameref's single residual line proven to be GNU's own coproc
reap-timing race). Numbers unchanged; wording only.
Member
Author
独立评审(CR-865)— 结论:APPROVE-WITH-NITS对 mirror 基线裁定的独立意见:同意,证据充分,裁定正确。 独立复核两侧真值:
逐项复核(全部实做)
非阻塞备注
评审于自建 worktree(rubash-cr-865)独立完成,不合并;worktree 已清理。 |
This was referenced Oct 19, 2026
caomengxuan666
added a commit
that referenced
this pull request
Oct 20, 2026
… clean (zh-CN synced) (#932) * docs(readme): #768 — split the byte-identical number into raw + env-classified + clean "82 suites byte-identical (0 diff)" sat one line above an Env-zeroed list and read as raw output equality. The two cannot both be raw: if 82 suites literally had 0 diff, nothing would remain to zero. Re-measure on current master (scripts/true-baseline.sh unmodified, WSL GNU 5.3.0) puts raw byte-identical at 61-62/83, with 21-22 residual suites. The block now states the three numbers separately instead of one ambiguous "byte-identical": raw 62/83 (literal 0-diff runs), +20 environment-classified (per-line attribution in the ledger: host-tool output, NTFS filename/attr bits, locale, /dev/tty, path form, signal table, coproc reap timing), clean 82/83 — plus nameref's proven-GNU coproc race for the 83rd. The hand-typed Env-zeroed name list is replaced by a derivation note so it cannot drift from the artifact, and the per-suite class set is stated to come from the ledger's own classification (AGENTS.md rubash-caused vs environment-caused split). * docs(readme.zh-CN): #890 CR — sync zh-CN to the raw/env-classified/clean framing Implements the REQUEST-CHANGES findings on #890: mirror the English README's three-metric ledger block in README.zh-CN.md. - L17: split "82 套逐字节一致" into raw 62/83 + 20 env-bound-classified + nameref's proven-GNU coproc race - Ledger block: replace the #865-era env-audited gloss with 原始值/环境归类/净化值 rows matching the EN Raw/Env-classified/Clean - Drop the hand-typed 归零的环境差 12-name list — it had drifted: extglob/ifs-posix/quotearray are 0-diff in the current ledger and not among the §4 residual 20; add the same derivation note as EN before the suite list Numbers are ledger-recorded values from docs/nameref-suite-residual-gnu-race-20261012.md §4-5 (2026-10-12 clean re-run on 764b9dd), not a new measurement. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> --------- Co-authored-by: arookieofc <[email protected]> Co-authored-by: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
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.
卫生打包票,四票一 PR,纯注释/docs,零行为变更。
逐票状态
#849 注释/坐标漂移清扫(rubash 侧三项,本 PR 落地)
debug_assert!(!contains(CTLESC)) postcondition (locale.rs:545)——该断言随 fix(#824): decode-boundary leak asserts fired on user-literal marker text (HD1 in declare -p, guard in xtrace) #838 整体移除(输出侧 assert 会对良构用户字面标记文本误发,marker debug_assert family: user-literal text panics debug builds at two more decode boundaries (HD1 in declare -p; PARAM_WORD_BACKSLASH_GUARD in xtrace) #824),行号在删除前就已漂移。禁止 decode 的结论本身成立:payload 控制字节(如 0x11)会被当作 CTLESC 载体吞掉下一字符,fix(#824): decode-boundary leak asserts fired on user-literal marker text (HD1 in declare -p, guard in xtrace) #838 之后损坏是静默的——注释改为陈述该真实机制,不再声称有任何断言会触发。subst.c:4462 expand_string_for_rhs(那是 =/:= 的 RHS 展开器)——更正为subst.c:3950 expand_string_for_patsub(parameter_brace_patsub:9433 调用),涉及 tests/issue843_、tests/issue323_、expand_braced_replacement.rs:553 三处;ANSI-C 解码链(expand_string_for_pat → call_expand_word_internal → ansicstr)语义论证逐字保持成立。parameter_ops/parameter_words/issue315/issue428 等处合法的 RHS 用法 4462 一律不动。票面第 3/4 项(niubash typeahead_guard.rs "head" 注释、repl.rs:734 cast)系跨仓项,票面自述放 niubash 侧同步票,不在本仓。
12601→12611、6643→6641。实测这组数字是 pristine bash-5.3.0 tarball 行号(pristine:comsub_shouldquote@6641、判定注释@12611);而本仓子模块 pin 在 bash-5.3 patch 15(b4608166):comsub_shouldquote@6643(6641 处是空行)、判定注释@12626。仓内坐标基线铁证是 mirror:AGENTS.md 权威坐标表 4/4 精确匹配 patch 15(string_extract_verbatim 1148 / command_substitute 7143 / parameter_brace_expand 9777 / expand_word_list_internal 13219,pristine 分别为 1146/7136/9770/13204),且全仓既有引用(process_substitute 6362、read_comsub 6682、expand_string_for_rhs 4462)均对齐 mirror。因此本 PR 未采纳 6641(会把引文指到 vendored 源的空行;现有 6643 本就正确,保持不动),判定注释引文处 12601→12626。若维护者裁定基线应为 pristine tarball, reverted 即两处行号,欢迎拍砖。CR-853 的 3950 与 mirror 一致,照单采纳。#716 死文档链接——已在 master 修复,本 PR 无 diff
8a92ee4(PR #722)已把悬空指针替换为诚实指法(issue tracker 为现状记录 +
git show 47440833^:docs/TASK-BOARD.md历史取阅)。本次核实:历史对象存在(git cat-file -e 47440833^:docs/TASK-BOARD.md通过);docs 树全量 grep 仅剩两处提及且均为历史取阅指法(ledger:3、archived-metrics-snapshot:145),无同型死链残留。#768 README byte-identical 措辞——本 PR 落地
Byte-identical: 82 suites (0 diff)紧挨Env-zeroed:列表,字面读作原始 stdout 逐字节相等(若 82 套真零差异则无环境差可归零,两行互斥)。README.md 与 README.zh-CN.md 两处均改为显式声明口径:环境审计后计(即表头 "environment-bound diffs counted as zero after audit" 的定义),并指回 README:17 的精确表述(82 逐字节 + nameref 唯一残差行已证明为 GNU 自身 coproc 收割竞态)。数字一律未动;#768 提出的派生化 Env-zeroed 列表(从台账数据生成)不在本票范围,留作后续。#767 true-baseline 双 helper 实现——已在 master 修复,本 PR 附实测证明
a5980de 已按票面选项 1+预检双落地:support/{recho,zecho}.c 为唯一实现(oracle 侧 gcc ELF 载体),scripts/test-helpers/*.rs 为 required-byte-exact PE 端口(rubash 侧),每次运行双载体从源重建,helper-parity 预检不绿拒绝起账(gate FATAL exit 9 / report-only 层只记录不拦)。本 PR 在本分支新构建的 rubash.exe 上实跑:gate green(24 ok,2 report-only=引擎 byte-reencoding 家族,脚本文档明确不记 helper 账),alias 套件台账
alias 0 env=0。无新增 diff。验证
cargo fmt --check干净;debug 构建绿。cargo test --lib689/689(--test-threads=1);默认并行下 executor::path 的 windows_listing_cache 时序 flake 偶发(隔离重跑、单线程、pristine master 均绿,预存现象,与本 diff 无关——注释不进 codegen)。locale.rs:5450 处;patsub 语境的44620 处(余下 4462 均为合法 RHS 引用);12601仅剩 compat_issue_regressions:1947 的函数定义引用(mirror 12601 即 glob_expand_word_list 定义起始,准确保留);66410 处。