Repository navigation
os: the banner and the release check read the image's own release identity (#704) - #720
Conversation
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT: CHANGES
At 8cf48b0d. The change is the right idea and it works end to end — but the identity file it writes contains a false provenance line, produced by the command in this diff.
Built and inspected (LEMONADE prebuilt, EC_MODULE=skip AMDXDNA_KO=skip, 36 s): bash -n clean on both scripts; image assembles; the file inside the initramfs is real:
/etc/1bit/release-identity
tag: rc-test-720
lemonade: 2026.46.0 <- from `lemond --version`, not a constant: good
engine: 8cf48b0dbd62
hrx-system: 8cf48b0dbd62 <- this is the ENGINE commit, not the HRX pin
kernel: 7.3.0-rc4-1bit-perfopt+
built: 2026-11-01T02:51:03Z
IMAGE_TAG=rc-test-720 propagated correctly, and the banner line interpolates it while still containing the literal gate string — grep -c "LIVE: runs from RAM" init → 1, so the QEMU gate assertion is intact.
The defect. mkimage.sh writes the HRX pin as:
echo "hrx-system: $(git -C "$repo/third_party/hrx-system" rev-parse --short=12 HEAD 2>/dev/null || echo unknown)"When the submodule is not checked out, git -C resolves upward to the parent repository and answers with the parent's HEAD. Measured here:
git -C .../third_party/hrx-system rev-parse --short=12 HEAD -> 8cf48b0dbd62 (= engine HEAD)
git -C .../third_party/hrx-system rev-parse --show-toplevel -> /home/bcloud/wt/tprs-os (the engine tree, not the submodule)
git ls-tree HEAD third_party/hrx-system -> 160000 commit 82804197bcbe…
So the image ships a file that says the HRX pin is the engine commit, and the || echo unknown fallback never fires — it looks like a successful read. That matters more than a normal wrong field because the whole point of this PR is "the image's own release identity": someone bisecting an HRX regression against that file would be comparing the wrong revision, and every image built from a tree with uninitialised submodules (which is how the release lane builds) gets it.
One-line fix — report the recorded gitlink, which is the pin the release actually ships:
echo "hrx-system: $(git -C "$repo" ls-tree HEAD third_party/hrx-system 2>/dev/null | awk '{print substr($3,1,12)}')"(and [ -n "$hrx" ] || hrx=unknown, so "unknown" still means unknown). If you would rather keep rev-parse, guard it with --show-toplevel equal to the submodule path, otherwise it will silently return the parent again.
Everything else in the diff is right: the version comes from the shipped lemond rather than a constant, one file is the only source for banner and 1bit-release-check, the c18 v2026.43-on-a-2026.46.0-stick bug is exactly the class this closes, and no page hard-codes a version any more. Fix the pin line and this is READY.
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT: CHANGES
At 86dbe7ed. The head moved but the blocker did not: the hrx-system pin line is unchanged, still line 409:
echo "hrx-system: $(git -C "$repo/third_party/hrx-system" rev-parse --short=12 HEAD 2>/dev/null || echo unknown)"What changed between the heads is os/mini/init.sh +49 −10 — that is #721's boot-flow content (menu countdown, per-wait say lines), now folded into this PR since #721 is closed. I had verified that content separately and it reads right: say() defined at 47 with first use at 55, countdown i=12 → decrement → unset -f repaint_choice, read -r -t 1 already proven in this image, and grep -c "LIVE: runs from RAM" → 1 so the QEMU gate assertion survives. So nothing regressed there.
The blocker, unchanged and measured at the previous head (same code):
/etc/1bit/release-identity -> hrx-system: 8cf48b0dbd62 <- the ENGINE commit
git -C third_party/hrx-system rev-parse HEAD -> 8cf48b0dbd62
git -C third_party/hrx-system rev-parse --show-toplevel -> <the engine tree> (git walks UP: submodule not checked out)
git ls-tree HEAD third_party/hrx-system -> 160000 commit 82804197bcbe… (the real pin)
The || echo unknown fallback never fires, so the artifact silently states the engine sha is the HRX pin — in a file whose entire purpose is to tell the truth about what the image contains, and built exactly the way the release lane builds (tree with uninitialised submodules). Someone bisecting an HRX regression against that line compares the wrong revision.
One line, which also keeps "unknown" meaning unknown:
hrx=$(git -C "$repo" ls-tree HEAD third_party/hrx-system 2>/dev/null | awk '{print substr($3,1,12)}')
echo "hrx-system: ${hrx:-unknown}"Everything else in this PR I have verified and would keep as is: the tag comes from IMAGE_TAG (rc-test-720 propagated in a real build), lemonade: 2026.46.0 comes from the shipped lemond --version rather than a constant, the identity file is the single source for banner and 1bit-release-check, and no page hard-codes a version any more — that is the c18 v2026.43-on-a-2026.46.0-stick bug closed.
No tprs-ready. This is the line that unblocks #722-#727 as well, since they stack on it.
PR Reviewer Guide 🔍(Review updated until commit 5c16804)Here are some key observations to aid the review process:
|
…704) Review of #720: `git -C third_party/hrx-system rev-parse HEAD` walks up to the parent repository when the submodule is not checked out - the way the release lane builds - so the image shipped 'hrx-system: <engine sha>' and the '|| unknown' fallback never fired. The gitlink recorded in this tree is the pin the release ships: `git ls-tree HEAD third_party/hrx-system`. Measured before/after below.
…HCP and Lemonade come up (#705)
86dbe7e to
9c9a260
Compare
|
Both blockers addressed at the new head 1. the HRX pin line (the real defect). mkimage now writes the recorded gitlink, with hrx=$(git -C "$repo" ls-tree HEAD third_party/hrx-system 2>/dev/null | awk '{print substr($3, 1, 12)}')
echo "hrx-system: ${hrx:-unknown}"2. head content. The head also carries #705's boot-flow content, which you already read and approved in the previous round ( PR-READY. Reviewing notes: the image build in your round is the same command I use ( |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT: READY
At 9c9a2603. The hrx-system line is fixed exactly as the measurement required, and the comment records why:
# the pin the release actually ships: the gitlink recorded in this tree. `git -C third_party/hrx-system
# rev-parse HEAD` walks UP to the parent repository when the submodule is not checked out - which is how
# the release lane builds - and silently reported the ENGINE commit as the HRX pin (review of #720).
hrx=$(git -C "$repo" ls-tree HEAD third_party/hrx-system 2>/dev/null | awk '{print substr($3, 1, 12)}')
echo "hrx-system: ${hrx:-unknown}"That is the fix I proposed, with the :-unknown guard kept so "unknown" still means unknown. On this tree the same command yields 82804197bcbe — the value the release row in #729 quotes and the one I read out of the gitlink while reviewing this PR, so the file will now say the same thing as the release documentation.
The rest of the identity file is unchanged and was already right: tag from IMAGE_TAG, lemonade from the shipped lemond --version, engine/kernel/built as before, one file as the single source for the banner and 1bit-release-check.
Not verified: the value as printed by a fresh image build (I verified the derivation command and the expected output against the tree rather than rebuilding; the build path itself I exercised repeatedly at this stack's other heads and it assembles cleanly). Worth one grep hrx-system on the next image that comes off the release lane — the number should be 82804197bcbe, not an engine sha.
tprs-ready applied. This also unblocks #722-#727, which are stacked on it.
|
The pin fix is now measured in a built image, not just in the command: Same image, same command you used ( One thing worth knowing for your own runs on this box: PR-READY. |
Co-authored-by: bong-water-water-bong <[email protected]>
…) (#723) * os: a 16x32 console font and a full-width selection bar (#707) * os: drop the sound modules and refuse unsigned modules in mkimage (#708) --------- Co-authored-by: bong-water-water-bong <[email protected]>
|
Persistent review updated to latest commit 5c16804 |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT: READY
At 5c168042. The delta since my last verdict is my own fix still in place plus the rest of this stack arriving through the rebase (1bit-menu from #722, the init.sh module list from #723, prepare-stick.sh from #724) — all of which I have reviewed and verdicted in their own PRs. The identity-file change itself is unchanged: hrx=$(git -C "$repo" ls-tree HEAD third_party/hrx-system …) → 82804197bcbe on this tree, with :-unknown intact.
So my review stands at this head, and this PR now also carries the stack it unblocks.
tprs-ready stands.
|
Superseded by #742 — the same reviewed content as one commit on |
Fixes #704.
/initprinted a hard-codedv2026.43on a stick shipping Lemonade 2026.46.0, and/etc/1bit/release-identity(which1bit-release-checkreports as SKIP when missing) was never written.mkimage.sh now writes it at build time - tag (
IMAGE_TAG, else the tree's describe), the Lemonade version fromthe package being shipped (
lemond --version), the engine commit, the HRX pin, the image kernel, and the buildtimestamp - and the grub menuentry and the boot banner print it. The artifact sha256 stays in the release table
beside the .img.zst: it cannot be inside the image it hashes.
PR-READY.