From 3d8a804789e1ad0f78f01641a60af2d9788f4eba Mon Sep 17 00:00:00 2001 From: bcloud Date: Sat, 14 Nov 2026 14:06:55 -0400 Subject: [PATCH] release-check: test the helper that decides a payload binary cannot execute engine#2423 (main, d6d57e11) added `payload_modes_noexec()` and a payload-modes row that FAILS on it, so a 0644 `1bit/1bit` no longer passes over a payload that cannot run. But `--self-test` grew no row for it: the block has seven `payload_modes_verdict` cases and none for the helper the new rule turns on. The rule was therefore asserted in prose, and in the one place where this script tests itself, untested -- a later change to the offender list or to the `[ -x ]` predicate would leave `--self-test` green. engine#2424 measured the shape that matters (both binaries at 0644 on a real payload) and is now superseded by #2423 on main; this ports that fixture rather than a second implementation, against the helper main actually has: check ' 1bit/1bit bin/lemond' "$(payload_modes_noexec "$ST/noexec")" # 0644 both: named, in payload order check '' "$(payload_modes_noexec "$ST/exec")" # 0755 both: not an offender check '' "$(payload_modes_noexec "$ST/absent")" # absence is NOT an offender The third is the helper's own documented decision ("absent is deliberately NOT an offender: that is hrx-device's claim"), which is exactly the kind of choice that gets quietly reversed when nothing pins it. Verified that the rows are load-bearing, not decorative: with the predicate mutated to never name an offender, --self-test rc=1 FAIL want 1bit/1bit bin/lemond, got: and with the file restored, rc=0. The temp tree is built with mktemp/chmod 0644|0755, so it does not depend on the umask of whoever runs the gate or on files being executable by luck. --- os/mini/release-check.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/os/mini/release-check.sh b/os/mini/release-check.sh index c64a3eb03..8434e7234 100755 --- a/os/mini/release-check.sh +++ b/os/mini/release-check.sh @@ -1043,6 +1043,18 @@ if [ "${1:-}" = --self-test ]; then check FAIL "$(payload_modes_verdict '' 0)" check FAIL "$(payload_modes_verdict 0 '')" check FAIL "$(payload_modes_verdict x 0)" + # engine#2422 (the helper main kept from #2423): the row now FAILS on a payload that carries its own binaries + # without an execute bit, and nothing above exercised the helper that decides it -- so the rule was asserted in + # prose and untested where the tool tests itself. engine#2424 measured the shape: both binaries at 0644. + ST=$(mktemp -d) + mkdir -p "$ST/noexec/1bit" "$ST/noexec/bin" "$ST/exec/1bit" "$ST/exec/bin" + for _f in "$ST/noexec/1bit/1bit" "$ST/noexec/bin/lemond" "$ST/exec/1bit/1bit" "$ST/exec/bin/lemond"; do : > "$_f"; done + chmod 0644 "$ST/noexec/1bit/1bit" "$ST/noexec/bin/lemond" + chmod 0755 "$ST/exec/1bit/1bit" "$ST/exec/bin/lemond" + check ' 1bit/1bit bin/lemond' "$(payload_modes_noexec "$ST/noexec")" # the measured 0644 shape: named, in payload order + check '' "$(payload_modes_noexec "$ST/exec")" # an executable payload is not an offender + check '' "$(payload_modes_noexec "$ST/absent")" # absence is deliberately NOT an offender (the helper's own note) + rm -rf "$ST" # engine#1557: the payload's own identity - a claim that matches is a PASS, a stale one is a FAIL, and an image without # the field is a SKIP that says why rather than a pass by absence check PASS "$(payload_identity_verdict '2026.47.0~8.f44ff953' '2026.47.0~8.f44ff953')"