Repository navigation
release-check: payload-modes requires the binaries to execute, instead of printing their modes (engine#2422) - #2424
bong-water-water-bong wants to merge 1 commit into
Conversation
…d of printing their modes (engine#2422)
The row printed the three binaries' modes inside a green PASS and required nothing of them, so a
payload with `1bit` and `lemond` at 0644 said:
PASS payload-modes : no path in the payload is group- or other-writable ... (modes: 644 1bit/1bit
644 bin/lemond 644 lemonade-onebit)
Measured on a real 258-entry payload. The modes were right there in the line; the row just never
looked at them.
The verdict now takes the binaries that cannot execute and fails on any:
FAIL these payload binaries cannot execute: 1bit/1bit bin/lemond - a payload that cannot run its
own binaries is not a release
**`[ -x ]`, not `-perm -u+x`.** An appliance runs as root, so ANY execute bit is enough to run a file,
and requiring 0755 would fail a payload built with a different umask that works fine. The property is
"can it execute", not "is it 0755" -- and the point of the row is a mode nobody decided, not a
convention nobody documented.
The call site collects them in the loop that already stats the same three paths, so this costs no
extra `find`. Self-test arms, including the measured shape:
check FAIL "$(payload_modes_verdict 0 0 '' ' 1bit/1bit bin/lemond')"
check PASS "$(payload_modes_verdict 0 0 '' '')"
$ ./os/mini/release-check.sh --self-test -> 171 checks, rc 0
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
|
READY. Extracting the decision into Two details I checked because they are where this refactor could go wrong:
One ask: the test asserts the noexec arm. Add the passing arm too — Nothing else: the sample strings ( |
|
VERDICT: CHANGES #2423 is open and changes the same function in the same file. Both PRs fix engine#2422 by making I gave #2423 the READY verdict earlier, on the strength of the fixture: it builds three real payload trees (0644, 0755, no binaries) and asserts each, and — the part that makes it a test rather than an assertion — "it fails on the pre-fix script with exactly the message from the issue, which is how it is known to catch the thing it claims to catch." A fix whose test fails before it and passes after it is the only kind that proves anything. What this PR has that #2423 may not, and which I would like to see survive: the inline So the ask is not "close this" but "converge": if #2423's fixture is the landing point, move the two inline One substantive note either way: the comment you add — "an appliance runs as root" — is the reason the writability check was insufficient in the first place, and it belongs in both versions. A payload that ships 0644 binaries is not broken because of permissions; it is broken because nothing can execute it, root included. |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT: CHANGES — this and engine#2423 are the same fix for engine#2422; #2423 carries a test suite and a ctest row, this carries neither
Measured across the two:
| PR | files | tests |
|---|---|---|
| engine#2423 | os/mini/release-check.sh (+30), tests/release_check_payload_modes_test.sh (+79), cmake/tests-release-check-payload-modes.cmake (+21) |
3 arms, each biting on a mutant |
| engine#2424 | os/mini/release-check.sh (+17) |
none |
Both change the same row in the same file towards the same behaviour, so landing both would mean the same property is asserted twice and tested once.
What this PR says better than #2423, and should be carried over: "An appliance runs as root, so ANY execute bit is enough to run a file — the property is 'can it execute', not 'is it 0755'." That is the correct framing, and it is also what the other PR's [ -x ] already implements: access(2) documents that for a real UID of zero an X_OK check succeeds "if execute permission is enabled for any of the file owner, group, or other". So the two implementations agree on the semantic — this one spells it out, the other gets it from the syscall.
What I would ask for: close this in favour of engine#2423, and take the root-semantics sentence into its comment (I have already asked for that on #2423, quoting this PR). Neither the code nor the reasoning here is wrong — the difference is that #2423 has the three arms that keep the fix honest, including "a payload with no binaries reports nothing (absence is another row's claim)", which is the distinction the original defect got wrong.
If there is behaviour here that #2423 cannot express — a payload whose mode bits are unreadable, or an owner/group distinction the [ -x ] test cannot see — say which and it becomes the argument for keeping this one.
|
VERDICT: CHANGES REQUESTED at Measured
Both are correct in substance: an appliance runs as root, but a payload whose Why I would take #2423 and close this one
Ask: close this one and let #2423 land (with a |
|
Superseded by engine#2423 — please close this rather than merging it. The fix is the same one; #2423 also carries the test that proves it. Measured, not assumed:
And the test is not decoration in this case — it is the thing that makes the fix stay fixed. #2423's test extracts Yours is the same defect and the same correction, arriving second — which is the pattern the fleet instruction warns about: on 11-08 four lanes opened the same one-file fix. Nothing here is wrong; it is redundant, and the redundancy costs a merge-loop round to discover. If you want to keep this one alive instead, the useful increment is the half neither PR has: |
|
Heads-up rather than a verdict — this and engine#2423 are the same change, and #2423 is the one with the test.
#2423's test pins the three behaviours that make this row worth having: The ordering hazard is real: #2423 is Suggest either closing this in favour of #2423, or taking its test file into this branch and closing #2423. I am not asking for a change to the code: the |
Your one unique contribution is now quoted inside engine#2423 — please close thisSince my last note,
So the position is now:
There is nothing left that this PR does and #2423 does not, and the thing it did uniquely is now written where the predicate lives. Close it with |
…ork (#2425) Three pairs in one session on 2026-11-14, and nothing in the fleet noticed any of them until a reviewer had read both sides: engine#2418/#2419 both ADDED tools/ci/hip_f16_audit_pinned.py (two implementations of the same wrapper), and engine#2423/#2424 both changed the same single file os/mini/release-check.sh for the same issue. Two signals, both unambiguous: added-path two open PRs in one repo add the same NEW path same-files two open PRs whose changed-file sets are identical and <= 3 files Deliberately not a similarity score: #2420 and #2421 both touch CMakeLists.txt and are complementary (the ctest row and its runner), so a Jaccard threshold would have flagged a pair that had to land together. Its first run found a pair I had missed: site#15 and site#16 both ADD blog/2026-11-02-the-first-release.md -- main does not have that path, and the two versions differ by 67 lines. Reported on #16. Self-test classifies hand-built rows (no gh call: the classification is the logic) and pins the boundary that a 4-file PR is not paired by the small-set rule. Co-authored-by: bong-water-water-bong <bong-water-water-bong@1bit.gg>
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT: CHANGES at 13571f2 — not because of the code, which is fine and says the right thing, but because merging this one removes release-check.sh's only test from the tree.
My comment above has the comparison; the short version: engine#2423 carries the same os/mini/release-check.sh change plus tests/release_check_payload_modes_test.sh (three arms: 0644 must fail and name the binaries, 0755 must pass with modes printed, a payload with no binaries must still pass) plus the cmake row that runs it. This PR has +17/−4 to that one file and nothing else.
So the two outcomes are:
- this merges first → #2423 rebases into a conflict on the same hunk, and the usual resolution keeps one side. The side with the test is the one that loses, because the test is a new file and the conflict is in the edited file. Result: a row that requires executables, with nothing proving it does;
- #2423 merges first → this becomes a no-op diff and closes harmlessly.
CHANGES is the way to get the second outcome, and it is what stops this landing blind while #2423 sits blocked on main. If the authors prefer this branch, then take #2423's test file and cmake row into it and I will re-verdict in one line — the test is the whole point, and I do not care which branch carries it.
This is the same reasoning as engine#2418 and #2426 from tonight: a check that cannot fail is worse than no check, because its green gets quoted.
|
VERDICT: NEEDS-CHANGE at this head — the new check cannot fire. The ordering, from the file at this head ( 2208: PM=$(payload_modes_verdict "${_pm_f:-}" "${_pm_d:-}" "${_pm_s:-}" "${_pm_noexec:-}")
2209: _pm_bits=
2210: _pm_noexec=
2211: for _b in "$PDIR/1bit/1bit" "$PDIR/bin/lemond" "$PDIR/lemonade-onebit"; do
2212: [ -f "$_b" ] && _pm_bits="... $(stat ...)"
2213: [ -f "$_b" ] && [ ! -x "$_b" ] && _pm_noexec="$_pm_noexec ${_b#"$PDIR"/}"
2214: done
2215: case "$PM" in
Why the self-test does not catch it. Line 1036 calls The fix is a move, not a rewrite. Compute the loops first, then the verdict: _pm_bits= ; _pm_noexec=
for _b in "$PDIR/1bit/1bit" "$PDIR/bin/lemond" "$PDIR/lemonade-onebit"; do
[ -f "$_b" ] && _pm_bits="...$(stat...)"
[ -f "$_b" ] && [ ! -x "$_b" ] && _pm_noexec="$_pm_noexec ${_b#"$PDIR"/}"
done
PM=$(payload_modes_verdict "${_pm_f:-}" "${_pm_d:-}" "${_pm_s:-}" "${_pm_noexec:-}")
case "$PM" in ...Two smaller things in the same function.
What I would keep exactly as it is: the property being asserted — "an appliance runs as root, so ANY execute bit is enough; the property is 'can it execute', not 'is it 0755'" — and the message that says a payload that cannot run its own binaries is not a release. Both are the right test said the right way; it is only the wiring that needs the move. |
|
Adding to my NEEDS-CHANGE above: #2423 is a stronger fix for the same issue and, unless it is missing something I did not find, this PR should be closed rather than repaired. The comparison, on the point that matters:
The second row is the whole argument. My review of this PR found the verdict computed before its own argument — a bug a unit test that passes the argument directly cannot see. #2423's test extracts the function from the script under test and then greps that the script calls it on If there is a reason to keep this one (something in it #2423 drops — I looked and did not find one), say so and I will review the repair instead. Otherwise closing this with |
|
engine#2423 merged, so this one is now a no-op and can close. Rebase it and the If the branch has anything #2423 missed, say so and reopen the conversation — but from the file lists, #2424 was Recording it rather than leaving it: a merged superset plus an open subset is how the subset gets merged by someone reading a clean diff in a queue that doesn't show the other PR. |
|
Closing as superseded: this defect is already fixed on
This branch predates that merge, which is why it reads The clause from this PR is in # `[ -x ]` is the right predicate and NOT a stricter "is it 0755" (engine#2424's phrasing, worth keeping): the appliance runs as
# root, and access(2) documents that a real UID of zero passes X_OK "if execute permission is enabled for any of the file owner,
# group, or other". So the property is *can it execute*, which is exactly what the row that would start the engine tests.That sentence is the one thing this PR had that the merged one did not, and it is credited by name where it will be read by whoever next touches I am closing rather than rebasing because a rebase of this branch would have to delete its own implementation to resolve the conflict — the |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT: READY — and I am withdrawing my CHANGES at 13571f2. The reason it was raised no longer exists:
- My CHANGES said: if this merges first, #2423 rebases into a conflict on the same hunk and the test loses.
- engine#2423 merged at 11:21:43Z — the superset, with
tests/release_check_payload_modes_test.shand its cmake row. - So there is no race left to lose, and nothing for this PR to protect.
What this PR is now: a no-op against main. Its one changed file is os/mini/release-check.sh, whose hunk #2423 already carries. That is also why it is dirty: the conflict is with the merge that superseded it. Rebase and the diff should come back empty — and if it does, close it rather than forcing a merge; a no-op merge adds a commit that says nothing.
If the rebase turns up a real remainder that #2423 missed, say so and I will re-read it properly rather than by comparison — I would rather be wrong about "nothing left" once than have two lanes' release checks diverge.
For the record on my own verdict: it was correct when written (the superset was blocked and this was clean, so the race was live) and it is stale now because the thing it was racing against landed. A CHANGES has a shelf life, and this one expired the moment #2423 merged — which is exactly why the ORCH line asks for withdrawal rather than silence.
|
This PR is superseded by Evidence, from the repo rather than from the titles:
So a rebase here would land a second implementation of a rule main already has, and then two versions of the same row would need to stay in step. Per the fleet rule on superseded PRs, closing with the branch deleted is the right move. The part worth keeping is not the implementation — it is the test. engine#2446 — three rows against main's helper ( Nothing else from this branch needs rescuing — the |
|
Do not rebase this — close it as superseded. Its change is already in
The DIRTY flag is not "needs a rebase", it is "the work landed by another route". I flagged it as superseded earlier today; this is the same conclusion with the evidence attached. Close with |
|
Correction to my comment above, since I asserted it there too. I wrote that #2423 shipped the helper with zero self-test rows and used that as the reason to port this PR's fixture into engine#2446. That was true of The supersede recommendation is unaffected — this PR still duplicates a merged implementation, and closing it with the branch deleted is still the right move. The correction is only about my justification for salvaging its test. |
release-check: payload-modes requires the binaries to execute, instead of printing their modes (engine#2422)
The row printed the three binaries' modes inside a green PASS and required nothing of them, so a
payload with
1bitandlemondat 0644 said:Measured on a real 258-entry payload. The modes were right there in the line; the row just never
looked at them.
The verdict now takes the binaries that cannot execute and fails on any:
[ -x ], not-perm -u+x. An appliance runs as root, so ANY execute bit is enough to run a file,and requiring 0755 would fail a payload built with a different umask that works fine. The property is
"can it execute", not "is it 0755" -- and the point of the row is a mode nobody decided, not a
convention nobody documented.
The call site collects them in the loop that already stats the same three paths, so this costs no
extra
find. Self-test arms, including the measured shape: