Skip to content

winx3-misc — #1307 #1308 #1334 #1335 #1336 #1337 #1338 #1339 #1340 #1341 #1342 #1343 (r5 verified; held on #1308 ln verbose divergence) - #1393

Merged
caomengxuan666 merged 12 commits into
mainfrom
winx3-misc
Oct 27, 2026
Merged

caomengxuan666 merged 12 commits into
mainfrom
winx3-misc

Conversation

@caomengxuan666

@caomengxuan666 caomengxuan666 commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

winx3-misc cluster — misc fixes for 12 issues. Round-5 status (2026-10-27): rebased onto main beb56558, binary verification COMPLETE (Wine healed) — but NOT merged: verification found one real divergence in the #1308 fix itself (ln backup verbose prints an extra line). Held in draft for adjudication; see "Blocking divergence" below. All other verification is green or adjudicated environmental.

Update (2026-10-27, later): commit b8d5cef (Devin, on this rebased base) reverts the #1337 dirname change as platform-intentional (see the #1337 row), corrects two inherited tests (stat #1334, tail #1342), and reports MSVC verification (98/98 touched-area; full ctest = only the environmental set identical to main). Merge ownership for this PR now sits with that line / the main session; this window does not merge it. The #1308 ln verbose divergence below is not addressed by b8d5cef and remains open for adjudication.

Coverage

Issue Change Commit (rebased)
#1307 ls: bare --color means always, not auto (GNU 9.4 measured: color escapes are emitted even piped with LS_COLORS set). Residual: explicit --color= (empty) is indistinguishable from bare --color in the option parser, so it also means always; GNU errors on it instead. 8b8b829
#1308 ln: --backup becomes OPTIONAL_STRING with GNU argmatch control parsing (exact 8 names, unique prefixes, invalid/ambiguous diagnostics), numbered backups continue at max+1 (was first-free), verbose backup line matches GNU form. Point 2 (dangling target + existing dest) pre-judged not-reproduced — confirmed on the built binary in round 5 (probe 1308d MATCH). 288d818
#1334 stat: \xHH escapes expanded in --printf; an explicit format beats -t regardless of option order (was: -t after -c silently won). 5f416a6
#1335 ls: --quoting-style=locale implemented (C-locale form); --sort values resolve exact-then-unique-prefix with GNU-style invalid/ambiguous diagnostics. Documented divergence: this command's value set is a superset of GNU's (it also has name/type), so n/t stay ambiguous here where GNU resolves them to none/time. 5b1f678
#1336 No code change: pre-judged not-a-bug (the issue's claimed GNU rc0 for test -- -n x is wrong; GNU coreutils 9.4 gives rc2, matching this command). Confirmed on the built binary in round 5 (probes 1336a/1336b: rc and semantics equal; residual diff is program-name prefix + quote glyphs only). —
#1337 dirname: all-separator collapse REVERTED by b8d5cef: on this platform // is the MSYS/UNC root and is deliberately preserved (#1196/#1198 tests encode it); the audit compared against Linux GNU, where // is not a distinct root. Issue stays open as a platform-intentional divergence; regression case 61 and its index row are dropped by b8d5cef. (This window's probe MATCH was against Linux GNU only and is superseded by that platform adjudication.) 8734c77, reverted in b8d5cef
#1338 grep: negative -B/-A/-C/-NUM values rejected with GNU's invalid context length argument diagnostic (was silently accepted). 95c636a
#1339 sed: address-regex escapes keep their backslash (only the delimiter itself is unescaped), same shape as the s/// pattern reader; /\./ no longer degrades to "any char". Overlap check vs PR #1299: its sed.cpp change is confined to substitute_line; parse_address is untouched by it. Rebase re-verified: both changes coexist. c2d4256
#1340 sort: -V ordering rewritten to filevercmp (verrevcmp + leading-dot rule + version-suffix cut). Also fixes ls --sort=version, which shares the function. 500-random-string differential on the built binary: byte-identical MATCH (round 5). 1342d35
#1341 uniq: explicitly given negative -w rejected with GNU's invalid number of bytes to compare (was slipping past the existing guard). Residual: -w ≤ -2 still hits the pre-existing generic guard first. e14592d
#1342 tail: with -z, file headers and the blank separator line stay newline-terminated (GNU: -z applies to records only). 4bd804d
#1343 echo: \E is not an escape; echo -e now prints it literally (was emitting ESC, same as \e). 167ae8b

