Repository navigation
fix(executor): fd-state walk rejections carry the compound class prefix (#3406) - #3424
Merged
Merged
Conversation
…ix (#3406) GNU runs do_redirections before the dispatch stamps any line (execute_cmd.c:854), and error_prolog reads the global line_number - except cm_arith / cm_cond, whose executing_line_number substitutes the node's own line (execute_cmd.c:412-428), which for a command completed by a continuation is its completion line. rubash#3183 locked that convention for the post-dispatch redirect paths (compound_redirect_error_prefix), but the fd-state validation walk still rendered its rejections with the plain funnel prefix, so (( x = 1 \ )) < /nonexistent reported the failing fd-0 open at line 1 where GNU reports line 2. Thread compound_redirect_error_prefix into the walk's three rendering points: reject_redirect_at (the hub for the input probe, ambiguous redirects and the per-entry text rejections), reject_with_dup_bad_fd's second line, and the walk's nounset unbound-target write. Simple commands are unaffected (the convention returns the plain prefix for them); the apply funnel's writers and the prefix-stripping identification helpers keep their existing prefix contracts. Regression pin tests/issue3406_arith_fd0_redirect_line.rs: the arith completion-line cells (plain, in a function body, in a subshell, after an assignment sibling) fail first; the output face, the if/brace ambient faces and the one-line faces are controls. Refs #3406
Member
Author
队长复核:FAIL(返工在钉,不在产品)复核卷宗: 产品码是对的,钉有一格期望写错了:
其余腿全绿(box 实跑,头
Owed(既存分歧,非本 PR 引入、亦未修复,另案):
合入条件: d11 修正 + 钉 9/9 重跑确认;合入正文按队长 merge-body(含标准「本 PR 删除了什么」节;PR 正文现为英文 |
This was referenced Nov 12, 2026
The d11 script is x=1 (line 1) + (( y = 2 \ (line 2) + )) < BAD (line 3), so the completion line is 3. GNU bash 5.3.20 reports 'case.sh: line 3:' for the identical script; the product already matches GNU — the pin expectation was wrong (carried over d01's line 2). Pin-only change; no product code touched.
caomengxuan666
marked this pull request as ready for review
November 12, 2026 14:37
caomengxuan666
added a commit
that referenced
this pull request
Nov 12, 2026
… (#3436) ci(rust): run every regression-pin stem via dynamic census (Refs #3430) ## 根因 rust 作业只跑手写精选 `--test` 表(lib、marker goldens 与 8 个点名钉),其余 1367 个 `tests/issue*.rs` 钉 stem 从未在 CI 里执行,CI 全绿也不能证明新钉跑过——PR #3424 的 issue3406 stem 在 10 pass + 1 skipping 的绿 CI 下执行了 0 次(作业日志全文 0 处 `issue3406`),唯一执行证据是复核的 box 腿。 ## 改动 - 新脚本 `scripts/ci-run-pin-stems.sh`:运行时从树里枚举 `tests/issue*.rs`(裸头树 1375 个,排除 90 个后跑 1285 个;合入树 1380 个,排除 90 个后跑 1290 个——update-branch 后又添 5 根新钉 stem:issue3324/issue3329/issue3354/issue3406/issue3425),以单次 `cargo nextest run --profile ci --no-fail-fast` 全跑;新钉默认覆盖。 - 新文件 `scripts/ci-pin-exclusions.txt`:唯一的出口——逐条说明理由的排除项,共 90 项(2 根 J1 + 87 根首跑红茎 + 1 根二轮时序抖动茎)。脚本遇过期排除项(stem 已改名/删除)即报错退出,文件须跟踪树。修法落单时在同一 PR 里删对应行,stem 即默认跑。 - `ci.yml` rust 作业新增最后一步 `Run all regression pin stems`(跑该脚本);作业超时 30 → 60 分钟(全量钉编译+跑在全新 runner 上 30 分钟不够)。既有点名步全部保留(各有硬门注释),新步是普查门。 排除项(90 项,逐茎理由见文件内注释与工作区 census/triage-table.md): - `issue2769_death_notice_line_stamp_regressions`(#2769:EOF 死亡通知投递竞态) - `issue2777_stopped_job_state_regressions`(#2777:kill 后 wait-status 读回 127/147/148 而非 137) - 其余 88 项为首跑 87 根红茎 + 二轮时序抖动 1 根(按失败签名类:PRODUCT 52、TIMING 16、ENV 8、MISMATCH 6、PINS-FIRST 4、PRODUCT/TIMING 1、FIXTURE 1)。 两根 J1 的修法落单时,须在同一 PR 里删掉对应排除行,stem 即默认跑。 ## 本 PR 删除了什么 无删除:只新增两个脚本文件与一个 CI 步骤、改一行超时数字;无产品代码改动、无文件删除、无公开 API 删除、无行为删除。 ## 验证 - 脚本逻辑以 stub `cargo` 本地验证:枚举 1375 个 stem、90 项排除项各行仅出现在 EXCLUDED 行、过期排除项路径 rc=2 且报错准确(已还原);`bash -n` 通过;`ci.yml` 经 PyYAML 解析通过(rust 超时 60、新步为 rust 作业最后一步)。 - 真凭据以本 PR 的 CI 代为准:rust 作业的 `Run all regression pin stems` 步须完整跑完并在日志里打出 `pin stems to run: 1290`。首跑若有其他钉先行红茎,须按日志逐根裁断后补进排除表再推(本 PR 不预设更多排除项)。 ## 普查结果(已跑完三轮,终代全绿) - 第一轮 run 43229859742:1373 茎 / 9063 测试,8780 通过 / 283 失败 / 5 跳过;87 根红茎,283 个测试。逐根裁断后 87 根全部进排除表(每根一行理由:issue 号 + 状态 + 失败测试数 + 最后触碰类 + 失败签名类 + 尚欠裁断)。 - 第二轮 run 43234272221:1287 茎 / 8311 测试,8309 通过 / 2 失败 / 4 跳过;仅剩 `issue2836_emulated_cat_job_control_regressions` 2 个测试失败——该茎在第一轮 3 个测试全绿(2.5–3.8s),同一份产品代码第二轮 2 红,并行负载下 PTY 时序抖动,已按 TIMING 类进排除表。 - 第三轮 run 43236628825:1286 茎 / 8308 测试,8308 通过(1 leaky,4 skipped),0 失败;全部 10 项检查通过。 - 排除表现 90 项(2 J1 + 87 + 1)。按失败签名类:PRODUCT 52、TIMING 16、ENV 8、MISMATCH 6、PINS-FIRST 4、PRODUCT/TIMING 1、FIXTURE 1。 - 头条:87 根首跑红茎里仅 4 根指向 OPEN issue(#2634、#2697、#2906、#3046,均为钉先行),其余 83 根指向已关闭 issue——普查翻出的是一大片已知红基底(过期钉 / 回归 / 环境形),须另排队长裁断波(Linux 侧串行重跑逐根分流:过期钉重钉 / 真回归修 / 环境形标注)再逐根删排除项。本 PR 只交付门 + 可见的裁断记录,不宣称产品已绿。逐茎裁断表与两轮完整日志见工作区 REPORT.md §5–§6 与 census/。 Refs #3430
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.
What
The executor's fd-state validation walk rendered its redirect rejections with the plain funnel line prefix, while the post-dispatch redirect paths have carried the class convention since #3183 (
compound_redirect_error_prefix: ambient line for plain compounds, the node's completion line forcm_arith/cm_cond, the command's own line otherwise). GNU runsdo_redirectionsbefore the dispatch stamps any line (execute_cmd.c:854), anderror_prologreads the globalline_number— exceptcm_arith/cm_cond, whoseexecuting_line_numbersubstitutes the node's own line (execute_cmd.c:412-428), which for a command completed by a continuation is its completion line.So
(( x = 1 \+ newline +)) < /nonexistent-xyz/filereported the failing fd-0 open at line 1; GNU reports line 2.Change
Thread
compound_redirect_error_prefix(cmd)into the walk's three rendering points insrc/executor/redirection.rs:reject_redirect_at— the hub for the fd-0 input probe, ambiguous redirects, and the per-entry text rejections;reject_with_dup_bad_fd's second line (GNU'sredirection_errorfor the same entry);redirection_expandfailure at the samedo_redirectionsmoment).Simple commands are unaffected (the convention returns the plain prefix for them). The apply funnel's writers and the prefix-stripping identification helpers keep their existing prefix contracts — audited, deliberately untouched.
Tests
New pin
tests/issue3406_arith_fd0_redirect_line.rs(GNU bash 5.3.20 expectations, byte-exact rc/stdout/stderr):if/brace-group ambient faces, the one-line arith face, a simple command's multi-line output face.Verification legs (box/old-server, per-stem results) are reported on the issue thread as they land.
Deletions
None — the change only re-routes three prefix expressions and adds the pin.
Fixes #3406