Repository navigation
test(regression): #803 re-record the nquote snapshot past the #789 panic; CRLF-normalize suite copies - #808
Conversation
…omsub, heredoc); normalize suite copies Verdict for #803: re-record, not a product regression. CI's red streak starts at eee1aa6 (#705 followup): that clamp fixed the mark_literal_ifs_chars index-out-of-bounds panic (a #789/d9ab4c7 regression) on unclosed-quote braced words, and nquote2.sub exercises exactly that shape (the unquoted `t ${v/\'/x}` call), so the suite now runs past the point where it used to die. The committed nquote.snap was itself recorded from an aborting run: f7eaebf's message says "lines 64-84 are not produced ... the test harness aborts". Byte-proof: a scratch build with the clamp reverted reproduces the committed golden exactly (1045 bytes) plus the panic (`index out of bounds: the len is 12 but the index is 12`, src/executor/command_prepare.rs:3869). 98794cb (mapfile fast path) is exonerated - it postdates the first-red commit. Oracle (WSL GNU bash 5.3.0(1)-release, stdin method, recho argv spans rendered caret-wise like the PE helper): GNU's stdout is byte-identical to today's engine output (1230 bytes), so the resumed lines 64-85 are GNU-true and the golden was stale, not the engine. Machine-dependence, the deeper cause: the windows-latest runner materializes the third_party/bash submodule with core.autocrlf=true, and CRLF suite bytes mute whole faces (nquote4.sub's `alias foo=$'echo foo\n\nquux\n'` prints no `foo`). Every CI snapshot artifact of this wave held runner-CRLF bytes, and the pre-f7eaebf8 golden era pinned them too. The lane now normalizes CRLF->LF while copying the suite files (run_suite_snapshot): canonical blobs of all 13 slices contain no CR at all (153 files scanned), so the pair-wise conversion is exactly the autocrlf inverse and cannot touch semantic CR bytes; snapshot bytes stop depending on the checkout's line-ending config, per the module's own machine-dependent-byte rule. Re-recorded with RUBASH_REGRESSION_RECORD=1 (engine/harness change reference, per slice): - nquote 1045 -> 1230: resumes past the former panic point; GNU-verified byte-for-byte (oracle above). - comsub 926 -> 1033: the committed golden was another truncated run (missed the trailing `ok 9`/`ok 8`/date block and clipped `hey after x`); runner-through-fix and a LF checkout both produce the full 1033 bytes. - heredoc 1445 -> 1483: same class, the tail (`world` + two here-doc lines) was missing. #746 ratchet: re-record path, not a product regression - no new catalogue case; the re-recorded bytes themselves are the ratchet, any future truncation fails CI again. Verified: nquote/comsub/heredoc artifact bytes from the PR's own CI run equal the committed re-records and equal LF-checkout runs (machine stable); nquote additionally equals the WSL GNU 5.3.0 oracle. Full --test-threads=1 regression battery after the re-record: 70 passed / 0 failed locally (the combined snapshot test is green on a LF checkout for the first time). My hunk is rustfmt-clean; the repo-wide pre-commit gate trips on pre-existing master drift (mapfile.rs, part_041.rs) which this PR must not reflow.
99b657e to
c8719d9
Compare
Independent CR of #808 (verdict re-check of the #803 ruling)REQUEST-CHANGES — for the adjudication text only. The four changed files themselves are verified correct: I reproduce all three re-recorded snapshots byte-for-byte through three independent legs. What I cannot reproduce is the PR's central "byte-proof" (evidence chain item 3), and one of its claims fails verification on four separate engines. What I verified independently (all byte-level)
Where I dissent: evidence-chain item 3 ("byte-proof") does not reproduceThe PR claims: "a scratch build of 9055c96 with only the clamp reverted reproduces the committed golden exactly — 1045 bytes + I could not reproduce this under any combination:
The harness side was replicated exactly (my replication is byte-identical to the committed snaps on pristine code, and byte-identical to real CI artifacts in CRLF mode, so it is runner-faithful). The eee1aa6 repro face ( This does not flip the verdict (item 1-4 above prove "old = artifact, new = truth" independently), but a byte-evidence lane should not carry a headline proof that a second machine cannot reproduce. Please either name the exact tree/env that yields the panic or replace item 3 with the evidence that actually holds (prefix + f7eaebf admission + artifact equality). Additional findings
Bottom lineThe change is correct and merge-worthy on its own evidence; the ruling's conclusion ("re-record, not a product regression") is one I independently concur with. Requesting changes only so the adjudication text matches reproducible reality: fix or withdraw the byte-proof paragraph, the 153 number, and the comsub/heredoc "truncated" wording. No changes requested to the snap bytes or the normalization code. (Verification used six throwaway worktrees, all removed; the cr-808 clamp mutation was reverted before cleanup; the oracle ran read-only in WSL /tmp.) |
…ount CR review of #808: the 153 figure counted per-suite matches, not the unique wanted-predicate file set. Accurate numbers: 144 tracked suite files across the 13 slices (145 on a disk that carries a built-in untracked recho artifact); none of the canonical blobs contains CR, so the no-CR safety argument for the CRLF->LF copy normalization is unchanged. Text only - no snapshot bytes touched.
|
CR 修正轮已落地(5cff440f,纯文本,字节零改动——三个 snap 相对 c8719d9 无 diff):
PR 正文与票内两条评论已同步校准。等这颗文本 commit 的 CI 绿后即可合并。 |
Closes #803. Verdict: re-record, not a product regression. Three snapshots (
nquote,comsub,heredoc) pinned runner-CRLF / interrupted-run bytes; the engine itself is GNU-true. Text corrected per CR round 1 (evidence chain replaced with the independently reproducible one; snap bytes untouched).Adjudication (evidence chain, CR-verified)
5f3fb55b(08:38), first redeee1aa6f(08:59,nquote: snapshot stdout differs from golden, 69/70), every later head red at the same point. The ticket's suspect98794cb7(mapfile fast path) postdates the first-red commit — exonerated.eee1aa6fchanged. It clamped themark_literal_ifs_charsindex-out-of-bounds panic on unclosed-quote braced words (a#789/d9ab4c7regression).nquote2.subexercises exactly that shape (unquotedt ${v/\'/x}family), so the suite run survives the word class that coincides with where the old recording stops.nquote.snapis a strict byte-prefix of the canonical 1230-byte output — it ends mid-stream, one line short of a face boundary.f7eaebf8(the commit that recorded it, 07:37 that morning) says so itself: "lines 64-84 are not produced ... the test harness aborts" — the golden was transcribed from an aborted CI run rather than a completed one.nquoteadditionally == WSL GNU bash 5.3.0(1)-release (stdin method overnquote.tests+nquote1-5.sub, stdout rendered through the established recho argv-span caret convention). GPL discipline: the oracle is a run; no GNU source embedded.The deeper cause: machine-dependent bytes (runner autocrlf)
windows-latest materializes the
third_party/bashsubmodule withcore.autocrlf=true; on CRLF suite bytes whole faces go silent (nquote4.sub'salias foo=$'echo foo\n\nquux\n'prints nofoo: 1226 runner bytes vs 1230 LF). Every CI snapshot artifact of this wave held runner-CRLF bytes — and so did the pre-f7eaebf8golden era. The lane now normalizes CRLF→LF while copying the suite files (run_suite_snapshot): the 144 tracked files matching the copy predicate (13 slices; a built submodule's disk may add untracked build artifacts such asrecho) contain no CR in any canonical blob, so the pair-wise conversion is exactly the autocrlf inverse and cannot touch semantic CR bytes. Snapshot bytes stop depending on the checkout's line-ending config — the module's own machine-dependent-byte rule.Re-record (protocol,
RUBASH_REGRESSION_RECORD=1, debug profile)ok 9/ok 8/date block and the fullhey after xline)world+ two here-doc lines)The other 10 slices re-recorded byte-identical (the protocol leg rewrites all 13; only these three differ).
#746ratchet: re-record path, not a product regression — no new catalogue case; the re-recorded bytes are themselves the ratchet (any future divergence fails CI again).Verification
cargo test --test regression -- --test-threads=1→ 70 passed / 0 failed (before this PR: 69/1; the combined snapshot test is green on a LF checkout for the first time). Baseline failure set elsewhere: unchanged.mapfile.rs,part_041.rs), deliberately not reflowed here.The CR-flagged
errors-slice machine-dependence (errors.snap:64/67/74status lines,${THIS_SH}degenerate face) is out of this PR's scope and tracked separately.No merge from my side — review and merge as owner.