Repository navigation
rust2: help surface for the 13 driver-surface commands + df note upgrades (#1488) - #1563
Merged
Merged
Conversation
cargo fmt --check (the pre-commit hook) fails on main with the current toolchain: line-join/split drift in argopt, canon, mkdir, pwd, readlink, realpath, sync, test_cmd. Formatting only, no semantic change.
…#1488) The QC win audit (WIN-AUDIT.md, PR #1555) found a structural black hole: b2sum base32 base64 sha224sum sha384sum getconf hostname id nproc printenv tac uname whoami returned rc 0 with EMPTY stdout for --help/--version. Each now prints the probed WSL-oracle text byte-for-byte: - coreutils 9.4 bodies + gnuhelp::footer / gnuhelp::coreutils_version (new shared module) for the ten coreutils commands; the first --help/--version flag in argv wins, like getopt_long. - getconf carries the glibc 2.39 help/version verbatim (Ubuntu GLIBC 2.39-0ubuntu8.9 oracle, incl. its own bug-report footer). - hostname carries the Debian 3.23 contract: --help/-h print the DEBIAN_USAGE block on stdout and exit 255; --version prints 'hostname 3.23' rc 0 (probed rc 255/0). - printenv (wired) keeps the dispatcher contract in the product exe and prints the oracle bytes on the driver/FFI surface; the --abi path shares dispatch, so it gains the text automatically. Also registers the four wave2 modules that shipped unregistered on main (getconf/hostname/id/uname) — their 88 gate rows ran rc 127 (GATE-REPORT 'wiring lane scope' gap). Unit tests per command lock the shape/rc; the strict gate rows added in the next commit keep the bytes honest against WSL GNU. Verification: driver --help/--version for all 13 byte-compared against fresh 'env <cmd> --help|--version' captures (26/26 equal, rc equal); cargo test green (279 incl. new surface tests).
…branch (#1488) GNU df stats each operand as given (df.c main -> df_file); one the oracle cannot stat is the quotef'd 'df: X: No such file or directory' diagnostic with rc 1 and empty stdout (probed: df 'C:\\' / df 'C:\\Windows' / df -h 'C:\\' all rc 1 under WSL — drive-letter forms are not POSIX paths). The rust2 df instead resolved them through the Windows drive model (canonicalize -> mount -> volume table rc 0), inheriting the 1.x C++ applet's model that NOTE-QC.md registered as a masked divergence. Now drive-letter operands (is_drive_letter_form: X: / X:\\ / X:\\...) take the GNU branch; relative and statable operands keep the mount-point resolution both sides agree on. The diagnostic goes through digestsum's gnulib quotef approximation (now pub(crate)) so backslash names are quoted ('C:\\') and plain POSIX paths are not — same condition GNU uses; stderr wording itself stays recorded-not-gated. Gate rows flip in the next commit: df07/df09/df13/df15 win -> strict, df13-drive-path note gone, new df36-output-source-drive (the audited df12 scenario: df --output=source C:\\). Verification: bash gate/run-gate.sh df — 25 GNU-gated + 9 win rows all green; cargo test df:: green (12).
…ed (#1488) Task 1 rows (13 commands): the sole --help/--version rows promoted win -> strict for b2sum(base32/base64/sha224sum/sha384sum/tac/uname/id/ hostname/getconf/nproc/whoami — the driver now prints the probed oracle bytes, so the rows gate the text against GNU instead of comparing only rc with the branded C++ text; a regression to empty output now FAILS the gate). New version rows: b2a23, ta27, gc23 (getconf glibc version), plus printenv pe21-version which stays win like pe19 (printenv is a wired command — the product exe keeps the branded dispatcher text, true/false precedent). df rows: gen-cases.py df_rows had drifted from the wave1-deepening df.tsv (15 vs 35 rows; the generator was stale on main) — df_rows is now transcribed from the committed table so df.tsv is generator-backed again. Mode changes per the df.rs operand fix: df07-c-drive, df09-h- drive, df13-drive-path, df15-block-size-k win -> strict (rc 1, empty stdout, byte-equal to GNU on both sides), new df36-output-source-drive (the NOTE-QC df12 scenario: df --output=source C:\\). note-registry.tsv: drop the stale df12-output-subset/df13-drive-path rows (ids that only existed in the pre-deepening table; NOTE-QC audited them against an older lane driver whose df12 happened to error). The two remaining df notes are documented with probed claims: df24 (-x fstype exact match: rc parity, platform-inherent listing) and df33 (symlink operand needs Developer Mode; GNU rc 0 vs Windows rc 1). Verification: full bash gate/run-gate.sh (39 case tables) — 932 GNU-gated + 134 win cases, zero failures; gen-cases.py --dup-check has no new intra-command duplicates.
…ve (#1488) Regenerated from this tree with the worktree-built driver + Debug cpp baseline (provenance lines updated accordingly): - WIN-AUDIT.md — the 13 commands' structural help/version entries are gone: hostname/id/nproc/uname/whoami win rows classify fully aligned, and the digest/base32/base64/tac help/version rows left the win class entirely (now strict). Remaining df/printenv structural rows are the documented value-model listings and the wired product's branded --help/--version text (16 vs 23 lines), recorded not gated. - NOTE-QC.md — df's audited notes are now df24 (UPGRADE-EXIT candidate: rc parity holds, stdout platform-form-bound) and df33 (MASKED-DIVERGENCE, re-justified in note-registry.tsv: Developer-Mode symlink creation). Other commands' notes (ln/stat/test/chown) are re-inventoried for their lanes. - COVERAGE.md / GATE-REPORT.md — per-command counts after the row promotions + new rows; GATE-REPORT gains the help-surface refresh narrative. Full gate: 932 GNU-gated + 134 win, all green.
caomengxuan666
force-pushed
the
rust2/help-surface
branch
from
November 11, 2026 02:03
b3b57ea to
a23cfd6
Compare
This was referenced Nov 11, 2026
Merged
Merged
caomengxuan666
added a commit
that referenced
this pull request
Nov 12, 2026
… to exit (#1488 QC round 2) QC round-2 drift check (#1563 leftover 1): two opposite drift directions had accumulated since the QC layer landed. - chmod/chown: the committed TSVs were AHEAD of the generator - the wave1-deepening lanes added cm23-cm45 / cw17-cw36+cw25b directly to the TSVs, so a regeneration silently DROPPED 45 rows. Those rows are now transcribed into gen-cases.py (order byte-identical to the committed tables); per-table provenance comments survive regeneration via TABLE_NOTES. - wave2 family (12 tables): the wave2b wiring lane regenerated its TSVs from a stale pre-#1563 generator copy, reverting the 24 sole --help/--version rows back to win (4a28e23). The generator on main already says strict, so regenerating re-restores #1563�s promotion; the fresh ledger gates those rows byte-for-byte against GNU (b2a19/b2a23/un17/wa05...: r=g:yes, all green). df24-x-case-sensitive: NOTE-QC round 1 verdict UPGRADE-EXIT is now acted on - rc parity 0==0 stable across 3 fresh probes, stdout is the platform-inherent listing (GNU ext4 mount table vs Windows volume listing), which is exactly the exit-mode contract. note -> exit; the registry entry is retired with the promotion recorded in a generator comment. Regeneration is a no-op again (verified); full gate after the change: 1197 GNU-gated + 146 win rows, zero failures.
caomengxuan666
added a commit
that referenced
this pull request
Nov 12, 2026
… the help-surface sweep (#1488 QC round 2) - cpp_bin(): the default resolved into rust2/build-vs/... (build-vs is a TREE-root sibling, not under rust2/) — every QC-script cpp side degraded to 'missing exe' -> rc None until CPP_BIN was exported. Found by the round-2 NOTE-QC sweep; the env override still wins. - rust_bin_for(): the wave2 lane-driver split is retired - #1566/#1568/ #1570 wired every wave2/3 command to main, so one driver covers all 47 tables; RUST_BIN_W2 stays only as an override. provenance() now prints a single rust= line (splits only when overridden). - to_mnt() helper extracted from run_gnu_side's inline path mapping. - qc_note_audit/qc_win_audit re-run templates no longer require RUST_BIN_W2. - NEW gate/qc_help_surface.py -> HELP-SURFACE.md: standing sweep of every implemented command (47 gen-cases tables) x --help/--version/-h/--bogus, rust2 driver vs GNU 9.4 (batched per-command WSL scratch, /tmp/winuxcmd-gate-qc-help). Round-2 sweep verdicts (188 probes): 15 commands fully ALIGNED on --help/--version (the #1563 13 + test/bracket), 61 EMPTY-HELP + 19 RC-ONLY findings - all on the LIBRARY/driver surface; the product exe's help face is covered by dispatcher metadata (verified basename/ mkdir/seq/join/expand/numfmt/tsort/timeout/stat print usage). RC-ONLY headliners: hostname --bogus rc 1 vs GNU 255 (Debian hostname contract), getconf --bogus rc 1 vs GNU 2, and -h treated silently rc 0 vs GNU invalid-option rc 1 on the argopt-era commands (same class as the hostid ho12 / users us17 notes).
caomengxuan666
added a commit
that referenced
this pull request
Nov 12, 2026
…tool layer (#1488 QC round 2) - 'all 15 commands, 338 cases' -> 'all 47 commands, 1343 cases'. - New QC tool layer subsection: coverage/dup-check/note-audit/win-audit/ help-surface entry points and the note-registry contract. - Documents that generator-backedness broke twice (df in #1563, chmod/chown/wave2 in the round-2 sweep) and why TSVs are generated. - Wiring status: 44 commands via WINUXCMD_RUST2_COMMANDS (waves 1/2a/2b/3a/3b); chmod/chown/df still carry 1.x C++ bodies.
caomengxuan666
added a commit
that referenced
this pull request
Nov 13, 2026
… to exit (#1488 QC round 2) QC round-2 drift check (#1563 leftover 1): two opposite drift directions had accumulated since the QC layer landed. - chmod/chown: the committed TSVs were AHEAD of the generator - the wave1-deepening lanes added cm23-cm45 / cw17-cw36+cw25b directly to the TSVs, so a regeneration silently DROPPED 45 rows. Those rows are now transcribed into gen-cases.py (order byte-identical to the committed tables); per-table provenance comments survive regeneration via TABLE_NOTES. - wave2 family (12 tables): the wave2b wiring lane regenerated its TSVs from a stale pre-#1563 generator copy, reverting the 24 sole --help/--version rows back to win (4a28e23). The generator on main already says strict, so regenerating re-restores #1563�s promotion; the fresh ledger gates those rows byte-for-byte against GNU (b2a19/b2a23/un17/wa05...: r=g:yes, all green). df24-x-case-sensitive: NOTE-QC round 1 verdict UPGRADE-EXIT is now acted on - rc parity 0==0 stable across 3 fresh probes, stdout is the platform-inherent listing (GNU ext4 mount table vs Windows volume listing), which is exactly the exit-mode contract. note -> exit; the registry entry is retired with the promotion recorded in a generator comment. Regeneration is a no-op again (verified); full gate after the change: 1197 GNU-gated + 146 win rows, zero failures.
caomengxuan666
added a commit
that referenced
this pull request
Nov 13, 2026
… the help-surface sweep (#1488 QC round 2) - cpp_bin(): the default resolved into rust2/build-vs/... (build-vs is a TREE-root sibling, not under rust2/) — every QC-script cpp side degraded to 'missing exe' -> rc None until CPP_BIN was exported. Found by the round-2 NOTE-QC sweep; the env override still wins. - rust_bin_for(): the wave2 lane-driver split is retired - #1566/#1568/ #1570 wired every wave2/3 command to main, so one driver covers all 47 tables; RUST_BIN_W2 stays only as an override. provenance() now prints a single rust= line (splits only when overridden). - to_mnt() helper extracted from run_gnu_side's inline path mapping. - qc_note_audit/qc_win_audit re-run templates no longer require RUST_BIN_W2. - NEW gate/qc_help_surface.py -> HELP-SURFACE.md: standing sweep of every implemented command (47 gen-cases tables) x --help/--version/-h/--bogus, rust2 driver vs GNU 9.4 (batched per-command WSL scratch, /tmp/winuxcmd-gate-qc-help). Round-2 sweep verdicts (188 probes): 15 commands fully ALIGNED on --help/--version (the #1563 13 + test/bracket), 61 EMPTY-HELP + 19 RC-ONLY findings - all on the LIBRARY/driver surface; the product exe's help face is covered by dispatcher metadata (verified basename/ mkdir/seq/join/expand/numfmt/tsort/timeout/stat print usage). RC-ONLY headliners: hostname --bogus rc 1 vs GNU 255 (Debian hostname contract), getconf --bogus rc 1 vs GNU 2, and -h treated silently rc 0 vs GNU invalid-option rc 1 on the argopt-era commands (same class as the hostid ho12 / users us17 notes).
caomengxuan666
added a commit
that referenced
this pull request
Nov 13, 2026
…tool layer (#1488 QC round 2) - 'all 15 commands, 338 cases' -> 'all 47 commands, 1343 cases'. - New QC tool layer subsection: coverage/dup-check/note-audit/win-audit/ help-surface entry points and the note-registry contract. - Documents that generator-backedness broke twice (df in #1563, chmod/chown/wave2 in the round-2 sweep) and why TSVs are generated. - Wiring status: 44 commands via WINUXCMD_RUST2_COMMANDS (waves 1/2a/2b/3a/3b); chmod/chown/df still carry 1.x C++ bodies. # Conflicts: # rust2/README.md
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 parts of #1488 (help surface) and resolves the two df note findings from the #1555 QC audit.
Task 1 — 13 commands with empty --help/--version (WIN-AUDIT structural black hole)
The Rust driver printed NOTHING for
--help/--versionon b2sum, base32, base64, sha224sum, sha384sum, getconf, hostname, id, nproc, printenv, tac, uname, whoami. Each now prints the probed WSL-oracle text byte-for-byte (26/26 stdout+rc comparisons against freshenv <cmd> --help|--versioncaptures under WSL):(GNU coreutils) 9.4+ authors(GNU coreutils) 9.4(GNU coreutils) 9.4getconf (Ubuntu GLIBC ...) 2.39hostname 3.23rc 0Shared builders live in the new
winux-cmds/src/gnuhelp.rs; the first flag in argv wins (getopt_long order,--version --helpprobed on all oracle families). Per-command unit tests lock shape + rc.Also registers the four wave2 modules that shipped unregistered on main (
getconf/hostname/id/uname) — their 88 gate rows ran rc 127 (the gap GATE-REPORT deferred to "wiring lane scope").Task 2 — df note upgrades (NOTE-QC.md)
df C:\Windows): GNU df stats each operand as given (df.c); drive-letter forms are not POSIX paths → quotef'ddf: 'X': No such file or directory, empty stdout, rc 1 (probed forC:\,C:\Windows,-h/-kvariants). df.rs now takes that branch for drive-letter operands (is_drive_letter_form) instead of resolving the drive; relative/statable operands keep mount-point resolution. df13-drive-path win → strict (rust rc 1 == GNU rc 1, byte-equal stdout; the fresh Debug cpp baseline also errors here — r=c:yes).df --output=source C:\): same operand class, added as df36-output-source-drive strict (the NOTE-QC iddf12-output-subsetno longer exists in the wave1-deepening table). The same class forced df07/df09/df15 win → strict, where they pass byte-equal against GNU; cpp's drive-root model stays recorded (r=c:no).gen-cases.pydf_rows had drifted from the committed df.tsv (15 vs 35 rows) — df_rows is now transcribed from the committed table so df.tsv is generator-backed again. note-registry.tsv: stale df12-output-subset/df13-drive-path rows deleted; the two real df notes documented with probed claims (df24 fstype exact-match, df33 Developer-Mode symlink).bash gate/run-gate.sh df: 25 GNU-gated + 9 win rows all green. Full gate (39 tables): 932 GNU-gated + 134 win, zero failures;cargo testgreen;cargo fmt --checkclean (fmt drift in 8 untouched files fixed first).QC artifacts regenerated from this tree: WIN-AUDIT.md (hostname/id/nproc/uname/whoami now fully aligned; digest family left the win class), NOTE-QC.md, COVERAGE.md, GATE-REPORT.md (+ refresh narrative).