Repository navigation
test(issue3182): drop never-read Outcome.stdout field from diagnostic faces pin - #3418
Merged
Merged
Conversation
…ic faces pin The pin's Outcome struct carried a stdout field that no cell reads (every assertion uses rc/stderr only), which made the whole-tree RUSTFLAGS="-D warnings" cargo check --tests fail on master at tests/issue3182_diagnostic_faces.rs:30 (field `stdout` is never read). Drop the field and its sole initialization; no assertion or expectation changes. Fixes #3411
Member
Author
|
队长车道验证结果(Simular box,树 r3374 原地复用,flock + 信号复位启动器,
日志在 box |
Member
Author
|
队长复核:PASS(判词只认自跑数字,Simular box,树 r3374,flock 不跨 cargo 持 fd + python 启动器逐信号 SIG_DFL,
附带裁断(#3417 前提复核,队长令):不成立。证据链(全文见复核卷宗专节):该 |
caomengxuan666
marked this pull request as ready for review
November 12, 2026 02:35
This was referenced Nov 12, 2026
caomengxuan666
pushed a commit
that referenced
this pull request
Nov 12, 2026
fix(pipeline): keep merged-stream order in pipeline stages Fixes #3324 ## What changed - Pipeline stages whose inline Trap/Printf arms produce both streams now record their writes in an `OrderedOutputLog` (#2699) and stash the ordered chunks in the new `Executor::pipeline_stage_ordered_chunks` field (cleared at `execute_pipeline_stage_inner` entry). In `route_pipeline_stage_streams`, when the stage's fd 1 and fd 2 resolve to the same sink (`2>&1`, `1>&2` incl. the `ProcessStderr`≡`Stderr` variant, `>f 2>&1`), the driver rebuilds the merged stream from the log in production order and routes it once through the shared sink; when the targets differ the split pair routes exactly as before, and the `2>&1 >f` order-dependence is preserved. - A subshell stage's chunk routing no longer degrades to pair-block writes (whole stdout, then whole stderr) when `apply_ordered_output_redirects` legitimately finds nothing to do on the stripped clone: it falls through to the chunk walk whenever `redirect_failed` and `first_open_error` are both empty, so a stage whose fd table already carries a merged binding (#2689) keeps its order. - printf's rendering model is production-ordered: `RenderedPrintf` is now a sequence of `PrintfSegment::{Text, Error}` instead of a `(output, errors)` pair — GNU line-buffers stdout (`shell.c:1921-1922` `sh_setlinebuf`), so a conversion diagnostic lands between the values around it, not ahead of all output. `%n` counts sum over Text segments only; `-v` still receives the joined Text while diagnostics go to stderr. The direct printf path routes the ordered log through `write_buffered_builtin_output_chunks`. ## What was deleted - `write_buffered_builtin_output_stderr_first` and the `stderr_first` parameters of `route_builtin_buffered_output_ordered` / `write_buffered_builtin_output_ordered` (dead once the interleave model replaced the #1134 stderr-first model), plus four comments stating the old fully-buffered model. - No files, features, or tests were removed. ## Verification (captain review, all legs on the Simular box) - Regression pin `tests/issue3324_pipeline_stage_merged_order.rs`: **18/18** on the PR head; on the true fork base (`f5f65d35`, top-up form) **7 passed / 11 failed**, the failures exactly the merged-order shapes. - Three-way probes (32 shapes, GNU bash 5.3.20 oracle): the head matches GNU byte-for-byte on every in-scope shape — merged pipeline order both directions, printf mixed conversions, subshell/direct controls, file merge, `|&`. The two pre-existing red stems the PR body names are unchanged on the head: `issue1100_printf_option_parsing` 4 passed / 5 failed and `issue3046_exec_pipeline_chardev_stdin` 10 passed / 5 failed, with failure name sets identical on the base tree (verified bilaterally). `issue1134_printf_diag_order_regressions` 1/1 and `issue2699_builtin_output_interleaving` 7/7 stay green. - lib 1245 passed / 0 failed / 4 ignored on both trees, failure name sets identical (empty). - `cargo fmt --check`, marker-literal, and UTF-8 boundary hygiene legs clean; scoped `RUSTFLAGS="-D warnings"` check (lib + bins + pin) rc=0. The full-target `-D warnings` enumeration's error set is 16 pre-existing test-file lint points, each in a file byte-identical between the fork base and this head (the class master has been clearing since the fork, e.g. #3369/#3418); no point is in `src/` or in this PR's files. Refs #3408 — `declare -p`'s mixed diagnostic/listing order on a merged stream is produced inside the declare builtin's own pending-diagnostic funnel, not the stage merge layer; captain-review probes confirm it is unchanged (still reversed) on this head, exactly as that issue records. Refs #3409 — a builtin pipeline stage still fires the inherited EXIT trap at stage exit (missing subshell trap reset in the stage executor); captain-review probes confirm it is unchanged on this head and untouched by this PR, exactly as that issue records.
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.
Summary
Pure test hygiene for the #3182 diagnostic-faces pin. The pin's
Outcomestruct carried astdoutfield that no cell reads — every assertion in the file usesrc/stderronly — and that dead field was the sole error point of the whole-treeRUSTFLAGS="-D warnings" cargo check --testson master (fieldstdoutis never read, tests/issue3182_diagnostic_faces.rs:30).This change deletes the field and its one initialization in
run(). No assertion, expectation, or product code changes.Fixes #3411
本 PR 删除了什么
The never-read
Outcome.stdoutfield and its initialization (2 lines, test file only). Nothing else; pure test-hygiene PR.Verification
Box legs (Simular box, flock,
-j 1) — results posted as a comment on this PR:RUSTFLAGS="-D warnings" cargo check --tests: the issue3182 point gone, no new pointsissue3182_diagnostic_faces: all cells passcargo fmt --check: rc=0