Skip to content

fix(executor): materialize numbered-fd output procsubs in compounds and link fd>=3 chains (Refs #3491) - #3504

Merged
caomengxuan666 merged 1 commit into
masterfrom
fix/3491-numbered-fd-output-procsub
Nov 13, 2026
Merged

caomengxuan666 merged 1 commit into
masterfrom
fix/3491-numbered-fd-output-procsub

Conversation

@caomengxuan666

Copy link
Copy Markdown
Member

Recovery + delivery lane for #3491 (the fix lane died on a runtime DB error before delivering; its state was recovered from the stash pop, patch-identical to the local tree).

Fix — three defects, one mechanism (the fd-1/2 path was built, the fd->=3 path was never wired):

  • Compound materialization covers the whole redirect list (pipeline_exec.rs).
  • Persistent consumers run writer-before-reader under their prefix plans (pipeline_exec.rs).
  • Simple-path live link extends to all plan fds (external_setup.rs).
  • src/lexer/continuation.rs untouched.

Re-proof (Simular box, GNU bash 5.2.21 oracle; the local rebuild was blocked by the EDQUOT wall, so the numbers below are the box re-run of the restored tree):

  • Pin stem tests/issue3491_numbered_fd_output_procsub.rs: 13/13.
  • Adjacent 链式输出 procsub > >(A) > >(B) 载荷不穿链(GNU 穿链,物化模型边界) #2234 stem: 8/8.
  • GNU three-way probes (probe-3491.sh 17 cases + probe-3491b.sh 7 cases): HEAD == GNU except documented F1 (3>> lexer face, separate issue).
  • Lib bilateral: HEAD 1246 passed / 0 failed / 4 ignored; BASE (be61032) 1246 passed / 0 failed / 4 ignored.
  • cargo fmt --check clean; RUSTFLAGS="-D warnings" cargo check --lib rc=0, zero warnings.

Residuals (REPORT section 5): N>> append form (3>>) rejected by the lexer — separate issue, not fixed here. Compound input procsubs: documented limitation, not a regression.

Full evidence record: REPORT.md in the fix-3491 lane workdir (section 7).

@caomengxuan666

Copy link
Copy Markdown
Member Author

Captain review: PASS

Re-verified live on the PR head 14bb0a8d (worktree content confirmed
byte-identical to the commit — all three blob SHAs match) on the Simular
box, since the local EDQUOT wall was closed all day. Full evidence in
review-3504/CAPTAIN-VERIFY.md.

  • Pin stem issue3491_numbered_fd_output_procsub: 13/13, all names
    green; base fail-first 3 passed / 10 failed by name (the 3 controls
    pass on base; all 10 fail on base, pass on head).
  • Adjacent 链式输出 procsub > >(A) > >(B) 载荷不穿链(GNU 穿链,物化模型边界) #2234 stem: 8/8.
  • Lib bilateral: HEAD 1246 passed / 0 failed / 4 ignored = BASE
    1246 / 0 / 4
    (bin built first, per the issue2875 rule).
  • RUSTFLAGS="-D warnings" check: rc=0, zero warnings (non-idle:
    Compiling rubash → Finished in 24.17 s). cargo fmt --check,
    marker lint, and UTF-8-boundary hygiene all clean.
  • GNU three-way probes (probe-3491.sh + probe-3491b.sh, HEAD bin
    vs GNU 5.2.21): identical on every case except F1 — the 3>>
    append form, which the lexer rejects with syntax error near unexpected token '3>>' where GNU accepts it. That is the documented
    §5 lexer residual, not a regression: it is a parse-time error and this
    PR touches no lexer/parser file (only external_setup.rs,
    pipeline_exec.rs, plus the new test file). No stray >(...) files
    anywhere on HEAD.
  • Final-head CI: the three red legs (GNU goldens, Rust tests,
    Rust tests macOS) all fail on the single test
    issue2875_input_procsub_child_runs_as_rubash_shell with
    Unrecognized option: 'c' — the known lib-only-run harness trap.
    Master CI at 983a44f1 fails the same three jobs with the same test
    and signature, so the CI delta of this PR is nil. (CI does not run
    the new pin stem; the 13/13 above is this review's own re-run.)
  • Intersection: master moved by one commit since the base (fix(executor): bad-substitution diagnostic names the enclosing word for assignment-shaped words (Refs #3441) #3442),
    touching disjoint files (expand_word.rs, parameter_core.rs,
    issue3441 test); fix(executor): splice mid-word procsub paths in builtin argv (Refs #3353) #3439/fix(executor): seed compound stdin procsub diagnostics with the ambient line (Refs #3299) #3482 still open, neither merged.

Residuals accepted as documented: the N>> lexer face (separate issue,
captain's call — not filed here) and the compound-input-procsub
limitation (pre-fix behavior preserved, no regression).

Verdict: PASS — mergeable as Refs #3491.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant