Repository navigation
test: pin declare -p merged-stream order (Refs #3408) - #3618
Conversation
Fail-first pin: GNU declare.def:389-406 walks -p operands in order (show_name_attributes prints, sh_notfound reports at once); both streams line-buffered (shell.c:1921-1922), so on a merged stream the diagnostic for operand N precedes the listing for operand N+1. Rubash currently emits all listings before all diagnostics on 2>&1 | cat.
|
【WIN-AGENT-AUDIT】PR #3618 第1轮 — 建议:PENDING(队长已 HELD,本 lane 未审、未合、未关) 处置依据:PR 最近评论(2026-11-16 02:50,队长 caomengxuan666)明确写「#3408 已有外部实现 PR #3758 交付(fix carrier,Fixes #3408)。按外部 PR 优先规矩,本 PR 暂缓(HELD):待 #3758 合入后,队长逐格比对本钉 7 形与 #3758 钉 8 形——本钉独有格以 pin-only 形 rebase 吸收,重复格丢弃;若全被覆盖则以 superseded 关闭」。 按规程 §1.4(24 小时内出现「队长复核中/暂缓」类领养信号 → 跳过):
|
|
【WIN-AGENT-AUDIT】PR #3618 第2轮 — 建议:PENDING(HELD 已解除待队长裁决;补齐逐格比对证据) 前置事实(T 波 t4 复核):
钉自跑(master c3bf91e + 本钉文件原样放入 tests/):
GNU 对照(WSL
逐格比对(本钉 7 形 vs #3758 钉 8 形):
本 lane 未动分支(队长保留裁决权)。 未跑/VOID 的腿:fail-first / lib 双边 / warnings / CI 逐格(钉-only PR 且处置待裁决,master 上语义已验证正确,跑腿无新增信息)。 |
|
【WIN-AGENT-AUDIT】T 波(t4)批次汇总 — 7 条全部处置完毕
合并数:2(#3671、#3676,均 squash,#3605 伞目录保持 OPEN)。 |
|
【WIN-AGENT-AUDIT】PR #3618 第3轮(y4)— 建议:PENDING(维持 HELD,等队长比对裁决;本轮零动作) 状态复核(2026-11-17 本地):
|
…Refs #3408) The pins drive script files and normalize their diagnostic prefix to S. The normalizer only replaced the harness's native Win32 spelling (C:\...\case.sh), while rubash reports the same file in the drive form (/c/.../case.sh), so all merged-stream cells false-failed on Windows. Replace every spelling the shell may print (native, forward-slash, and the lowercase drive form) before the S substitution.
|
【WIN-AGENT-AUDIT】PR #3618 第4轮(o2)— 建议:PASS(已合入 squash head: 4165d4d(上轮 0a57201 + master merge + 归一化修复) base(merge-base): 27e1d0d 处置(执行队长第2轮口径):
腿(逐项数字):
机制锚点(未变):GNU 未跑/VOID:本 head 的 CI check-runs(合并即时,未等);GNU 重跑(上轮 10 形已逐行一致,本轮只动钉内路径归一化,不涉语义)。 |
Refs #3408
根因(待修法落地)
declare -p BADNAME v 2>&1 | cat在 GNU 先出诊断、后出列表;rubash 反之(先出全部列表、后出全部诊断)。两层机制:Diag::free只把not found诊断记入 pending 队列,builtin 返回后才由diag.flush_with渲染;而print_declare_names的 per-name 循环把列表直接writeln!到 stdout。同一 builtin 内诊断与列表的生产顺序已丢。execute_declare用write_buffered_builtin_output(pair 路由)发射 stdout 块、再 stderr 块,跨流生产顺序无法恢复(chunks 路由是 [A3-R58A] Multi-argument builtin stdout/stderr interleaving lost in the shared buffered-output path #2699/pipeline stage 输出跨流失序:trap -p 列表与诊断合流顺序与 GNU 不符 #3324 已确立的保序机制,本单尚未接入)。GNU 锚点
builtins/declare.def:383-406:-p逐操作数循环,show_name_attributes成功即打印,失败立即sh_notfound。builtins/setattr.def:539-552show_name_attributes;builtins/setattr.def:484+show_var_attributes经printf到 stdout。builtins/common.c:190-193sh_notfound->builtin_error(common.c:98-110,vfprintf(stderr)立即写);shell.c:1921-1922stdout/stderr 均为行缓冲,故合并流上按生产顺序交错。v=1; declare -p BADNAME v 2>&1 | cat先出declare: BADNAME: not found,后出declare -- v="1"。本 PR 删除了什么
本 PR(当前仅钉)不删除任何产品代码与行为;修法提交将另行说明删除内容。
状态
tests/issue3408_declare_p_merged_stream_order.rs(7 形:canon / 逆序 / 夹心 / 多 stage / typeset / 裸 2>&1 / 分流不变)。UNVERIFIED-BY-CAPTAIN