Repository navigation
Closed
Labels
gnu-baselineTracked by the GNU Bash 5.3.0 true-baseline ledger
Description
Compatibility Attribution Ledger
Current Bash actual rerun: commit
a24c0379; raw artifact:target/issue-suites/results/bash-ledger-current-a24c0379/.
Current Counts
The authoritative results.tsv contains 83 test rows: 13 PASS and 70 raw DIFF. The runner summary says TOTAL=82 because its summary loop skips the real test named test; counts here are recomputed from all rows.
Status pairs:
0/0=41, 0/1=3, 0/2=6, 0/124=1, 1/2=2, 2/0=3, 2/1=1, 2/2=5, 2/124=2, 9/12=1, 124/0=3, 124/124=2, 127/0=6, 127/1=1, 127/2=3, 127/127=3.
A status pair or raw DIFF is not an independent bug.
Fixed Engine Families
- Dynamic marker/array-field split:
bfadaeb8,63c2d7ea. - Embedded assignment process substitution:
5f77bf2c,f173f927; focused family 56/56. - Nameref array element and positional slice offset zero:
f5e63f99. - printf integer overflow saturation/warning/status:
9d1a8033; printf tests 30/30. - Extglob parse-time rc=2:
a24c0379; parser tests 15/15. - Windows logical-root/PWD:
13864d8a. - Coproc EOF, writer close, endpoint retirement, persistent stderr, and wait status: focused Bash/Rubash probes are parity; see
target/issue-suites/results/coproc-eof-current/.
Host/Fixture Classification
iquote,more-exp,nquote1..4: repeated missingrechohelper/output fixture contamination.exportfunc,new-exp: nestedTHIS_SH,./bash,-c, andenv -ipath assumptions.glob: mixedrecho, permissions, locale, and Windows path behavior.- Old
getopts 0/124: current bounded run-getopts is 1/1 with byte-identical output and existing focused coverage. - Coproc fd numbers,
/etc/passwd,xcase,/dev/tty,/usr,/tmp, and/procare host/product-contract or fixture evidence unless a direct semantic mismatch reproduces.
Remaining Candidates
Needs direct bounded GNU Bash/Rubash probes before Rust changes:
arith 1/2,array 1/2.braces,comsub-posix,cond,mapfile,posixexp2,quotearraywith Bash rc=0 and Rubash rc=2.builtins,comsub2,histexpwith Bash rc=2 and Rubash rc=0.complete 2/1,rsh 0/1, andposix2 9/12.procsub/read/redir 124/0andtrap/printf 2/124need fixture-specific EOF/timeout reproduction; printf focused overflow behavior already passes.
Do not change expected output globally or treat a status pair alone as proof.
Evidence
target/issue-suites/results/bash-ledger-current-a24c0379/target/issue-suites/results/bash-ledger-current-a24c0379/output-only-attribution.tsvtarget/issue-suites/results/coproc-eof-current/target/issue-suites/results/coproc-persistent-stderr-boundary/docs/residual-differential-triage-20260821.md
Metadata
Metadata
Assignees
Labels
gnu-baselineTracked by the GNU Bash 5.3.0 true-baseline ledger
Activity
caomengxuan666 commentedon Aug 21, 2026
Attribution issue published: #62. The current ledger artifact is complete at target/issue-suites/results/bash-ledger-current-a24c0379/: 83 rows, 13 PASS, 70 raw DIFF. I also fixed the runner summary bug in 8c6656e: it previously skipped the real test named , reporting TOTAL=82; summaries now skip only the header row. No Rust engine changes were made from status pairs alone.
caomengxuan666 commentedon Aug 21, 2026
Cross-shell refresh completed: BusyBox ash, Oil, and mksh are unavailable in this environment. Artifacts are under target/issue-suites/results/cross-shell-current-20260822/ and classify all three as runner/provider blockers, not Rubash semantic DIFFs. The durable ledger now records this in docs/compatibility-attribution-20260822.md.
caomengxuan666 commentedon Aug 21, 2026
ksh93 representative evidence is now archived at target/issue-suites/results/ksh-current-20260822/. No ksh93, ksh, or mksh executable was available; bounded probe returned provider-blocked 127 without executing the script. This is not a ksh or Rubash semantic DIFF.
caomengxuan666 commentedon Aug 21, 2026
New focused attribution update: a80e07d fixes the arithmetic conditional diagnostic token from to Bash-compatible ; focused regression passes. The procsub/read/redir/trap candidate probes are parity, and the raw printf width probe times out under the same 8s wrapper for both engines, so those ledger rows are fixture/host timeout evidence rather than current engine defects. Restricted-mode is a separate unimplemented engine feature candidate, but the official rsh row is contaminated by the canned upstream bridge/stream policy; no speculative exec patch was made.
caomengxuan666 commentedon Aug 21, 2026
Correction to the prior update: a80e07d fixes the arithmetic conditional diagnostic token from =9 to Bash-compatible +=2; the focused regression passes. The procsub/read/redir/trap candidate probes are parity. The raw printf width probe times out under the same 8s wrapper for both engines, so those ledger rows are fixture/host timeout evidence rather than current engine defects. Restricted-mode set -r remains a separate unimplemented engine feature candidate, but the official rsh row is contaminated by the canned upstream bridge and stream policy; no speculative exec patch was made. Evidence: target/issue-suites/results/arith-array-probes-20220822/, target/issue-suites/results/status-candidates-20220822/, and target/issue-suites/results/rsh-probe-20220822/.
caomengxuan666 commentedon Aug 21, 2026
Compatibility attribution refresh after focused probes:
+=2).enable -dusage/status to Bash-compatible rc=2.${ printf ...; }as bad substitution (rc=1).set -ris an unimplemented Rubash engine feature: invalid option, no restricted flag, and no absolute-command/cd enforcement.Durable ledger: docs/compatibility-attribution-20260822.md
caomengxuan666 commentedon Aug 21, 2026
Round update: 8001a04 fixes posixexp2. Root cause was src/lexer/skip.rs closing a braced parameter expansion while inside a single-quoted word; the focused regression now matches Bash stdout
1 }zand rc=0. comsub-posix and quotearray remain artifact-backed unresolved candidates; attempted repair-agent launches failed before producing changes. Array patch remains uncommitted because its focused regression still returns status 1.caomengxuan666 commentedon Aug 21, 2026
Round update: 6512057 fixes array subscript diagnostics and nonfatal invalid parameter expansion. The original array probe now matches Bash: stdout includes cneg=<> and status is 0; b[], b[*], c[-2], and c diagnostics are Bash-compatible. Focused regression passes. posixexp2 remains fixed by 8001a04. Remaining artifact-backed engine candidates are comsub-posix heredoc delivery and quotearray associative arithmetic subscript evaluation; restricted set -r remains an unimplemented feature gap, while official rsh is bridge-policy contaminated.
caomengxuan666 commentedon Aug 21, 2026
Round update: e7cb7c1 fixes quotearray. The root cause was escaped command substitution being executed during assignment expansion before associative arithmetic subscript evaluation. Rubash now preserves the escaped
$(...)in the key and avoids generic parameter pre-expansion for marked associative arrays. The original probe now returns rc=0, declares the full key with value 1, and emits no uname/error stderr. Focused regression passes with and without default features. Remaining unresolved engine candidate is comsub-posix heredoc delivery; restricted set -r remains a feature gap.caomengxuan666 commentedon Sep 7, 2026
#62 候选清单新鲜复测(ca543d41,WSL GNU 5.2.21 vs rubash,脚本文件式,25s/项)
绕过 ledger harness(winuxsh 下后台 wrapper + env 前缀不可靠;已给
scripts/run-bash-actual-ledger.sh打了cp -R dir/.静默失败的健壮性补丁 222a7e3),直接对 19 个候选 .tests 做双侧探针(辅助工具 recho/zecho/printenv 已在 WSL 编入target/issue-suites/results/bash-tests-rw/):原始产物:
target/issue-suites/results/ledger62-fresh.tsv+ledger62-side/<name>/{gnu,rb}.{out,err,rc}。新发现(P1):
arith.tests与trap.tests在 rubash 下非确定性挂起/超时(同用例在 40s 窗口有时 RC=0 只输出 1 行,有时 25s 超时)——这正是此前 ledger 卡死在 arith 的根因,值得单独开 issue 定位(疑似 ${THIS_SH} 递归或 trap 等待路径)。其余 DIFF 行需要逐行甄别 stdout 差异是语义还是夹具(mapfile 的 GNU 127 已确认是夹具侧问题)。
caomengxuan666 commentedon Sep 7, 2026
#62 候选逐项甄别(基于 ledger62-side 产物 diff,GNU 5.2.21 实测 vs rubash b4c8cca)
语义类(真 bug,按影响排序):
read的 IFS 字段切分——行 3-a-b -vs-a-b-,尾部 IFS 空白折叠规则;1 2 3 4 5 \vs1 2 3 4 5)——数组转词时的 IFS 尾部处理,离全绿一步之遥;[[ … ]]某条件返回 rc 0 vs GNU 1(行 17);8 ""z}vs8 \"z}——展开词内引号保留(与 [Compat][BusyBox][ash-quoting] Bash-compatible differences #52 引号架构同根);{0..10}序列展开在该用例失效(输出字面片段);execfd 复制/持久重定向序列(gnu to a/to b vs rb Point 3/Point 4);declare -A打印时 key 内 $( ) 引号转义丢失;umask -S输出形式(GNU 打印命令回显 vs rubash 直接打印符号掩码)——需对照测试源确认是 xtrace 还是 type;<(...)已支持但输出顺序/fd 时序有差(行 5 起错位);complete注册项打印顺序/选项集不同;未实现特性(实现范围评估类):
!历史展开在非交互下未按 GNU 门控(rubash 行 1 即输出错误内容)——需要 history 状态机;夹具/宿主噪声(NOT-A-BUG):
已 PASS(近期修复成果):comsub2(此前 2/0 → 现在 rc/输出全对齐)。
原始 diff 依据:
target/issue-suites/results/ledger62-side/<name>/{gnu,rb}.out;fresh 状态表ledger62-fresh.tsv。建议:把 read/mapfile(IFS 尾部规则)作为下一个最小修复点,cond/braces/redir 次之,histexp/comsub-posix/complete 作为特性跟踪。caomengxuan666 commentedon Sep 7, 2026
read 已修复(c9466df3)+ mapfile 定位
read.tests:GNU 依据 read.def 的双分支绑定(branch (a) 词尾即行尾→bind_read_variable 保留转义空格;branch (b) 整行→strip_trailing_ifs_whitespace 逃逸盲截断)。rubash 三处修复:
探针 5 例全对齐;read.tests 首个分歧从行 3 推进到行 34(剩余为 read -a 数组切分切片,下一轮)。lib 325/10 零回归。
mapfile 行 155 行尾空格:初步定位为 read -a 数组切分的同一 IFS 尾部规则(split_read_array_words 系列未做转义感知/尾随处理),将随 read -a 切片一起修复。
caomengxuan666 commentedon Sep 7, 2026
#62 复核进展:mapfile 差异全部为 CRLF 伪影 + 两项真修复(c9466df3 / 881b237)
关键基础设施发现:core.autocrlf=true 把 vendored bash 测试树检出为 CRLF。GNU 把 CR 当数据——mapfile1.sub 的
echo ${array[@]}行尾 CR 生成幻影尾随空格词;mapfile2.sub 数组名变A<CR>触发 sh_invalidid 整段静默跳过。bash-tests-rw 运行目录已全量 LF 归一化(642 文件,验证零嵌入 CR,无数据丢失),mapfile.tests 从干净目录重跑 GNU/rubash 完全一致(170=170,diff=0)——此前 mapfile 候选全部关闭。clean 重跑后的真实候选量化(ledger62-rerun/,THIS_SH 已导出):
本轮修复:
in后首个裸esac为保留字拒绝(GNU 接受矩阵 5/6 对齐;剩余;; esac)嵌套深度规则记为待办)② 赋值值单引号内双引号为数据(hoist/restore 包装,越过嵌入参数重扫描)③ quoted-RHS 逃逸引号标记泄漏修复procsub 12 行差异根因:GNU procsub 子进程退出后 /dev/fd 路径消失(-e false),rubash 持久临时文件(-e true)——需进程存活期语义,深坑记录。
posix2 剩余:-x 负测试(Windows 可执行位模拟)+ variable quoting 1/3(set 输出引号格式,#52 族)。
caomengxuan666 commentedon Sep 7, 2026
#62 续:管道 grep 快速路径修复 + set 输出对齐(e30f3e34)——多套件 diff 大幅下降
新根因 1(乘数级):管道内建 grep 快速路径把 words[1] 当模式——
set | grep -c VAR实际 grep 字面 "-c"(匹配 SHELLOPTS 的 "interactive-comments"!)并输出匹配行而非计数。修复:[-cinvq] 旗标解析(含捆绑)、-- 终止符、首个非旗标参数为模式、文件操作数与未知旗标回退真 grep(与 sed/tr 快速路径同纪律)、GNU 退出码语义。新根因 2:set 输出引号规则三重对齐 variables.c print_var_value:非打印字符用 dollar-quote;元字符用 sh_single_quote 含单值特例(单引号值输出反斜杠引号,posix2 variable quoting 1/3 关闭);metas 表含位置性 tilde/hash 规则(sh_contains_shell_metas 逐字移植)。
新根因 3:_RUBASH* 簿记变量泄漏进 set 列表(GNU print_var_list 的 invisible_p 语义)——已跳过。
修复后量化(ledger62-rerun2.log,同 LF 干净目录):
*posix2 现仅剩:① -x 负测试(Windows exec 位模拟缺失)② case-esac 拒绝后的诊断措辞(GNU 视 in esac 为空模式表报右括号,rubash 报 esac)——variable quoting 1/3 已关闭。lib 325/10 零回归。
caomengxuan666 commentedon Sep 7, 2026
#62 续:posix2 收口——空 case 表 / eval 诊断对齐(6410a502),chmod 模拟层(51e5f952)
重要语义修正:GNU 实测
case x in esac是合法空子句 case(直落执行后继命令)——此前 881b237 的"裸 esac 拒绝"是过修。现按 parse.y 实现:in 后裸 esac = 零子句闭合;do/then 在模式位是普通模式词。case x in esac)的错误在)处(空表闭合后括号意外)。chmod 模拟模式层(51e5f952):chmod 内建原为空桩。现支持八进制与 [ugoa]*[+-=][rwxX]+ 符号模式(含 X 规则),写入 __RUBASH_FILE_MODES;test -r/-w/-x 优先读模拟位,未记录文件回退现状。posix2 "negative test -x" 关闭(chmod/test 矩阵 6/6 对齐;test -w 残差为 WSL root 语义,posix2 不涉及)。
eval 诊断对齐(6410a502):eval 内错误的诊断前缀带 "eval:" 段 + 调用者行号(token 位置偏移);eval 字符串内语法错误 → 返回状态 2 不中止脚本(
eval "exit 5"仍致命退出 5);eval 重解析中命令位的 stray)/;;= YYABORT 式错误 + 当行回显(parse_with_options 仅在 eval 路径启用——顶层多行 $(...) 折叠属 lexer/continuation.rs captain-exclusive 范围)。posix2 现状:唯一残差 = 错误回显行的空格重建(token 拼接
esac )vs GNU 原文esac))——1 行措辞级差异,行为层全部对齐。全套件回归(ledger62-rerun3):cond 18 / braces 4 / builtins 213 / quotearray 149 / array 627 / complete 113 / procsub 11 / posixexp2 14 / mapfile 0 / comsub2 0 / comsub-posix 29 / trap 58 / read 46 / redir 74——较 e30f3e3 无回归(complete +2 待查)。lib 325/10 零回归。
caomengxuan666 commentedon Sep 7, 2026
#62 里程碑:posix2.tests 完全关闭(P2 diff=0)——62718ab1
最后残差(错误回显的空格重建)已修:ParseLoopOptions 增加 source_text / source_line_offset,eval 重解析传入原始文本,stray-close 守卫按行切片逐字回显(token 拼接无法恢复原空距)。回退路径保留 token 拼接(无 source_text 的调用方)。
posix2.tests 现在 GNU(5.2.21)/rubash 逐字节一致——继 mapfile、comsub2 之后第三个完全关闭的上游套件。
累计本轨(自 e30f3e3 起):posix2 9→11(措辞)→0;cond 49→18;braces 18→4;builtins 280→213;quotearray 205→149;array 682→627;complete 115→113;procsub 12→11;mapfile/comsub2 =0。lib 327 通过(+2 新解析器单测)/ 10 已知基线失败。
附注:本会话子代理通道对实际任务不可用(后台前台均夭折,仅无工具探针存活),因此并行分诊转回单兵模式;已建的两个 agent worktree 已清理。
下一步:array 627 / builtins 213 / quotearray 149 大切片人工分诊(GNU 源引证 + Rust 归属 + 修复策略排名)。
caomengxuan666 commentedon Sep 7, 2026
#62 第七轮:posix2 完全关闭 + builtins 213→190(4 个提交)
posix2.tests 关闭(62718ab1)
P2 diff=0。最后残差:解析错误回显按 token 重建插入多余空格(
esac )vs GNU 逐字esac))。ParseLoopOptions 增加 source_text / source_line_offset,eval 重解析传入原始文本按行逐字回显,无 source_text 时回退 token 拼接。posix2 成为继 mapfile、comsub2 后第三个逐字节对齐的上游套件。builtins 小语义三连(c7e5e6c4)213→208
umask -p -S(无模式):GNU 打印可复用命令umask -S u=...,此前 -p 被忽略hash空表消息走 stdout 且状态 0(原 stderr)enable -n(无参数)列出已禁用内建(原被条件短路跳过)source 位置参数泄漏(9f32425f)208→206
GNU source.def uw_maybe_pop_dollar_vars:有参 source 后,仅当脚本未用 set 改 dollar vars(且不在函数内)才恢复;改过则保留。rubash 原无条件恢复。Executor 增加 dollar_vars_changed_by_set(ARGS_SETBLTIN 类似物)。builtins.tests source 段尾部现两 shell 一致(m n o p / a b c / m n o p)。
umask 符号模式重写(7e76a397)206→190
builtins8.sub 21 例分诊:GNU 每子句恰一个操作符 + perms ∈ {r,w,x}(无 who 复制、无 X、第二操作符按 perm 字符报错)。rubash 原接受多 op 与 who 复制导致静默错掩码。重写后 builtins8.sub stdout 与 GNU 逐字节一致。
基础设施
累计:posix2=0(关闭);builtins 213→190;cond 18、braces 4、complete 113(+2 待查)、array 627、quotearray 149;lib 326/10(净 -1 为单测替换,零回归)。
下一步:builtins 残余(help 列表 ~26 行、exec -a $0、source 失败状态传播、glob/文件名桶、export 重复行);array/quotearray 大切片分诊;complete +2 回归根因。
caomengxuan666 commentedon Sep 7, 2026
#62 第八轮:GNU 上游覆盖 19→83 套件(新接入 64 个,其中 20 个直接 diff=0)
子代理通道本会话仍不可用(3 个后台任务均在开工前夭折,零产物),转单兵完成。方法论沿用已验证的 ledger62-rerun2.sh 模式:runner 整体在 WSL 内侧执行(GNU bash、rubash.exe、diff、grep 全 Linux 原生),规避 Git Bash 侧 winuxsh grep 的
<参数吞噬问题与 MSYS 路径改写;测试文件 tr -d CR 落入 bash-tests-rw-new/(LF 纪律)。已完全对齐(diff=0,20 个新套件)
alias、appendop、attr、case、comsub-eof、dbg-support2、dstack2、extglob2、extglob3、glob-bracket、herestr、ifs、invert、parser、posixpipe、set-e、set-x、strip、tilde、vredir
新量化台账(64 个,按差异行数)
本轮新修复(提交)
当前总盘子:83/68+ 上游 .tests 全量接入(部分套件含 -r 变体);累计完全对齐 23 个套件;待收敛量 ≈ 190(老台账)+ 2,700(新台账)行,其中 dbg-support/new-exp(调试支持与扩展展开族)为新增最大块。
下一步:array 桶修复 → dbg-support/new-exp 分诊 → nquote 系列引用语义 → shopt/globstar。
caomengxuan666 commentedon Sep 8, 2026
#62 第九轮:真基线重建 + fc 族关闭
基线修正:GNU 侧 THIS_SH=/bin/bash + 固定二进制路径。旧台账数字作废(截断+路径污染)。83 套件,21 真零差。
真缺口 Top10:dbg-support 635、array 456、assoc 360、nameref 303、new-exp 241、more-exp 232、posixexp 211、histexp 199、rsh 193、comsub2 190。
提交:2d6e32e9 fc 自身条目排除(fc 族 10 测试全绿);2af92b9d lexer 复合值内元字符字面量化(GNU read_token_word)。
数组族根因五桶:复合引号分组(~250,深)、e[10] 尺寸提示赋值语义、&-in-compound 语法错继续语义、DIRSTACK 懒同步、readonly declared-unset 列表。
子代理通道 8/8 夭折,全部单兵完成。详见 docs/COMPATIBILITY-STATUS.md 第九轮。
caomengxuan666 commentedon Sep 21, 2026
第十轮进展同步(2026-09-21,master 回归修复后全量 true-baseline 重跑):账本从本 issue 创建时的 21 真零差推进到 57 零差 / 26 DIFF / 总 733 行(见 COMPATIBILITY-STATUS.md 第二十八节及后续修正)。逐候选核对本 issue 遗留项:\n- restricted
set -r:已实现(1300aeca,rsh 套件 0 差);\n- array 下标传播:已修复(65120574,array 0 差);posixexp2(8001a04a)、quotearray(e7cb7c11)均关闭;\n- comsub-posix heredoc 投递:仍开放——d0433449 的 comsub heredoc boundary 修复后收敛(raw diff 21→约 14 行口径)但未归零;\n- 另发现两处管线侧确定性分歧待修:precedence(40 行,管道输出缺失)、posixpipe(2 行,丢行)——正在处理。\n本 issue 保持 open 作为归因账本,下轮同步在下次全量基线后。caomengxuan666 commentedon Sep 24, 2026
Closing this ledger — the backlog it tracked has been cleared.
Current state at rubash master (run-83 harness, WSL GNU Bash 5.3.0(1) oracle):
RO_PIDcoproc reaping timing) is a race that the GNU oracle itself hits intermittently — verified with isolated GNU probes, so it was archived rather than patched (5780be63, re-archived in43214f75).43214f75).Fresh semantic findings continue to be tracked in the gnu-compat
GAPS.mdledger and filed as new issues as they come in. Thanks to everyone who ran the suites against real workloads.