Skip to content

[bug] 模式词里的 bad substitution 应静默(GNU 不作参数展开诊断) #3501

Closed

Description

@caomengxuan666

复核轮在 PR #3442 新头 c04bc781(已合入,983a44f1)上实测:模式词里的 bad substitution 本应静默,rubash 却报错。

复现

echo ${x/a=${-y}/z}
echo ${x#*a=${-y}}
  • GNU bash 5.3.20:静默,rc 0(模式词不作参数展开诊断)。
  • rubash(合入后 master):报 bad substitution,rc 1。

机制

模式词不应参与参数展开诊断。详见 ~/workspace/fix-3441/REPORT.md §6.3;证据见 ~/workspace/review-3442/CAPTAIN-VERIFY.md §8 O3、B-probe 表(复核轮)。

归宿

1.5.1 队长队列,可派。父单 #3441(PR #3442 已合入关单)。

Activity

  1. added this to the 1.5.1 milestone on Nov 13, 2026
  2. added
    bug
    gnu-baseline
    P3-low
    area:expansion
    on Nov 13, 2026
  3. caomengxuan666 commented on Nov 13, 2026

    @caomengxuan666
    MemberAuthor

    队长车道已开工(Uarz 休息期间临时接手)。工作区 ~/workspace/fix-3501/,分支 fix/3501-pattern-word-silent,base 为 master 983a44f1。先以 GNU 源码定语义、写回归钉 fail-first,再修。

  4. caomengxuan666 commented on Nov 13, 2026

    @caomengxuan666
    MemberAuthor

    续跑车道接手(14:42 车道因运行时重启中断):工作区与分支已核实,首支车道留有未提交改动(4 文件)与钉(tests/issue3501_pattern_word_silent.rs,57 格)待验证。但本地写墙已关闭(Disk quota exceeded,1KB 写探针失败),无法提交/推送/开 PR,本轮停手,未改码、未烧构建槽位。REPORT 暂存 /tmp/fix-3501-REPORT.md(工作区落盘失败),墙开后下一棒补拷回工作区并续跑验证。

  5. caomengxuan666 commented on Nov 14, 2026

    @caomengxuan666
    MemberAuthor

    队长裁决(2026-11-14 16:2x):本单与 #3136 的重叠按行级判定——本单修法 hunk(assignment_expansion.rs 旧行 2289/2429,#3136 复核再验 2291-2301/2431-2445)与 #3136 的 7 个 hunk(~1896/~2056/~2097/~2637/~3153/~3665)最小间距约 194 行,可复工,无须等 #3136 合入。条件:修法不得扩入 #3136 的 hunk 行;合入时 update-branch + 合并形重验。续跑车道已派(工作区 fix-3501 复用,4 文件未提交改动 + 57 格钉原样在盘,须先盘点再动)。

  6. caomengxuan666 commented on Nov 14, 2026

    @caomengxuan666
    MemberAuthor

    续跑车道接手(2026-11-14 16:3x CST,队长裁决后):工作区与分支已核实,首支车道遗留的 4 文件未提交改动 + 57 格钉原样在盘。先按裁决复核 GNU 锚点与 #3136 当头 hunk 行级非重叠,再 rebase 到当前 master 尖、fail-first、验证,首提交即 draft PR。

  7. caomengxuan666 commented on Nov 14, 2026

    @caomengxuan666
    MemberAuthor

    续跑(rework 轮)交付:草稿 PR #3599(head 73aa335f,base master 96802caf)。

    修法:在两个整列表入口(array_pattern_word_values、positional_modified_word_values)与间接移除路径补齐标量入口已有的静默门——移除按 joined word 判(单 "" 仅 unquoted 静默,quoted 边界留 #3581),patsub/casemod 按缺失判;at_modified_segment_values 改为透传附词段自身引号态(原硬编码 quoted);has_indirect_parameter_word_operator 改为顶层扫描,嵌套 ${-y} 里的 - 不再误判为间接算子(嫌疑 (a) 路由体 = 臂已排除)。

    本地腿(队长复核前,UNVERIFIED-BY-CAPTAIN):钉头 68/68;fail-first base 31/37 红且红名全为静默格;lib 双侧 bin-first,head 1247/0/4、失败名集为空集;-D warnings rc=0;rustfmt 与 utf8 hygiene 全净。CI run 43604620368 已排队。

  8. caomengxuan666 commented on Nov 14, 2026

    @caomengxuan666
    MemberAuthor

    Merged via PR #3599 (squash merge commit 27e1d0d; master HEAD verified equal to the merge commit).

    Verified legs at merge time (captain review 6879001817): regression pin tests/issue3501_pattern_word_silent.rs 68/68 on head, re-run independently by the reviewer; fail-first on base 31 passed / 37 failed with every red a _silent cell; library bilateral head 1247 passed / 0 failed / 4 ignored (head failure name set empty); quoted-boundary probes match the GNU oracle on all four shapes; CI on the exact head showed only the known baseline issue2875 name in its red jobs.

    The quoted-shape residual #3581 is tracked separately and is not part of this closure.

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

Metadata

Metadata

Labels

P3-lowarea:expansionbuggnu-baseline

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions