Skip to content

WIP: test: clear the 24 standing --all-targets -D warnings errors in tests/ - #2010

Merged
caomengxuan666 merged 1 commit into
masterfrom
fix/alltargets-hygiene
Oct 29, 2026
Merged

caomengxuan666 merged 1 commit into
masterfrom
fix/alltargets-hygiene

Conversation

@caomengxuan666

Copy link
Copy Markdown
Member

What

Clears the 24 pre-existing cargo check --all-targets errors (under RUSTFLAGS="-D warnings") spread over 18 test files — the residue the fix-1184-wart cluster censused after #2002 removed the 25th. Master CI never exercises this surface (no --all-targets -D warnings run; niu CI compiles only the rubash lib with -D warnings), so the errors were invisible.

tests/ only; no src/ changes; no assertion touched.

Dispositions

Shape Files Fix
never-read harness field issue1548/1847/528/530 (Output.status), issue1687 (Run.code), issue621/651 (Run.stderr) field + construction sites removed
unused import debugger_flag (Path), issue705 (Write, Stdio), issue804 (Write, orphaned by the run_face removal) import removed
unused variable / parameter issue1520 (stdout), issue282 (rc), multi_session (workload(i)) bound as _name
unused mut issue1845 (stdin-file arm), multi_session (b, only dropped) mut removed
dead helper issue531 e_lines, issue804 run_face (both zero callers) removed
cfg-mismatched helper issue555 quoted_cases (sole caller is #[cfg(windows)]) helper gated #[cfg(windows)]
non-snake-case test names issue530 ×2, issue544 ×2, oils ×2 per-item #[allow(non_snake_case)] with the reason on the line — the names mirror literal spellings (declare -nA vs -na, declare -aA / -a -A, Oils case ids arith/invalid-const-A / -B-fresh); snake_case would make distinct flag shapes indistinguishable

No blanket/file-level allows.

Gates

  • --all-targets -D warnings rc=0: verified by a single local cargo check --all-targets run (this surface is outside CI by construction); per-file rustfmt applied, CR count 0.
  • lib + regression non-regression: this PR's CI (--lib + named integration targets + --test regression). The changed files are standalone integration-test crates; none feeds the lib or regression targets.

Do not auto-merge; main session adjudicates.

Master's cargo check --all-targets under RUSTFLAGS=-D warnings carried
24 pre-existing errors across 18 test files (census: fix-1184-wart
REPORT; the 25th, tests/issue1184, was fixed by #2002). CI never sees
them: master CI does not run --all-targets -D warnings and niu CI only
compiles the rubash lib with -D warnings.

Dispositions, per compiler diagnosis, tests/ only, no src/ changes:
- never-read harness fields removed (Output.status x5, Run.code,
  Run.stderr x2) together with their construction sites
- unused imports removed (debugger_flag Path; issue705 Write + Stdio;
  issue804 Write, orphaned by the run_face removal)
- unused variables bound as _ (issue1520 stdout, issue282 rc);
  unused parameter workload(i) -> _i in multi_session_isolation
- unused mut removed (issue1845 stdin-file arm; multi_session b,
  which is only dropped)
- dead helpers removed: issue531 e_lines (zero callers), issue804
  run_face (zero callers; tests drive run_command/run_r)
- issue555 quoted_cases gated #[cfg(windows)] to match its sole caller
- six #[test] names that mirror literal flag/spec spellings
  (declare -nA x2, declare -aA / -a -A, Oils arith/invalid-const-A /
  -B-fresh) keep their names under per-item #[allow(non_snake_case)]
  with the reason on the line; snake_case would collide with the
  distinct -na / -a shapes they must stay distinguishable from

No blanket allows, no behavior changes: every removed field/helper was
provably unread/uncalled (that is the lint itself), and no assertion
was touched.
@caomengxuan666

Copy link
Copy Markdown
Member Author

CI adjudication note (for the merging session): the only red job is the niu canary's "Ledger copies are identical" step (all other steps skipped behind it; every other job is green, incl. Rust tests, macOS, goldens).

This red is a master-vs-master ledger desync, not caused by this PR:

  • this branch's docs/api-ledger.md blob = 4307674a6b59 — byte-identical to current rubash master (16a42d7) at the same path;
  • niubash master's copy is blob df6720d9719d — the two masters currently disagree, so the cmp step fails for any rubash PR until the ledger re-sync lands on one side (migration train / release pin step).

This PR touches only tests/*.rs (18 files) and does not modify the ledger. Recommend merging over this single transitional red once the --all-targets -D warnings verification is accepted, per the standing adjudication pattern for ledger-cmp transitionals.

@caomengxuan666
caomengxuan666 marked this pull request as ready for review October 29, 2026 01:29
@caomengxuan666
caomengxuan666 merged commit 65b0846 into master Oct 29, 2026
10 of 11 checks passed
@caomengxuan666

Copy link
Copy Markdown
Member Author

Verification update: the local cargo check --all-targets --keep-going run under RUSTFLAGS="-C debuginfo=0 -D warnings" (purified env, build slot, JOBS=1) has completed on this branch's tree — rc=0, 0 errors, 0 warnings (Finished dev profile in 9m 03s once the slot was acquired; full log retained in the cluster work area, logs/check-after.txt).

So the --all-targets -D warnings surface goes 24 → 0 with this PR. Combined with the green CI jobs (Rust tests / macOS / goldens / cross-target / shell functionality), the only remaining red is the master-vs-master ledger cmp adjudicated in the previous comment, which is independent of this diff.

caomengxuan666 added a commit that referenced this pull request Oct 29, 2026
… table with #1898

Master advanced eight PRs while this family was in flight. The
one semantic intersection is PR #2011 (S5 registry faces,
niubash#627): it added special_dev_entries() — the listable /dev
table — with zero/full deliberately absent and a consistency pin
stating that a future /dev/zero simulation (audit D5) must
update the table in the same change. #1898 is that simulation:
the table now lists zero/full as leaf entries and the doc
comment records the move. Everything else auto-merged cleanly
(notably #2022's #1965 guard-strip alongside #1966, and #2010's
-D warnings hygiene).

Verified on the merged tree: cargo check --all-targets -D
warnings is clean for the library and every target this family
touches; the single remaining error (dead 'status' field in
tests/issue1941_1948_sim_layer_option_regressions.rs) is
byte-identical to master 1f007cc — master's own debt, not this
branch's.
@caomengxuan666
caomengxuan666 deleted the fix/alltargets-hygiene branch October 30, 2026 01:41
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