From 56466d5b90fe9ef10f00c463360f2e214c7adfaa Mon Sep 17 00:00:00 2001 From: bong-water-water-bong Date: Sun, 8 Nov 2026 19:43:42 -0400 Subject: [PATCH 1/3] os: compare the payload's PIN, not the whole version string - the ~N is the clone that built it (#1570 review) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `payload_identity_verdict` compares `payload_lemond` with what the launcher reports, as a WHOLE STRING. That string carries a builder-dependent part: `lemond --version` is `.0~.`, and the count is the number of commits in the **checkout it was built in** (docs/releases.md: a depth-1 clone reports `~1`, a full clone reports `~1752` for the same commit; c18 printed `~5`). Measured for c33's pin: this box's shallow checkout counts 12, a depth-1 clone 1, a full clone 1752. So the whole string is not a fact about the payload. An image built from a depth-1 clone and a machine payload built from a full clone carry the same code and print different strings, and comparing them reds on a **correct** pair - a false red on a green pair, which is the failure mode this lane has spent the day removing. The row now drops `~` on both sides and compares the pin (`.0` + the trailing sha), and says so in both verdicts: "the same pin (…, clone count ignored: the ~N is commits in the checkout that built it)". The FAIL also prints both pins. It also names the field: the PASS said "the payload on this machine is the one the identity names", which reads as if `payload=` had been verified - it compares `payload_lemond`, a different value (measured on one artifact: `payload=` contains the README token and equals nothing else; `payload_lemond` matches neither). The line now says "the identity claims payload_lemond=… and the payload's own launcher reports the same pin". Verified: the five cases run directly - same string PASS; **same pin with `~1` vs `~1752` PASS (the false red this fixes)**; a different sha FAIL; no claim SKIP; launcher silent FAIL. `--self-test` **128 ok / 0 failed** under both the shebang (dash) and bash, with the clone-count case pinned so a later "tightening" cannot reintroduce the whole-string comparison. --- os/mini/release-check.sh | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/os/mini/release-check.sh b/os/mini/release-check.sh index 3411bbfd1..8f5c8733a 100755 --- a/os/mini/release-check.sh +++ b/os/mini/release-check.sh @@ -607,11 +607,19 @@ payload_identity_verdict() { # Date: Sun, 8 Nov 2026 19:46:24 -0400 Subject: [PATCH 2/3] os: the payload= label is checked against the payload the image ships (containment, #1557) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #1570's row checks `payload_lemond` - the payload's own version - and prints `payload=` as a label. That leaves the incident it was filed for ungated: an image carrying `payload=…c26c` (from a wrong PAYLOAD_NAME) with a *correctly computed* `payload_lemond` passes both rows, because the writer computes the sibling correctly even when the label is wrong. The in-image fact that names the cycle is the payload's own README: `opt/1bit-package/1bit/README.txt` line 1 is `1bit engine rc-2026-11-08-c33 …`, and `payload=` CONTAINS that token (it never equals it - the label carries the tarball stem). So the comparison is **containment**, on the **first line only**, and the row is `payload-name`, beside `payload-identity`: * the c26 label against a c33 payload -> **FAIL** (the incident); * the matching label -> PASS; * no README tag -> **SKIP**, not a pass by absence; * `payload=unknown` / empty -> FAIL. Ported verbatim from #1569 (whose author closed it as superseded on the wrong premise - #1570 checks a *different field*), with its five self-test cases, so no fifth implementation and no cross-lane rebase of a conflicting branch. Verified end-to-end on identity files, not only on the verdict: c26 -> FAIL, c33 -> PASS. `--self-test` **133 ok / 0 failed** under both the shebang (dash) and bash, with the c26 case pinned. --- os/mini/release-check.sh | 48 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/os/mini/release-check.sh b/os/mini/release-check.sh index 8f5c8733a..e00068138 100755 --- a/os/mini/release-check.sh +++ b/os/mini/release-check.sh @@ -688,6 +688,40 @@ memlock_verdict() { "$_p" "$_v" "${_f:+ (highest-numbered memlock file: $_f)}" } +# ── the payload= label against the payload the image ships (engine#1557, containment) ─────────────── +# `payload=` is a LABEL (the tarball stem, which no in-image fact equals) and the row above checks the payload's own version. Neither +# settles the incident: an image carrying payload=…c26c with a correctly computed payload_lemond passes both. The one in-image fact that +# DOES name the cycle is the payload's own README - `opt/1bit-package/1bit/README.txt` line 1 states `1bit engine rc-YYYY-MM-DD-cNN` - and +# `payload=` CONTAINS that token (it never equals it: the label carries the stem). So the comparison is containment, on the first line only. +payload_name_verdict() { + _pn=${1:-} _pt=${2:-} + case "$_pn" in + '') + printf 'FAIL the identity file states no payload at all (payload= is empty), so nothing says which payload this image carries' ;; + unknown) + printf 'FAIL the identity file states payload=unknown - the value is an environment input (container-build.sh: PAYLOAD_NAME), so "unknown" means the build never named what it shipped' ;; + *) + if [ -z "$_pt" ]; then + printf 'SKIP the payload ships no release tag in its README, so payload=%s cannot be checked in the image (the tarball name lives beside the bundle, not in the image)' "$_pn" + else + case "$_pn" in + *"$_pt"*) printf 'PASS consistent: the identity says payload=%s and the payload ships %s' "$_pn" "$_pt" ;; + *) printf 'FAIL the identity says payload=%s but the payload ships %s - payload= is a declared environment input, so this image names a release it does not carry (c32 and c33 shipped exactly this)' "$_pn" "$_pt" ;; + esac + fi ;; + esac +} + +payload_name_from_image() { # + _pi=${1:-} _pd=${2:-} + _pval=$(sed -n 's/^payload=//p' "$_pi" 2>/dev/null | head -1) + _ptag= + if [ -n "$_pd" ] && [ -f "$_pd/1bit/README.txt" ]; then + _ptag=$(sed -n '1s/.*\(rc-[0-9][0-9]*-[0-9][0-9]*-[0-9][0-9]*-c[0-9][0-9]*\).*/\1/p' "$_pd/1bit/README.txt" 2>/dev/null) + fi + payload_name_verdict "$_pval" "$_ptag" +} + 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 @@ -809,6 +843,11 @@ if [ "${1:-}" = --self-test ]; then check /y/1bit/1bit "$(PAYLOAD_DIR=/y identity_launcher_path aa '')" # PAYLOAD_DIR is honoured if [ -z "$(identity_launcher_path '' bbbb)" ]; then printf 'ok no claim yields no path (the row SKIPs)\n' else printf 'FAIL no claim should yield no path\n'; rc=1; fi + check PASS "$(payload_name_verdict lemonade-onebit-rc-2026-11-08-c33 rc-2026-11-08-c33)" # the label CONTAINS the token + check FAIL "$(payload_name_verdict lemonade-onebit-rc-2026-11-05-c26c rc-2026-11-08-c33)" # the c26 incident: must red + check SKIP "$(payload_name_verdict lemonade-onebit-rc-2026-11-08-c33 '')" # no README tag: not a pass by absence + check FAIL "$(payload_name_verdict unknown rc-2026-11-08-c33)" # PAYLOAD_NAME unset + check FAIL "$(payload_name_verdict '' rc-2026-11-08-c33)" # nothing stated check PASS "$(payload_identity_verdict 2026.47.0~1.52a2a6b3 2026.47.0~1.52a2a6b3)" check PASS "$(payload_identity_verdict 2026.47.0~1.52a2a6b3 2026.47.0~1752.52a2a6b3)" # the clone-count case: must NOT red check FAIL "$(payload_identity_verdict 2026.47.0~1.52a2a6b3 2026.47.0~1.abcdef01)" # a different sha IS a different pin @@ -2128,6 +2167,15 @@ case "$ML" in *) fail memlock "${ML#FAIL }" ;; esac + +# ── the payload= label is consistent with the payload the image ships (engine#1557) ────────────── +PNV=$(payload_name_from_image "$ID" "${PAYLOAD_DIR:-/opt/1bit-package}") +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 ec5819e6aa64593122d4990c1c41982b31abbbd1 Mon Sep 17 00:00:00 2001 From: bong-water-water-bong Date: Sun, 8 Nov 2026 20:14:40 -0400 Subject: [PATCH 3/3] os: the payload-name row's three defects, all reproduced then fixed (#1591 review) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The CHANGES review at `06833f2` reproduced three defects in the row I ported from #1569. Each one is real and each is now fixed, with the case pinned in the suite. **1. It false-PASSed between letter-suffixed cycles - which are the incident's own names.** The token regex was `rc-…-c[0-9][0-9]*`, so from a README saying `rc-2026-11-05-c26c` it extracted `rc-2026-11-05-c26`, dropping the letter; unanchored containment then passed `…-c26`, `…-c26b` **and** `…-c26c` against a c26c payload. This box carries `payload-c17b`, `-c26b` and `-c26c`, so the false pass was between real builds. Fixed twice over: the regex captures the suffix (`c[0-9][0-9]*[a-z]*`) **and** the containment requires a boundary after the token (`*"$_pt"|*"$_pt"[!0-9a-z]*`), so `…-c33x` no longer matches `…-c33` either. **2. It FAILed on every mini image.** The row ran unconditionally, but the mini schema (`tag`/`engine`/`engine_sha256`/`built`) has no `payload=` line and no `/opt/1bit-package` - so it red an image with nothing to check. Now: **SKIP** when the identity is the mini schema, with the reason saying why. **3. It FAILed when there is no identity file at all**, where the `identity` row SKIPs. Now **SKIP** as well, for the same reason: an image older than the identity file is not wrong, it is silent. Verified by **running the row**, not only the verdict - four fixtures through the real row block: ``` no identity file -> SKIP no … in this image build, so there is no payload label to read mini schema -> SKIP … the mini schema … carries no payload= label and no /opt/1bit-package no payload dir -> SKIP no … in this image, so the payload's own README cannot be read full v3, honest -> PASS full v3, c26 label -> FAIL ``` and `--self-test` **138 ok / 0 failed** under both the shebang (dash) and bash, with the c26/c26b/c33x FAILs and the c26c PASS pinned. --- os/mini/release-check.sh | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/os/mini/release-check.sh b/os/mini/release-check.sh index e00068138..3857b409c 100755 --- a/os/mini/release-check.sh +++ b/os/mini/release-check.sh @@ -704,8 +704,11 @@ payload_name_verdict() { if [ -z "$_pt" ]; then printf 'SKIP the payload ships no release tag in its README, so payload=%s cannot be checked in the image (the tarball name lives beside the bundle, not in the image)' "$_pn" else + # the label must CONTAIN the token with a BOUNDARY after it: `c33x` must not match `c33`, `c3` must not match `c33`. + # Unanchored containment passed `…-c26b` against a `c26c` payload, and those letter-suffixed names are exactly the + # incident's (this box carries payload-c17b, -c26b and -c26c). case "$_pn" in - *"$_pt"*) printf 'PASS consistent: the identity says payload=%s and the payload ships %s' "$_pn" "$_pt" ;; + *"$_pt"|*"$_pt"[!0-9a-z]*) printf 'PASS consistent: the identity says payload=%s and the payload ships %s' "$_pn" "$_pt" ;; *) printf 'FAIL the identity says payload=%s but the payload ships %s - payload= is a declared environment input, so this image names a release it does not carry (c32 and c33 shipped exactly this)' "$_pn" "$_pt" ;; esac fi ;; @@ -717,7 +720,7 @@ payload_name_from_image() { # _pval=$(sed -n 's/^payload=//p' "$_pi" 2>/dev/null | head -1) _ptag= if [ -n "$_pd" ] && [ -f "$_pd/1bit/README.txt" ]; then - _ptag=$(sed -n '1s/.*\(rc-[0-9][0-9]*-[0-9][0-9]*-[0-9][0-9]*-c[0-9][0-9]*\).*/\1/p' "$_pd/1bit/README.txt" 2>/dev/null) + _ptag=$(sed -n '1s/.*\(rc-[0-9][0-9]*-[0-9][0-9]*-[0-9][0-9]*-c[0-9][0-9]*[a-z]*\).*/\1/p' "$_pd/1bit/README.txt" 2>/dev/null) fi payload_name_verdict "$_pval" "$_ptag" } @@ -843,6 +846,11 @@ if [ "${1:-}" = --self-test ]; then check /y/1bit/1bit "$(PAYLOAD_DIR=/y identity_launcher_path aa '')" # PAYLOAD_DIR is honoured if [ -z "$(identity_launcher_path '' bbbb)" ]; then printf 'ok no claim yields no path (the row SKIPs)\n' else printf 'FAIL no claim should yield no path\n'; rc=1; fi + check FAIL "$(payload_name_verdict lemonade-onebit-rc-2026-11-05-c26 rc-2026-11-05-c26c)" # c26 must NOT match c26c + check FAIL "$(payload_name_verdict lemonade-onebit-rc-2026-11-05-c26b rc-2026-11-05-c26c)" # nor c26b + check FAIL "$(payload_name_verdict lemonade-onebit-rc-2026-11-08-c33x rc-2026-11-08-c33)" # the token must END there, not continue + check PASS "$(payload_name_verdict lemonade-onebit-rc-2026-11-08-c33.tar rc-2026-11-08-c33)" # a non-alphanumeric after it is fine + check PASS "$(payload_name_verdict lemonade-onebit-rc-2026-11-05-c26c rc-2026-11-05-c26c)" # the real c26c pair still passes check PASS "$(payload_name_verdict lemonade-onebit-rc-2026-11-08-c33 rc-2026-11-08-c33)" # the label CONTAINS the token check FAIL "$(payload_name_verdict lemonade-onebit-rc-2026-11-05-c26c rc-2026-11-08-c33)" # the c26 incident: must red check SKIP "$(payload_name_verdict lemonade-onebit-rc-2026-11-08-c33 '')" # no README tag: not a pass by absence @@ -2169,12 +2177,20 @@ esac # ── the payload= label is consistent with the payload the image ships (engine#1557) ────────────── -PNV=$(payload_name_from_image "$ID" "${PAYLOAD_DIR:-/opt/1bit-package}") -case "$PNV" in - PASS*) pass payload-name "${PNV#PASS }" ;; - SKIP*) skip payload-name "${PNV#SKIP }" ;; - *) fail payload-name "${PNV#FAIL }" ;; -esac +if [ ! -f "$ID" ]; then + skip payload-name "no $ID in this image build, so there is no payload label to read (an image older than the identity file is not wrong, it is silent)" +elif [ -n "${_id_gitsha:-}" ]; then + skip payload-name "this image's identity is the mini schema (tag/engine/engine_sha256/built), which carries no payload= label and no ${PAYLOAD_DIR:-/opt/1bit-package}: there is nothing here to check" +elif [ ! -d "${PAYLOAD_DIR:-/opt/1bit-package}" ]; then + skip payload-name "no ${PAYLOAD_DIR:-/opt/1bit-package} in this image, so the payload's own README cannot be read" +else + PNV=$(payload_name_from_image "$ID" "${PAYLOAD_DIR:-/opt/1bit-package}") + case "$PNV" in + PASS*) pass payload-name "${PNV#PASS }" ;; + SKIP*) skip payload-name "${PNV#SKIP }" ;; + *) fail payload-name "${PNV#FAIL }" ;; + esac +fi say "" # The back-off leaves a trace: a run that only passed because the partition freed in time must say so, or the next