Repository navigation
fix(differential): adjudicate the 23 gate-blocking cases (#1486 baseline half) - #1494
Merged
Merged
Conversation
…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
force-pushed
the
fix/1486-baseline-23
branch
from
November 1, 2026 15:30
1f501bf to
ec68027
Compare
… 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'.
…ner evidence skips KNOWN_DIFF
…ent 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.
…n clobbered it; the previous commit intended only to append the regressions/70 entry)
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.
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).
This was referenced Nov 1, 2026
Closed
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.
Fixes the GNU master differential half of #1486. Main's baseline gate has been red since 2026-10-29 (first failing run 41241726504, red through 41297024203) because the audit waves landed corpus cases whose product side never matched: PR #1468 (audit-w7-util-linux) even recorded them as OUT_DIFF/EXIT_DIFF in baseline.json, and the runner's zero-unexplained-diff rule fails on every run since.
Adjudication of all 23 (oracle: GNU_BIN=/usr/bin, Ubuntu 24.04, coreutils 9.4,
/usr/bin/kill= procps-ng 4.0.4 — verifiedkill --version)Product fixes — 22 cases
kill ×11 —
/usr/bin/killis procps-ng 4.0.4, not util-linux and not uutils kill; the previous rewrite modeled uutils (name operands, -p/--pid, exit 64). Rewritten to the probed procps contract:-l NAMEprints the NUMBER,-l NUM(1..31) prints the NAME (Linux ABI: USR1=10; no RTMIN/RTMAX)kill: unknown signal name Xon stderr with exit 0-lconverts only its first operand (kill -l 9 extra→ KILL, 0)-p,-n, …) print the byte-exact procps usage block, exit 1kill: failed to parse argument: 'x'); delivery errors readkill: (PID): <errno>with ESRCH before EINVAL (-s INVALID <dead-pid>→ "No such process"); exit 0/1allow_unknown_long_options_as_positionalsparse policy so kill can deliver its own option diagnosticdate ×3 —
%+passes through literally (glibc has no such conversion; the %c-with-zone expansion was local invention);-Iargmatch list order ishours, minutes, date, seconds, ns;-r FILEerror uses quotef semantics (quote only when needed → plain names unquoted) via the sharedgnu_quotearg::shell_escape_quote.env ×1 — glibc putenv() performs no name validation, so
env '=x' ...is an accepted assignment (coreutils 9.4 exits 0; probe-verified). Child env blocks drop empty-name entries — CreateProcessW rejects the whole block otherwise (documented [DIFFERS]). Case reshaped toenv -i =x(the old shape compared a full env dump, unmatchable through interop).printenv ×2 — the cases looked up LC_ALL, which the interop launch never delivers to the Windows subject (probe-verified; WSLENV /u forwarding tried and insufficient). The runner now exports
WINUX_DIFFVAR=differentialto both sides (WSLENV no-flag = verbatim sharing) and the cases use it — premise deliverable by construction.nice ×1 —
invalid adjustmentprints one line; coreutils error() adds no Try tail.pathchk ×1 — MSVC filesystem reports ENOTDIR as system-category ERROR_DIRECTORY; routed through the shared Win32→POSIX map so the message reads "Not a directory".
stty ×1 — GNU's recover form is exactly 36 fields;
stty -gnow emits 36 (round-trip preserved) so the 10-field case is "invalid argument" before-Fis opened, like the oracle.timeout ×1 — missing operand prints only
Try 'timeout --help' for more information.(GNU has no message line), exit 125.regressions/70 — passes with the #1352 ordered-entries fix already on main.
Whitelist — 1 case
mktemp/05 — mkstemp names are random by contract; both sides print well-formed
./sub/<random>; shape pinned natively by the mktemp unit tests.baseline.json
Only the 12 entries these fixes flip (OUT_DIFF/EXIT_DIFF → PASS) are re-recorded; the 116 never-recorded and 18 mismatched census items from #1483 stay untouched for #1462.
Verification
WINUXCMD_BIN=build-vs): 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 while CI resolves Git-for-Windows ones; they are recorded PASS in CI's runs and are untouched by this PR.