Each fix commit also carries its differential regression case (tests/differential/regressions/56–59, 61–67; slot 60 intentionally vacant for #1336) and its index.tsv row. Rebase onto beb56558 had exactly one conflict (index.tsv tail row — both rows kept, numbering continues).

Round-5 verification (2026-10-27, winx window successor 3)

  • Build: full mini harness build green on attempt 1 — mini.exe 15,871,571 bytes (GCC 16.2 via Wine, -j1 -k 0). Local grammar adaptations needed under GCC modules (dependent-template ctx.template get<T> disambiguator) now total six files — cat ×35, ln ×28, mv ×18, tail ×7, echo ×3, head ×1 — all worktree-only, registered in the cluster's local-patches.txt, none in these commits (committed text stays MSVC-form; verified at HEAD).
  • Probes (probes-baseline.sh, 21 cases): MATCH=13, DIFF=8, every DIFF adjudicated:
    • Probe-harness flaw (not product): cmp_case runs mini first and GNU second in the same directory, so the GNU column for stateful ln cases reflects mini's leftovers, not fresh state. Fresh-state GNU runs (manual, coreutils 9.4) were used for adjudication below.
    • Wine artifact (not product): symlink creation is silently swallowed by this Wine 9.0 environment for every Win32 program — control: Wine's own cmd /c mklink returns success and creates nothing (absent in both Linux and Wine dir views). So ln -s end-state cannot be observed locally; hard-link machinery is fully observable and correct (ln -vb: dest shares srcfile's inode; dest~ content correct; numbered backups continue at max+1: .~2~, .~4~). ln -s end-state verification defers to Windows CI.
    • Locale/quote-glyph class: 1308a (argmatch diagnostic: ASCII quotes vs GNU locale ‘ ’), 1335a/b (ls locale quoting, same glyph class), 1336b (program-name prefix test: vs invoked-path + glyphs; rc/semantics identical), 1334a (stdout/stderr interleave order in merged capture; content byte-identical). Recorded for adjudication with the rootaudit locale-noise class.
    • Real divergence: the ln verbose double line — see below.
  • sortV-rand-diff: 500 deterministic strings, byte-identical MATCH.
  • ln combo probe (ln -s --backup=simple -b): backup name/content correct; link end-state Wine-invisible (artifact above).

Blocking divergence — #1308 ln verbose prints one extra line

Fresh state, GNU coreutils 9.4 prints exactly one verbose line when a backup is made — the backup form replaces the plain form:

argv GNU 9.4 (fresh) this branch (fresh)
ln -svb srcfile dest 'dest~' ~ 'dest' -> 'srcfile' both that line and 'dest' -> 'srcfile'
ln -vb srcfile dest 'dest~' ~ 'dest' => 'srcfile' both lines (=> forms)
ln -sv --backup=numbered (.~1~ present) 'dest.~2~' ~ 'dest' -> 'srcfile' both lines

The #1308 change added the GNU backup line but did not suppress the plain link line when a backup was made. Fix direction (for the follow-up, not applied here): when a backup rename happened, emit only the backup-form line. This PR is therefore held in draft and not merged; the other 11 issues' changes are verified as above. Full evidence: ~/workspace/merge-sprint/winx-window/REPORT.md round 5 and the cluster REPORT.

i18n

Catalog sync delivered as winuxcmd-i18n PR #13 (draft): exactly +2 keys (command.ln.option.b, legacy.c28c37bb57d74bc1 — the stat \x warning), 0 changed/removed; VERSION 0.6.21 → 0.6.25 per the recorded queue (re-check and re-bump at merge time). The remaining new diagnostics (grep/uniq/ln/ls) are dynamically composed strings, not extractable literals — same uncatalogued pattern as existing composed errors. PR #13 merges after this PR.

Fixes #1307
Fixes #1308
Fixes #1334
Fixes #1335
Fixes #1336
Fixes #1338
Fixes #1339
Fixes #1340
Fixes #1341
Fixes #1342
Fixes #1343

@caomengxuan666 caomengxuan666 changed the title WIP: winx3-misc — #1307 #1308 #1334 #1335 #1336 #1337 #1338 #1339 #1340 #1341 #1342 #1343 winx3-misc — #1307 #1308 #1334 #1335 #1336 #1337 #1338 #1339 #1340 #1341 #1342 #1343 (r5 verified; held on #1308 ln verbose divergence) Oct 27, 2026
…uite

- dirname: revert the #1337 all-separator collapse. On this platform //
  is the MSYS/UNC root and is deliberately preserved (#1196/#1198 tests
  encode it); the audit compared against Linux GNU where // is not a
  distinct root. Issue #1337 stays open as a platform-intentional
  divergence; regression case 61 and its index row are dropped.
- stat test: GNU keeps an explicit -c format regardless of a later -t
  (probed in #1334); the inherited test asserted the opposite.
- tail test: with -z, GNU keeps headers and section separators
  newline-terminated (probed in #1342); the inherited test encoded the
  pre-fix NUL form.

Verified on the rebased base (beb5655): MSVC Debug build green;
98/98 touched-area tests pass; full ctest retains only the 11
environmental failures that reproduce identically on origin/main
(LongPathsEnabled=0, no CONIN$ console under the test runner).

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@caomengxuan666

Copy link
Copy Markdown
Member Author

Verification landed on the rebased branch (fixup b8d5cef):

i18n: companion catalog PR unixwin/winuxcmd-i18n#13 already carries this branch's two new keys (command.ln.option.b, legacy.c28c37bb57d74bc1 stat escape warning).

@caomengxuan666
caomengxuan666 marked this pull request as ready for review October 27, 2026 03:46
@caomengxuan666
caomengxuan666 merged commit 90b043b into main Oct 27, 2026
7 of 8 checks passed
@caomengxuan666
caomengxuan666 deleted the winx3-misc branch October 27, 2026 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment