From e43ce2404f8cc77f6ac15fd4db23918bec4bcada Mon Sep 17 00:00:00 2001 From: bong-water-water-bong Date: Sun, 8 Nov 2026 18:31:58 -0400 Subject: [PATCH 1/2] os: a row for the payload NAME the identity file declares, and the half-true shape it can be (#1557) `engine_sha256` is computed from a file, so it cannot be inherited stale, and the identity row compares it with the shipped bytes. `payload=` is not computed: `os/v3/puppy/container-build.sh:349` writes `payload=${PAYLOAD_NAME:-unknown}` - an ENVIRONMENT input - and the mini writer writes the payload directory the cut was handed. So one unset or wrong `PAYLOAD_NAME` produces a HALF-TRUE identity: a correct engine sha beside a name the cut did not intend, which is the shape engine#1481 survived two cycles with. The row checks what the image alone can settle: a `payload=` that is empty, or literally `unknown`, is a cut that did not tell the file which payload it shipped - FAIL, naming the mechanism. It deliberately does **not** claim to check "stated wrongly": the image carries no authority for the name (measured - the payload tree has no name-bearing file, and the tarball stem lives in the bundle, not the image), so comparing against a typed string would be the same defect one level up. The PASS line says the name is DECLARED so a reader cannot take it as verified. Verified: `--self-test` **117 ok / 0 failed** under BOTH the shebang (dash) and bash - the fixture is POSIX, which is the lesson from #1542's CI failure; and the three verdict shapes run directly against real identity files - the c33 name PASSes, `unknown` FAILs naming `container-build.sh:349`, empty FAILs. Row count on a boot goes 30 -> 31 here (32 once #1548 lands). --- os/mini/release-check.sh | 41 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/os/mini/release-check.sh b/os/mini/release-check.sh index ed94f2e74..2c84b915d 100755 --- a/os/mini/release-check.sh +++ b/os/mini/release-check.sh @@ -656,6 +656,27 @@ memlock_verdict() { "$_p" "$_v" "${_f:+ (highest-numbered memlock file: $_f)}" } +# ── the payload NAME the identity file states (engine#1557) ──────────────────────────────────── +# `engine_sha256` is computed from a file: it cannot be inherited stale, and the row above compares it with the shipped +# bytes. `payload=` is not: os/v3/puppy/container-build.sh:349 writes `payload=${PAYLOAD_NAME:-unknown}`, an ENVIRONMENT +# input, and os/mini/mkimage.sh writes the payload directory the cut was given. One wrong (or unset) PA YLOAD_NAME +# therefore produces a HALF-TRUE identity - a correct engine sha beside a wrong name - which is the shape engine#1481 +# survived two cycles with. +# +# What the image alone can settle is the "not stated" case, and that is what this row checks: a name that is empty or +# literally `unknown` is a cut that did not tell the file which payload it shipped. It cannot check "stated wrongly": +# the image carries no authority for the name (measured - the payload tree has no name-bearing file, and the tarball stem +# lives in the bundle, not in the image), so comparing against a typed string would be the same defect one level up. +# Pure, so --self-test drives it: +payload_name_verdict() { + _n=${1:-} + case "$_n" in + '') printf 'FAIL the identity file states no payload= at all, so nothing in the image says which payload it carries' ;; + unknown) printf 'FAIL the identity file states payload=unknown - the cut did not pass PAYLOAD_NAME (os/v3/puppy/container-build.sh:349 writes %%s), so the name is unset while the engine_sha256 beside it is computed and correct: a half-true identity' '${PAYLOAD_NAME:-unknown}' ;; + *) printf 'PASS the identity file names the payload it carries (%s); that name is DECLARED by the cut, not checked against the bytes - this row catches "not stated", and "stated wrongly" needs an authority the image does not carry (engine#1557)' "$_n" ;; + esac +} + payload_modes_verdict() { # [] _f=${1:-} _d=${2:-} _sample=${3:-} case "$_f" in ''|*[!0-9]*) printf 'FAIL the payload'"'"'s file modes could not be counted (%s)' "${_f:-empty}"; return 0 ;; esac @@ -762,6 +783,12 @@ if [ "${1:-}" = --self-test ]; then check SKIP "$(memlock_verdict '' '')" # nothing running: say so, do not pass check FAIL "$(memlock_verdict '' lemond)" # running but unreadable: unknown is not a pass check FAIL "$(memlock_verdict 'lots' lemond)" # nonsense is a fail, not a skip + check PASS "$(payload_name_verdict lemonade-onebit-rc-2026-11-08-c33)" + check FAIL "$(payload_name_verdict unknown)" # the PAYLOAD_NAME-unset shape: half-true identity + check FAIL "$(payload_name_verdict '')" # nothing stated + if printf '%s' "$(payload_name_verdict lemonade-onebit-rc-2026-11-08-c33)" | grep -q 'DECLARED'; then + printf 'ok the PASS line says the name is declared, not checked\n' + else printf 'FAIL the PASS line should say the name is declared\n'; rc=1; fi check PASS "$(payload_modes_verdict 0 0)" check FAIL "$(payload_modes_verdict 134 49)" # c31/c32's real shape: 134 files AND 49 directories check FAIL "$(payload_modes_verdict 0 1)" # the c33 first cut: no files, the payload ROOT writable @@ -1999,6 +2026,20 @@ case "$ML" in *) fail memlock "${ML#FAIL }" ;; esac + +# ── the payload name the identity file declares (engine#1557) ──────────────────────────────────── +if [ -f "$ID" ]; then + _pn=$(sed -n 's/^payload=//p' "$ID" 2>/dev/null | head -1) + _pnv=$(payload_name_verdict "${_pn:-}") +else + _pnv='SKIP no identity file in this image build, so there is no payload name to read' +fi +case "$_pnv" in + PASS*) pass payload-name "${_pnv#PASS }" ;; + SKIP*) skip payload-name "${_pnv#SKIP }" ;; + *) fail payload-name "${_pnv#FAIL }" ;; +esac + say "" # The back-off leaves a trace: a run that only passed because the partition freed in time must say so, or the next # person reads a clean transcript and believes nothing was ever refused. From 382b9d9c6c9145d393ce37497b0f246ce296189c Mon Sep 17 00:00:00 2001 From: bong-water-water-bong Date: Sun, 8 Nov 2026 18:34:18 -0400 Subject: [PATCH 2/2] os: the payload-name row names the incident it does NOT catch, in its own PASS line (#1557) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit pi-os3's limit, verified against the incident string itself: `payload_name_verdict lemonade-onebit-rc-2026-11-05-c26c` **PASSes**. That is c32's and c33's actual stale identity - a plausible, non-empty name - so the row catches the MECHANISM (empty, `unknown`) and not the INCIDENT, and the difference has to be visible where a reader meets the row rather than in a closure note. The PASS line now says so, with the incident quoted: PASS the identity file names the payload it carries (…); that name is DECLARED by the cut, not checked against the bytes - this row catches "not stated", NOT "stated wrongly": the c26 incident (payload=lemonade-onebit-rc-2026-11-05-c26c in c32 and c33) passes here, because it is a plausible non-empty name … and a self-test case pins that PASS, so the limitation cannot be quietly dropped by a later tightening without failing the suite. `--self-test` **118 ok / 0 failed** under both the shebang (dash) and bash - the extra case is the incident string. Also recorded, because it produced the wrong hypothesis: the shipped payload's `lemond --version` is `2026.47.0~1.52a2a6b3` - the Lemonade dev version, no cycle token - so there is no in-image authority to check a name against, and `2026.45~c33` was a string invented in a writer stub, not something the artifact ever printed. --- os/mini/release-check.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/os/mini/release-check.sh b/os/mini/release-check.sh index 2c84b915d..3c3c21209 100755 --- a/os/mini/release-check.sh +++ b/os/mini/release-check.sh @@ -673,7 +673,7 @@ payload_name_verdict() { case "$_n" in '') printf 'FAIL the identity file states no payload= at all, so nothing in the image says which payload it carries' ;; unknown) printf 'FAIL the identity file states payload=unknown - the cut did not pass PAYLOAD_NAME (os/v3/puppy/container-build.sh:349 writes %%s), so the name is unset while the engine_sha256 beside it is computed and correct: a half-true identity' '${PAYLOAD_NAME:-unknown}' ;; - *) printf 'PASS the identity file names the payload it carries (%s); that name is DECLARED by the cut, not checked against the bytes - this row catches "not stated", and "stated wrongly" needs an authority the image does not carry (engine#1557)' "$_n" ;; + *) printf 'PASS the identity file names the payload it carries (%s); that name is DECLARED by the cut, not checked against the bytes - this row catches "not stated", NOT "stated wrongly": the c26 incident (payload=lemonade-onebit-rc-2026-11-05-c26c in c32 and c33) passes here, because it is a plausible non-empty name, and "stated wrongly" needs an authority the image does not carry (engine#1557)' "$_n" ;; esac } @@ -786,6 +786,7 @@ if [ "${1:-}" = --self-test ]; then check PASS "$(payload_name_verdict lemonade-onebit-rc-2026-11-08-c33)" check FAIL "$(payload_name_verdict unknown)" # the PAYLOAD_NAME-unset shape: half-true identity check FAIL "$(payload_name_verdict '')" # nothing stated + check PASS "$(payload_name_verdict lemonade-onebit-rc-2026-11-05-c26c)" # the INCIDENT string still passes: this row is not its gate if printf '%s' "$(payload_name_verdict lemonade-onebit-rc-2026-11-08-c33)" | grep -q 'DECLARED'; then printf 'ok the PASS line says the name is declared, not checked\n' else printf 'FAIL the PASS line should say the name is declared\n'; rc=1; fi