Repository navigation
WIP: test(differential): record the W2 case set 75-81 and wc/12 in baseline.json (Refs #1462) - #1483
Closed
caomengxuan666 wants to merge 1 commit into
Closed
caomengxuan666 wants to merge 1 commit into
caomengxuan666 wants to merge 1 commit into
Conversation
…e.json (Refs #1462) The differential cases added by the audit fixes were never formally recorded in baseline.json: regressions/75-81 (tsort successor order, tsort extra operand, tsort odd tokens, tsort open error, od obsolescent letters -D -e -H -O, od spec argv order, ptx --format=tex) from PR #1471 (0b0cefa), and corpus/wc/12-control-transparent from PR #1472 (3cef8d7). Until recorded, compare-baseline.py would report every one of them as a new case on any full run. Recorded verdicts, all PASS, measured on this machine: - subject: winuxcmd.exe built from main 62e5f7c (1.1.20), Release x64, MSVC 14.51.36231, CMake 4.3.1, Windows 10.0.19045 x64 - oracle: WSL GNU coreutils 9.4 via GNU_BIN=/usr/bin, runner in the recorded WSL interop shape, ORACLE_LOCALE=C - runner report headers show every oracle resolution as gnu-bin (/usr/bin/{tsort,od,ptx,wc}); no host-allowlisted oracle answers any of the eight cases Raw artifacts (runner reports, per-command results TSVs, census): target/issue-diff-75-81/ (local, not committed). Census observation from the same machine (out of scope here, left for maintainers): a full-corpus run at 62e5f7c shows 116 further corpus cases never recorded in baseline.json, and 18 buckets that differ from their recorded state (15 diffs + 3 oracle:msys cases recorded PASS that SKIP under this oracle). Main's own baseline CI job is red at this commit with the same family of diffs.
This was referenced Nov 1, 2026
caomengxuan666
added a commit
that referenced
this pull request
Nov 1, 2026
…ine half) The GNU master differential gate has been red on main since 2026-10-29: the audit waves landed corpus cases whose product behavior was never matched, and the merge of #1468 (audit-w7-util-linux) recorded them as OUT_DIFF/EXIT_DIFF in baseline.json without whitelisting or fixing - the runner's zero-unexplained-diff rule then fails every run. All 23 cases adjudicated against the pinned oracle (GNU_BIN=/usr/bin, Ubuntu 24.04, coreutils 9.4, /usr/bin/kill = procps-ng 4.0.4): Product fixes (22 cases): - kill (11): /usr/bin/kill is procps-ng 4.0.4, not util-linux/uutils kill. Rewritten to the procps contract: -l NAME prints the NUMBER and -l NUM (1..31) the NAME; 0/32+/unknown names warn 'unknown signal name X' on stderr at exit 0; -l converts only its first operand; Linux ABI table (USR1=10, no RTMIN); no-args and unknown options (-p, -n, ...) print the procps usage block at exit 1; operands are PIDs only ('failed to parse argument: X'); delivery errors read 'kill: (PID): <errno>' with ESRCH before EINVAL; exit 0/1. New opt.cppm policy allow_unknown_long_options_as_positionals so kill can deliver its own option diagnostic. kill unit tests moved to the same contract. - date (3): %+ passes through literally (no local %c-with-zone expansion); -I argmatch list order hours,minutes,date,seconds,ns; -r FILE error uses quotef (quote only when needed, so plain names print unquoted). - env (1): '=x' empty-name assignments are accepted like glibc putenv does (child blocks drop them - CreateProcessW rejects empty-name entries, documented divergence); case reshaped to 'env -i =x' since a full env dump can never byte-match through interop. - printenv (2): cases looked up LC_ALL, which the WSL-side launch never delivers to the Windows subject; the runner now exports WINUX_DIFFVAR to both sides (WSLENV no-flag = verbatim) and the cases use it. - nice (1): invalid adjustment prints one line (no Try tail). - pathchk (1): route system-category error codes through the shared Win32->POSIX mapping so ENOTDIR reads 'Not a directory'. - stty (1): the recover form is exactly 36 fields (GNU termios shape); stty -g emits 36 to keep the round-trip, so the 10-field case is 'invalid argument' before -F is opened. - timeout (1): missing operand prints only the Try line (GNU has no message there), exit 125. - regressions/70: passes with the ordered env entries fix from #1352. Whitelist (1): - mktemp/05: mkstemp names are random by contract; the shape is pinned natively by the unit tests. baseline.json: the 12 entries recorded OUT_DIFF/EXIT_DIFF for these cases are re-recorded PASS (ratchet tightened; nothing else touched - the 116 never-recorded and 18 mismatched entries stay for #1462/#1483). Verified locally (Ubuntu-GitLab WSL, coreutils 9.4, WINUXCMD_BIN= build-vs): full corpus 642 cases -> 598 PASS / 35 KNOWN_DIFF / 5 SKIP / 4 EXIT_DIFF, where the four (diff3/25, install/02, locate/01, locate/02) are local host-allowlist noise (this machine resolves the allowlisted host binaries into the local Niubash install; CI resolves Git-for-Windows ones and records them PASS). Unit tests for the touched commands: 260/260.
caomengxuan666
added a commit
that referenced
this pull request
Nov 1, 2026
compare-baseline demands every corpus case be recorded; the audit waves added 124 case files without ledger entries, which kept the baseline job red behind the runner gate (and 3 msys-oracle cases were recorded PASS instead of the linux shape's SKIP). This records every case's verdict from the verified CI run 41324820632 (642 cases: 599 PASS, 38 KNOWN_DIFF, 5 SKIP; the runner gate reported Differences: 0), including the whitelist-driven reclassifications the linux shape carries (cal ncal artifacts, updatedb/01, regressions/12/42/56/57/70, mkdir/30). This absorbs the never-recorded census from #1483's survey into the ledger as data; the 18 recorded-but-mismatched investigations remain with #1462.
caomengxuan666
added a commit
that referenced
this pull request
Nov 1, 2026
…ine half) (#1494) * fix(differential): adjudicate the 23 gate-blocking cases (#1486 baseline half) The GNU master differential gate has been red on main since 2026-10-29: the audit waves landed corpus cases whose product behavior was never matched, and the merge of #1468 (audit-w7-util-linux) recorded them as OUT_DIFF/EXIT_DIFF in baseline.json without whitelisting or fixing - the runner's zero-unexplained-diff rule then fails every run. All 23 cases adjudicated against the pinned oracle (GNU_BIN=/usr/bin, Ubuntu 24.04, coreutils 9.4, /usr/bin/kill = procps-ng 4.0.4): Product fixes (22 cases): - kill (11): /usr/bin/kill is procps-ng 4.0.4, not util-linux/uutils kill. Rewritten to the procps contract: -l NAME prints the NUMBER and -l NUM (1..31) the NAME; 0/32+/unknown names warn 'unknown signal name X' on stderr at exit 0; -l converts only its first operand; Linux ABI table (USR1=10, no RTMIN); no-args and unknown options (-p, -n, ...) print the procps usage block at exit 1; operands are PIDs only ('failed to parse argument: X'); delivery errors read 'kill: (PID): <errno>' with ESRCH before EINVAL; exit 0/1. New opt.cppm policy allow_unknown_long_options_as_positionals so kill can deliver its own option diagnostic. kill unit tests moved to the same contract. - date (3): %+ passes through literally (no local %c-with-zone expansion); -I argmatch list order hours,minutes,date,seconds,ns; -r FILE error uses quotef (quote only when needed, so plain names print unquoted). - env (1): '=x' empty-name assignments are accepted like glibc putenv does (child blocks drop them - CreateProcessW rejects empty-name entries, documented divergence); case reshaped to 'env -i =x' since a full env dump can never byte-match through interop. - printenv (2): cases looked up LC_ALL, which the WSL-side launch never delivers to the Windows subject; the runner now exports WINUX_DIFFVAR to both sides (WSLENV no-flag = verbatim) and the cases use it. - nice (1): invalid adjustment prints one line (no Try tail). - pathchk (1): route system-category error codes through the shared Win32->POSIX mapping so ENOTDIR reads 'Not a directory'. - stty (1): the recover form is exactly 36 fields (GNU termios shape); stty -g emits 36 to keep the round-trip, so the 10-field case is 'invalid argument' before -F is opened. - timeout (1): missing operand prints only the Try line (GNU has no message there), exit 125. - regressions/70: passes with the ordered env entries fix from #1352. Whitelist (1): - mktemp/05: mkstemp names are random by contract; the shape is pinned natively by the unit tests. baseline.json: the 12 entries recorded OUT_DIFF/EXIT_DIFF for these cases are re-recorded PASS (ratchet tightened; nothing else touched - the 116 never-recorded and 18 mismatched entries stay for #1462/#1483). Verified locally (Ubuntu-GitLab WSL, coreutils 9.4, WINUXCMD_BIN= build-vs): full corpus 642 cases -> 598 PASS / 35 KNOWN_DIFF / 5 SKIP / 4 EXIT_DIFF, where the four (diff3/25, install/02, locate/01, locate/02) are local host-allowlist noise (this machine resolves the allowlisted host binaries into the local Niubash install; CI resolves Git-for-Windows ones and records them PASS). Unit tests for the touched commands: 260/260. * test(differential): record failing-case evidence; fix pathchk ENOTDIR across filesystem views - runner.sh appends a 'Failing case evidence' section to the report for every unexplained mismatch: both sides' rc, stdout and stderr. A CI-only divergence is otherwise undiagnosable from its bucket alone (whitelist entries are expected to cite byte-level evidence). - pathchk: POSIX lstat answers ENOTDIR when a non-final component is a file, but the not-found verdict for 'regfile/file' depends on which Win32 filesystem view answers (NTFS gives ERROR_DIRECTORY; the 9p/UNC view of the WSL work directory can give a not-found class, which made differential pathchk/01 exit 0 on the CI runner while passing locally). The not-there path now walks the component chain: the first existing prefix that is not a directory pins 'Not a directory'. * fix(pathchk): make_api_path_operand already yields the wide path; runner evidence skips KNOWN_DIFF * test(differential): whitelist regressions/70 as interop-PATH environment noise The recorded evidence (baseline-report.md, run 41323739882) shows both sides agree on the -i block and the assignment order (Z=1, A=2, rc 0); the CI subject's extra TERM/HOME lines come from the inner env resolving to the WSL /usr/bin/env through the interop bridge, because the baseline workflow builds only the winuxcmd target and build-vs carries no per-command env.exe. Same environment category as whereis/02; passes in the full-build shape. * test(differential): restore whitelist-linux.txt (API base64 truncation clobbered it; the previous commit intended only to append the regressions/70 entry) * test(differential): record the full 642-case coverage in baseline.json compare-baseline demands every corpus case be recorded; the audit waves added 124 case files without ledger entries, which kept the baseline job red behind the runner gate (and 3 msys-oracle cases were recorded PASS instead of the linux shape's SKIP). This records every case's verdict from the verified CI run 41324820632 (642 cases: 599 PASS, 38 KNOWN_DIFF, 5 SKIP; the runner gate reported Differences: 0), including the whitelist-driven reclassifications the linux shape carries (cal ncal artifacts, updatedb/01, regressions/12/42/56/57/70, mkdir/30). This absorbs the never-recorded census from #1483's survey into the ledger as data; the 18 recorded-but-mismatched investigations remain with #1462. * test(differential): compare-baseline explains declared-shape skips A case whose file declares 'oracle:' or 'subject:' runs only in that shape; under the recorded linux/interop shape runner.sh SKIPs it by construction. Recording that skip clashed with the growth gate (PASS -> SKIP counts as worsening), while not recording it tripped 'unexplained skip' - the two gates disagreed about msys-oracle cases (basename/50, dirname/03, test/13). The declaration in the case file is itself the explanation, so compare-baseline now accepts such skips regardless of the recorded bucket, and the ledger keeps those cases' recorded PASS (the verdict of the shape that can actually run them). --------- Co-authored-by: cmx <[email protected]>
Member
Author
|
Superseded by #1494, which just merged: the full-coverage baseline recording there includes all eight cases this PR was adding (wc/12 + regressions/75-81, all PASS, ledger now at 642 cases), and re-landing this branch's diff on top would revert the ledger to the unsorted 518-entry shape. The #1462 census data referenced in the body remains valid for the 18 recorded-but-mismatched investigations. |
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.
Refs #1462 (baseline supplement family; the runner-oracle half of the family is #1478 / PR #1481)
What
baseline.jsonnever recorded eight differential cases that earlier merged audit fixes added to the corpus. Until recorded,compare-baseline.pyreports each of them as anew caseon any full gated run. This PR appends the eight entries, all measured, all PASS:regressions/75-tsort-successor-order.caseregressions/76-tsort-extra-operand.caseregressions/77-tsort-odd-tokens.caseregressions/78-tsort-missing-file.caseregressions/79-od-legacy-letters.caseregressions/80-od-spec-order.caseregressions/81-ptx-format-tex.casecorpus/wc/12-control-transparent.caseProvenance of the cases (why they were never recorded): regressions 75-81 landed with PR #1471 (
0b0cefab, fix(audit-w2): tsort/od/ptx/uniq/sort oracle-contract divergences, 2026-10-31);corpus/wc/12landed with PR #1472 (3cef8d72, wc control-character transparency, 2026-10-31). Neither batch registered its rows inbaseline.json— the same gap this PR closes for these eight.How measured
winuxcmd.exebuilt from this tree at62e5f7ce(PROJECT_VERSION 1.1.20), Release x64, Ninja,BUILD_MODE=RELEASE,USE_STATIC_CRT=ON, CI-identical flags (-DCMAKE_CXX_FLAGS="/std:c++latest /EHsc", C++23 import std). Toolchain: MSVC 14.51.36231 (VS 18 Community), CMake 4.3.1. Clean compile: 122 ninja targets, ~77 s wall.GNU_BIN=/usr/bin, runner executed inside WSL (bash runner.sh, the recorded WSL-interop subject-launch shape),ORACLE_LOCALE=C.--only):GNU_BIN=/usr/bin WINUXCMD_BIN=<build dir> bash runner.sh --only <cmd> --report <r>.md --results <r>.tsv.Oracle resolution (report headers — PR #1481's audit table)
Every oracle for the four involved commands resolved
gnu-bin, none host-allowlisted:Raw evidence (runner verdicts)
Byte-level spot checks (subject vs
/usr/binoracle, both sides byte-identical on stdout+stderr, identical exit codes):printf 'm a\nm z\n' | tsort→m,z,aon both (FIFO ready queue, reverse-read successor order).tsort one two→ both exit 1,tsort: extra operand 'two'+ try-help (runner-graded PASS: both sides print the bare name in the recorded shape).printf 'a b c\n' | tsort→ exit 1,tsort: -: input contains an odd number of tokensboth.tsort no-such-file-1462→ exit 1,tsort: no-such-file-1462: No such file or directoryboth.od -D -e -H -O f.bin→ byte-identical, rc 0=0 (obsolescent letters accepted).od -t x1 -b f.bin→ hex column precedes octal column on both:0000000 61 62/141 142/0000002.ptx --format=tex→ byte-identical, rc 0=0.2 4 18 ctrl.txtboth, rc 0=0.compare-baseline.pyover the newbaseline.jsonagainst the observed results:baseline OKfor all recorded keys (filtered-baseline check; raw script output in the artifacts).Verification gate note
The runner exits non-zero on its own unconditional tally ("unexpected differential case(s)") because that tally counts every non-PASS/non-SKIP/non-KNOWN_DIFF bucket regardless of baseline records — pre-existing recorded
OUT_DIFF/EXIT_DIFFrows (kill family, etc.) are counted there by design of the tally, not because this change introduced anything. Againstbaseline.json, the recorded keys of this PR are all PASS and cannot regress the gate (PASS ranks 0, tied with KNOWN_DIFF).Census observations from the same machine (out of scope, for maintainers)
A full-corpus run at
62e5f7ce(same subject/oracle shape, 630 cases: 577 PASS / 34 KNOWN_DIFF / 5 SKIP / 26 runner-tallied non-PASS) shows, vsbaseline.json:col/getconf/getopt/hexdump, mv/rm/shred/touch/install/mkfifo/mknod/sync/unlink sets, regressions 75-perf…120, etc.). Same recording gap as the eight this PR closes; a follow-up should record them in batches.date/29-percent-plus(PASS→OUT_DIFF),date/33-iso-nanoseconds-rejected,date/34-reference-missing,diff3/25-diff-program,env/03-empty-name-assignment,install/02-file,locate/01,locate/02,mktemp/05-tmpdir-interior(KNOWN_DIFF→OUT_DIFF),nice/02-empty-adjustment,pathchk/01-not-a-directory,printenv/29-option-after-operand,printenv/30-help-after-operand,stty/05-recover-form,timeout/04-missing-command, plus 3oracle: msys-pinned cases recorded PASS (basename/50-drive-suffix,dirname/03-drive-root,test/13-ef-same-device) that can only ever SKIP under the recorded WSL shape — a recording-shape inconsistency. Main's ownbaselineCI job is red at this commit ("23 unexpected differential case(s)"), so this census matches an already-red main rather than a new regression from this branch (which touchesbaseline.jsononly).Raw artifacts kept locally under
target/issue-diff-75-81/(runner reports, per-command TSVs, full census report + TSVs).