Repository navigation
tests: true-baseline helper-parity gate must not pass on empty==empty (#767) - #1182
Merged
Merged
Conversation
a5980de unified the two helper carriers behind one implementation and gated the ledger on byte-identical od dumps, but the gate's equality test cannot tell "identical" from "both empty": a broken helper or spawn path produces two empty dumps that compare equal, and the #767 thread measured exactly that -- an all-green matrix that compared nothing. Reproduced here against the real pre-change script by putting a no-output od first on PATH: "helper-parity: gate green (26 ok)". .parity.sh ends every invocation with a literal tail-arg operand, so a valid dump MUST contain its bytes (hex 7461696c2d617267). The gate now asserts that sentinel in BOTH dumps -- whitespace-stripped, since od -tx1 wraps -- before any equality test, and FAILs (exit 9) when it is absent. This covers empty capture, "command not found", and spawn failures in one check, per the two assertions requested in the issue thread. Verified: real path green (24 ok, 2 report-only caf\xc3\xa9 INFO, both carriers rebuilt from source, arm = fresh master build); stubbed-od path now exits 9 on all 26 cases where it previously printed green.
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 #767
Summary
a5980def(support/{recho,zecho}.cis THE implementation; the PE port is required-byte-exact; both carriers rebuilt from source every run). Verified end-to-end on this machine: fresh gcc/rustc builds of both carriers, the gate's own producer paths (GNUprintf→ ELF; rubashprintf→ PE spawned by rubash), 24/26 byte-identical includingx\x80y,\xfe\xff,\xc3,\xe4\xb8— the U+FFFD-vs-raw divergence is gone. The only 2 diffs arecaf\xc3\xa9, the gate's own documented report-only tier (engine byte-reencoding family, never charged to the helpers).odfirst onPATH:helper-parity: gate green (26 ok, 0 report-only)— while comparing literally nothing..parity.shends every invocation with a literaltail-argoperand, so a valid dump MUST contain its bytes (hex 7461696c2d617267). The gate now asserts that sentinel in both dumps — whitespace-stripped sinceod -tx1wraps — before any equality test, and FAILs (exit 9) when it is absent. One check covers empty capture,command not found, and spawn failures — the two assertions requested in the issue thread.Test plan
scripts/true-baseline.sh nosuchsuiteon a fresh master arm build →helper-parity: gate green (24 ok, 2 report-only); the 2 INFO lines arecaf\xc3\xa9on recho+zecho, the documented report-only tierod(emits nothing, delegates-Ncalls foris_elf) → old script printsgate green (26 ok)rc=0; new script prints 26FAIL ... (tail-arg sentinel missing; empty==empty is a false pass)→FATALexit 9bash -nclean; no Rust changes (cargo fmt not applicable)Generated with Devin