Skip to content

test(regression): #746 catalogue second batch + manifest exhaustiveness gate - #944

Merged
caomengxuan666 merged 3 commits into
masterfrom
fix/746
Oct 20, 2026
Merged

caomengxuan666 merged 3 commits into
masterfrom
fix/746

Conversation

@caomengxuan666

Copy link
Copy Markdown
Member

Summary

Second batch of the #746 regression catalogue — harness changes plus cases:

Harness (runner.py)

  • Each arm is now staged in its own work dir (out/<case>/{arm,gnu}/). Previously both arms shared one staged dir, so the arm's fixture mutations could contaminate the GNU leg's files — the "each arm builds its own fixtures" rule was claimed but not true.
  • New manifest-exhaustiveness check: a case file with no manifest row is UNSCORED and a manifest row with no case file is DANGLING (full runs only); either fails the run with exit 2. An unscored case is a hole in the ratchet — four files (issue-860/861/868/876) shipped that way.

Manifest rows for the four previously-unscored cases — issue-860, issue-861, issue-868, issue-876, all must-match (fixes already merged: PR #883, #868, #876 commits).

Ten new cases

README documents the batch, the UNSCORED/DANGLING rules, and what this batch deliberately does not pin (#705 launcher faces, static/inventory issues, the niubash/WinuxCmd tables).

Note: tests/issue879_printf_longdouble_regressions.rs landed on master after this batch was written — issue-879's diverges row is expected to report PROMOTE on the next full catalogue run, which is the ratchet working as designed.

Test plan

  • Arm-side staging + bounded runs for all 14 touched cases under target/debug/rubash.exe: must-match cases produce the issue-recorded GNU outputs; diverges cases reproduce their documented residual faces (issue-846 correctly goes INCOMPLETE on the nested-! abort).
  • Full catalogue run with the WSL GNU 5.3.0 oracle leg — not run this session (session constraint). Declared states follow the case authors' byte-verified probes; the first full run on master is the confirming measurement.

Refs #746

Generated with Devin

caomengxuan666 and others added 2 commits October 21, 2026 01:43
…ss gate

- manifest rows for the four case files that shipped unscored:
  issue-860/861 (PR #883), issue-868, issue-876 - all must-match
- ten new cases: issue-699/701/830/832 must-match (closed/fixed);
  issue-700 and issue-846 diverges (residuals tracked as rubash#938 and
  rubash#940); issue-840/856/871/879 diverges (open)
- runner: stage each arm in its own work dir (out/<case>/{arm,gnu}/) so
  one arm's fixture mutations cannot contaminate the other; remove dead
  SCRIPT constant
- runner: UNSCORED (case file with no manifest row) and DANGLING
  (manifest row with no case file, full runs) are reported and fail the
  run with exit 2 - an unscored case is a hole in the ratchet
- README: document the batch, the UNSCORED/DANGLING rules, and scope

Verification note: arm-side staging + bounded runs were executed under
target/debug/rubash.exe only; the WSL GNU 5.3.0 oracle leg was not run
this session. Declared states follow the case authors' byte-verified
probes; a full catalogue run is the confirming measurement.

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

验证结论(本地实跑,非纸面):穷尽门与 13/14 判别力成立,但 issue-830 是永久假警报,合并会污染整个 ratchet 信号,请修后再来。

已验证为真的部分

  1. manifest 穷尽门真实生效(两种方向都试红了):在一次性 mini 目录(独立 cases/ + manifest.tsv)实跑 runner.py——

    • 用例文件无登记行 → UNSCORED (case file with no manifest row...) case-b,exit 2;
    • 登记行无用例文件(全量 run)→ DANGLING ... case-ghost,exit 2;
    • --only 下 dangling 正确豁免(按设计),exit 0。
  2. 本 PR 自身的 manifest 静态一致:51 行 ↔ 51 个用例文件,UNSCORED/DANGLING 双零。四个补登记(860/861/868/876)全部 must-match 且实测 match——补上了之前的洞。

  3. batch-2 判别力(targeted 14 例,arm=target/debug @0c50b413,GNU 腿=WSL bash 5.3.0(1)):

    • must-match 7/8 绿:issue-699/701/832/860/861/868/876 全部 same same match;
    • diverges 形态与声明一致:700/840/856 按声明 DIVERGES;846 INCOMPLETE 正是声明的 nested-! abort(arm 侧 nested= 行缺席、GNU 侧 nested=1/survived=0,逐字节核对过);871/879 报 PROMOTE(871 实测 arm 与 GNU 逐字节一致,含 infx/nanx rc=1+diag 行——manifest 行过时,不是本 PR 的缺陷,ratchet 按设计工作)。

阻塞项:issue-830 must-match 假警报

runner 实测 verdict:issue-830 ... DIVERGES,ALARMS (regressions): issue-830 (#830)。

差异只有一行——pwd -P 全路径拼写:

gnu: /mnt@P@/sub      ← GNU 臂 cwd=/mnt/d/repo/.../out/issue-830/gnu
arm: @P@/sub          ← arm  cwd=D:\repo\...\out\issue-830\arm

票面本体(PWD-tail=sub、phys=sub、rc)两侧全过;挂掉的是 case 里直接打印 pwd -P 全路径这一行。你本 PR 的 staging 改造(每臂独立 out/<case>/{arm,gnu}/,方向正确且必要)让两臂 cwd 必然不同路径,normalizer 只能把各自前缀缩成 /mnt@P@ vs @P@——这个用例在当前 harness 下永远不可能 must-match。而 manifest 行声明 must-match,意味着每次全量 run 都会 exit 1 挂一个永久 ALARM,把 ratchet 的信号噪化(真回归会被淹没)。

这也解释了为什么 arm-side 自测没抓到:没有 GNU 腿同场跑,DIFF 不会出现(你的 test plan 第二项未勾选正是缺的这一步)。

修法(任选其一,建议 1):

  1. 用例内不做全路径断言:pwd -P 改为 basename "$(pwd -P)"(本票语义只关心 chdir 是否发生,PWD-tail + phys= 已覆盖);
  2. 或 case 内把 pwd -P 输出归一化再输出:pwd -P | sed 's|.*/|cwd=/|'。

修完把 14 例跑一遍真 differential(GNU 腿别再跳过)即可合并。871 行建议顺手 flip 成 must-match(实测已逐字节一致)。856 行在 rubash#946 合并后会 PROMOTE,属预期。

…, flip issue-871 to must-match (#746)

issue-830 (BLOCKER): the case printed the full physical cwd via pwd -P,
but the per-arm staging (out/<case>/{arm,gnu}/) puts the two legs on
necessarily different paths, so the normaliser could only shrink them to
/mnt@P@ vs @p@ — the row declared must-match and could never match:
every full run exited 1 on a permanent false ALARM.  Probe the tail
segment instead (basename "$(pwd -P)"); the ticket substance
(PWD-tail=sub, phys=sub, rc) was already identical on both sides and
stays pinned.

issue-871: the declared-diverges row is stale — the infin/nann/infx/nanx
face (value + invalid-number diagnostic + rc 1) is byte-identical to the
GNU oracle.  Flip to must-match; case comment and README row updated.

Verified differentially (arm built at 0c50b41, WSL GNU bash leg, no
skips): full 51-case run exits 0 with no ALARM and no UNSCORED/DANGLING;
negative control (issue-700 temporarily declared must-match) alarms and
exits 1, so the ratchet still bites.
@caomengxuan666

Copy link
Copy Markdown
Member Author

返工完成(评审阻塞项已修,全部验收本地实跑)

接手原实现通道的返工,两个改动一个 commit:c983f74755764ddae75368c2a610260befee3fcd(已 push 到 fix/746)。

1. BLOCKER:issue-830 永久假警报(按评审建议 1 修)

用例里 pwd -P 直打全路径,而每臂独立 staging(out/issue-830/{arm,gnu}/)使两臂 cwd 必然异径,normalizer 只能缩成 /mnt@P@ vs @P@——已在本机复现(修前 targeted run:issue-830 ... DIVERGES,ALARMS: issue-830,exit 1,与评审描述逐行一致)。

修法:该行改 basename "$(pwd -P)",只断言尾部目录段;票面本体 PWD-tail=sub、phys=sub、rc 本来两侧全过,保持原样未动,并在用例内留注释说明为什么不做全路径断言(防止将来被"改回去")。

2. issue-871 flip:diverges → must-match

修前 differential 实测该用例两侧逐字节一致(stdout/stderr/rc 全 same,无 diff 产物),与评审一致。manifest 行 flip 为 must-match,note 注明实跑依据;用例头注释与 README 表行(#871 状态列 + 尾注)同步更新。

验收(arm 于 c983f74 重新链接构建;GNU 腿=WSL bash,未跳过,全量 51 例)

  • a. 全量 ratchet exit 0:51 例跑完 EXIT=0,零 ALARM,零 UNSCORED/DANGLING;
  • b. 棘轮仍咬人(阴性对照):临时把 issue-700 行改成 must-match(它按声明稳定 DIVERGES)→ run 报 ALARMS (regressions): issue-700 (#700): expected must-match, measured DIVERGES,exit 1;随后还原,工作树回到仅 4 文件的返工 diff;
  • c. issue-871 实测 match:全量 run 中 issue-871 0 0 True True same same match;
  • d. 不回退:manifest 51 行 ↔ 51 用例文件双零不破;issue-830 票面本体两侧逐字节一致(PWD-tail=sub / sub / phys=sub / __ARM_DONE__ rc=0,rc 0/0)。

备注(非本 PR 范围)

issue-879 全量 run 报 PROMOTE(评审已提及其行过时),按任务边界未动,留待后续。issue-846 如声明 INCOMPLETE(嵌套 ! abort),形态与评审记录一致。

@caomengxuan666

Copy link
Copy Markdown
Member Author

返工验收通过,实跑复核(head c983f74,本地 debug arm + WSL GNU bash 5.3.0(1) LC_ALL=C,经 CREATE_NO_WINDOW 蹦床单进程落文件):

  1. 全量 51 例 differential run exit 0:arm built 04:05 ≥ HEAD 03:52(stale gate ok);51 行 ↔ 51 用例文件,UNSCORED/DANGLING 双零;无 ALARM。verdict 分布 = 37 match + 13 DIVERGES(全部按声明:700/704/735/737/754/757/759/840/846/856/lim-f6-nul/lim-f7-closed-fd0/loc-l2-comsub/loc-l5-read-cr)+ 1 INCOMPLETE(846,即声明的 nested-! abort 形,arm 侧 ARM_DONE 缺席,与前轮逐字节核对一致)。
  2. issue-830 must-match 实测 match:两臂 PWD-tail=sub / <basename> / phys=sub / __ARM_DONE__ rc=0 逐字节一致 —— 票面本体三断言全保留,basename "$(pwd -P)" 修法与评审建议 1 一致。
  3. issue-871 实测 match:arm.out 与 gnu.out 逐字节一致(inf/infinity rc=0 silent;infin/nann/infx/nanx rc=1 + diag 行),must-match 就位;用例注释 + README 行同步更新 ✓。
  4. 注入假 diverge 仍红:manifest 副本把 issue-700 flip 成 must-match → ALARMS (regressions): issue-700 expected must-match, measured DIVERGES,exit 1(--only 定向验证)——棘轮咬人依旧。

两点记档(非阻塞):issue-879 本轮报 PROMOTE(声明 diverges 但实测 match,ratchet 按设计放行 exit 0)——与 871 同类的过时行,建议后续票顺手 flip;issue-840 行在 #947 合并后会同样 PROMOTE,属预期。

合并(--squash --admin)。

@caomengxuan666
caomengxuan666 merged commit a3d368c into master Oct 20, 2026
6 checks passed
@caomengxuan666

Copy link
Copy Markdown
Member Author

终审通过(rework c983f747 独立复跑验收,已合并)

验收结论:PASS。squash 合入 master(a3d368c),master CI 五条实质 lane 全绿。关联 #746。

独立复跑(一次性 worktree @ c983f747,arm 以 release 全新构建,stale gate ok)

  1. 全量 ratchet run:51 用例,exit 0,零 ALARM / 零 UNSCORED / 零 DANGLING;36 条 must-match 全部 match。上一轮阻塞项已消除——issue-830 verdict=match,两腿 stdout/stderr/rc 逐字节一致:PWD-tail=sub、basename "$(pwd -P)"=sub、phys=sub、rc=0。全路径拼写差异不再进入比较面(票面本体三断言原样保留)。
  2. issue-871 must-match 实测一致:stdout/stderr/rc 双侧逐字节一致,且捕获文件 d(诊断行 ./probe.sh: line 8: printf: nann: invalid number)逐字节相同,rc=1——"含诊断行与 rc 的 byte-identical"声明成立。
  3. 棘轮仍咬人(两向红测,事后还原、零 diff):
    • 临时把 issue-879 行 diverges→must-match → ALARMS (regressions): issue-879 (#879): expected must-match, measured DIVERGES,exit 1;
    • 删除 issue-871 的 manifest 行 → UNSCORED (case file with no manifest row),exit 2;
    • manifest 51 行 ↔ 51 用例文件、无重名行,还原后 git status 干净。
    • 附注:对 case 体追加两条腿相同的 echo 不会红(differential 设计如此,注入必须落在腿间差异或登记面上),已用 879 行翻转法验证真告警。
  4. diff 逐行复核:恰 4 文件 +15/−6,无夹带;issue-830 除探针行与新增注释外与父提交逐字节一致(用例内 5 行"为何不做全路径断言"注释在位);issue-871 仅注释改动、case 体未动;manifest 单行翻转、README 两处同步描述一致。

与上轮验证环境的差异声明(不影响结论)

本环境禁用 wsl.exe,GNU 腿换用 Git Bash GNU bash 5.3.0(1)-msys(同为 GNU bash 5.3,调用契约一致:独立 staging、LC_ALL=C、bounded 超时)。影响仅落在 diverges 声明行:10 行报 PROMOTE(MSYS 侧 CRLF/read 语义与 arm 同为 Windows 语义所致,如 loc-l5-read-cr),4 行 DIVERGES + 1 INCOMPLETE(846 nested-! abort,与上轮逐字节结论一致)全部位于 diverges 声明行;must-match 36/36 全 match,零假阳/假阴。PR head CI(windows-latest lane,含 WSL 录制的 byte 级 goldens)全绿可作交叉印证。

Refs #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