Skip to content

test(regression): per-issue differential catalogue with a stale-build gate (#746) - #774

Merged
caomengxuan666 merged 1 commit into
masterfrom
test/regression-catalog
Oct 18, 2026
Merged

caomengxuan666 merged 1 commit into
masterfrom
test/regression-catalog

Conversation

@caomengxuan666

Copy link
Copy Markdown
Member

What this is

A runnable per-issue regression catalogue: one case per filed issue, run twice — once under WSL GNU bash 5.3.0, once under the arm — and compared on exit status, stdout and stderr.

The design goal is the one in #746 and in AGENTS.md: every issue nailed down by a test, so it cannot regress. So this is deliberately not a scoreboard:

  • each row in manifest.tsv declares its expected state — diverges (known-bad, must keep diverging until fixed) or must-match (fixed, must never diverge again);
  • a run prints ALARM when a must-match case diverges, and PROMOTE when a diverges case starts matching (the fix landed → flip the row);
  • exit status is 1 on any alarm, so it is usable as a gate as-is.

The stale-build gate

arm      : target/release/rubash.exe
arm built: 2026-10-17 14:25
HEAD     : b5793580  committed 2026-10-17 14:25
GATE     : ok (arm is not older than HEAD)

If the arm predates HEAD, the runner exits 2 without printing a table:

GATE     : STALE — the arm predates HEAD. Rebuild, or pass --allow-stale if this is deliberate.

AGENTS.md already says a ledger from a stale binary is worse than no ledger. I put that in the tool because I violated it three times in one week: both brush reports (#1527, #1528) and WinuxCmd #1202 were filed against builds older than their fixes, and #382/#383/#702/#756/#1202 only ended up closed because a re-verification against a current build showed the fix had already landed. --allow-stale exists for deliberate archaeology.

I tested the gate itself: a copy of the binary with its mtime set to 2026-10-01 is refused, and accepted with --allow-stale.

Invocation rules (each one learned by breaking it)

  • oracle is always WSL GNU bash (/usr/local/bin/bash); never Git Bash, never the PATH shim;
  • every arm is bounded, and on timeout the whole process tree is killed; an arm that does not reach the end of its own script is INCOMPLETE and is never a pass — that is how issue-738 (heredoc swallows the script tail) and issue-758 (malformed expansion) are detected at all;
  • each arm builds its fixtures in its own work dir; nothing shared or pre-staged;
  • no positional argument is ever passed to an arm (the host rewrites them), so everything a case needs lives in the case file;
  • line-ending normalisation skips binaries — rewriting CRLF inside a helper EXE yields ERROR_BAD_EXE_FORMAT (os error 216) and then every helper-dependent case fails for both arms, which looks exactly like a divergence and is not one (this one cost me a whole comparison before I caught it);
  • normalisation touches only the harness's own scratch paths, in all four spellings (C:\…, C:/…, /c/…, /mnt/c/…) plus the per-arm HOME. Nothing about the shells' own path rendering is normalised.

First recorded run — 27 cases

arm b5793580 (built 2026-10-17 14:25)   ok=27  alarms=0  newly-fixed=0

26 rows are diverges (each one reproduces on current master, with its issue number in the note); 1 row is must-match (issue-702, which was verified fixed and closed). A previous 21-case pass of the same table is recorded on #746, together with the six rows added with #772/#773.

Scope and what I am not proposing

Provenance

Cases come from the issues filed during an external audit (#699–#705, #713–#773); each case is the repro from its issue, reduced to the smallest body that still diverges. The catalogued expectations are the states I measured on b5793580 today; if a row is wrong, the case file and its diff.txt are the evidence to argue with.

… gate (#746)

One case per filed issue, run under WSL GNU bash 5.3.0 and under the arm,
compared on rc + stdout + stderr.  Each manifest row declares its expected
state (diverges / must-match), so a run raises ALARM on a regression and
PROMOTE when a fix lands; exit status is 1 on any alarm.

The runner exits 2 when the arm predates HEAD: a ledger from a stale binary
is worse than no ledger (AGENTS.md), and three reports in this project were
filed against builds older than their fixes.

First run: 27 cases, arm b579358, ok=27 alarms=0 newly-fixed=0 (on #746).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant