Repository navigation
fix(du): threshold xstrtoimax semantics + summarize/all conflict (Refs #1462) - #1794
Merged
Merged
Conversation
…#1462) The baseline gate's two red rows (the reason every fleet PR has been inheriting a red main since #1756-era merges): 1. du/05-threshold-neg-zero: the parser was a bare i64 parse — it accepted "--threshold=-0" (GNU rejects), rejected every SIZE suffix GNU accepts (du.c:899-903 xstrtoimax "kKmMGTPEZYRQ0"), and had no invalid-suffix / too-large message shapes. parse_threshold now mirrors gnulib xstrtol.c __xstrtol byte-for-byte: sign + digits, a lone suffix means 1, binary single suffixes k/K..Q, the '0' flag second suffix ("iB" binary, "B"/"D" decimal), the three xstrtol_error msgids ("invalid --threshold argument 'X'" / "invalid suffix in --threshold argument 'X'" / "--threshold argument 'X' too large", exit 1, no try-help), and du.c:906-912's negative-zero rejection with the LITERAL '-0' in the message however the zero was spelled. 2. du/02-summarize-all-conflict: "-a -s" ran silently. du.c:1004-1008 rejects the pair before any walk with "cannot both summarize and show all entries" + usage(EXIT_FAILURE)'s try-help line, rc 1. Also fixes the threshold UNIT (du.c:718-726): GNU compares against dui_to_print.size — the value ALREADY scaled for printing — while the pre-fix gate compared raw bytes, so a negative threshold never printed a row at all (probed: -4 elides an 8-block "." but keeps the 4-block "./sub"; -1024 shows both; -1 elides both). threshold_value feeds the scaled print value into the comparison at all three gates. GNU anchors: coreutils @5f6c02d3 src/du.c:899-913, :1004-1008, :718-726; gnulib xstrtol.c __xstrtol + xstrtol-error.c xstrtol_error. Verified against the WSL GNU 9.4 oracle probe class matrix (-0 rejected, 0 and negative non-zero accepted, 1k/-1k/k/1KiB scaled). cargo test winux-cmds 1016/1016. catalog/en-US.json: 3 new keys (summarize_conflict, invalid_threshold_suffix, threshold_too_large); zh-CN companion rides the winuxcmd-i18n sync chain.
caomengxuan666
added a commit
that referenced
this pull request
Nov 16, 2026
…pin identity The committed baseline still knew 645 cases (#1547 era); the corpus grew 26 split/... cases since, so compare-baseline.py failed every branch run with 'new case' errors once runner.sh's own unexpected-diff check stopped tripping first (#1794's runner leg is Differences: 0). Recorded from the #1794 CI differential artifact (PASS 630, KNOWN_DIFF 36, SKIP 5, Differences 0 — the du rows green under PR #1794's fix). Bucket audit vs origin/main: 26 adds all green; 3 recorded SKIPs are the WSL/dialect-shaped cases (basename/50, dirname/03, test/13) whose declared shapes cannot run under the Ubuntu-24.04 oracle — compare- baseline.py treats a recorded SKIP as the explained declared verdict.
…pin identity The committed baseline still knew 645 cases (#1547 era); the corpus grew 26 split/... cases since, so compare-baseline.py failed every branch run with 'new case' errors once runner.sh's own unexpected-diff check stopped tripping first (#1794's runner leg is Differences: 0). Recorded from the #1794 CI differential artifact (PASS 630, KNOWN_DIFF 36, SKIP 5, Differences 0 — the du rows green under PR #1794's fix). Bucket audit vs origin/main: 26 adds all green; 3 recorded SKIPs are the WSL/dialect-shaped cases (basename/50, dirname/03, test/13) whose declared shapes cannot run under the Ubuntu-24.04 oracle — compare- baseline.py treats a recorded SKIP as the explained declared verdict.
caomengxuan666
force-pushed
the
fix/du-threshold-conflict
branch
from
November 16, 2026 03:29
2986ee0 to
35c8f07
Compare
caomengxuan666
pushed a commit
that referenced
this pull request
Nov 16, 2026
zh-CN catalog 0.6.51 (77cd698) carries command.du.error.* keys ahead of their source landing in #1794; ps.option.windows and legacy.ce93f5c9d7140354 drift resolved by #1786 + catalog 0.6.50. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
caomengxuan666
added a commit
that referenced
this pull request
Nov 16, 2026
* test(stat): pin %F 'regular empty file' audit ruling (niubash#993 S9) (#1787) The audit flagged 'regular file' vs 'regular empty file' for `: > f`; current main already emits GNU 9.4's exact wording. No behavior change — pin the audit repro so it can't regress. * chore(i18n): refresh drift baseline — record du.error.* companion keys zh-CN catalog 0.6.51 (77cd698) carries command.du.error.* keys ahead of their source landing in #1794; ps.option.windows and legacy.ce93f5c9d7140354 drift resolved by #1786 + catalog 0.6.50. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> --------- Co-authored-by: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This was referenced Nov 16, 2026
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.
Closes the two red baseline rows that have been failing main's differential gate (du/02-summarize-all-conflict, du/05-threshold-neg-zero — the reason recent fleet PRs inherited a red baseline check).
What
threshold parsing (du.c:899-913, gnulib xstrtol.c __xstrtol)
--threshold=-0du: invalid --threshold argument '-0'rc 1 (du.c:906-912, literal '-0' however zero was spelled)--threshold=1k/-1k/k/1KiB--threshold=1kxdu: invalid suffix in --threshold argument '1kx'(xstrtol_error msgid)du: --threshold argument '…' too largesummarize/all conflict (du.c:1004-1008)
du -a -s .now fails before any walk:du: cannot both summarize and show all entries+Try 'du --help' for more information., rc 1 (empty stdout), byte-matching the oracle.threshold unit (du.c:718-726)
GNU compares the threshold against
dui_to_print.size— the value already scaled for printing. The pre-fix gate compared raw bytes, so negative thresholds never printed a row at all (probed:-4keeps the 4-block./suband elides the 8-block.;-1elides both;-1024keeps both).threshold_valuefeeds the scaled print value into all three gates.Verification
catalog/en-US.json: +3 keys (du error family); zh-CN companion rides the winuxcmd-i18n sync chain.