Repository navigation
fix(du/cksum): #1748 LX dir traversal, #1752 base64 check, #1753 dead enum - #1756
Merged
Merged
Conversation
… enum - du: followed LX child/operand dir links walk the target with operand spelling (gate du50/51) - cksum: accept base64 digests in check lines (digest.c valid_digits), hex unchanged - digest.cppm: drop the dead HashAlgorithm::Crc32b branch - cargo 944/0; cksum/du gtest 111; gate 86 pass
caomengxuan666
marked this pull request as ready for review
November 14, 2026 16:22
aphrody-dev
pushed a commit
to aphrody-labs/WinuxCmd
that referenced
this pull request
Nov 17, 2026
…unixwin#1462) The baseline gate's two red rows (the reason every fleet PR has been inheriting a red main since unixwin#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.
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 #1748 #1752 #1753. du walks followed LX directory links (child and operand) with operand spelling; cksum accepts base64 check lines per digest.c valid_digits while hex stays case-insensitive; removes the dead Crc32b enum. cargo 944/0; du/cksum gtest 111; gate 86 pass.