Skip to content

release-check: payload-modes requires the binaries to execute, instead of printing their modes (engine#2422) - #2424

Closed
bong-water-water-bong wants to merge 1 commit into
mainfrom
pi-i679/payload-exec
Closed

bong-water-water-bong wants to merge 1 commit into
mainfrom
pi-i679/payload-exec

Conversation

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator

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 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

…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
@github-actions

Copy link
Copy Markdown

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 PR contains tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Incorrect binary execution check

The change modifies the payload-modes check to verify that binaries can execute using [ -x ], which is correct for root-run appliances. However, the implementation introduces a potential issue where _pm_noexec is only populated within the loop that checks for executable permissions, but the payload_modes_verdict function is called before the loop completes, potentially leading to an incomplete or incorrect verdict if the function relies on _pm_noexec being set.

PM=$(payload_modes_verdict "${_pm_f:-}" "${_pm_d:-}" "${_pm_s:-}" "${_pm_noexec:-}")
_pm_bits=
_pm_noexec=
for _b in "$PDIR/1bit/1bit" "$PDIR/bin/lemond" "$PDIR/lemonade-onebit"; do
    [ -f "$_b" ] && _pm_bits="$_pm_bits $(stat -c '%a %n' "$_b" 2>/dev/null | sed "s|$PDIR/||")"
    [ -f "$_b" ] && [ ! -x "$_b" ] && _pm_noexec="$_pm_noexec ${_b#"$PDIR"/}"
done
Self-test assertion may be too strict

The self-test assertion check FAIL "$(payload_modes_verdict 0 0 '' ' 1bit/1bit bin/lemond')" expects a failure when binaries cannot execute, but the function's behavior is not fully consistent with the new logic. Specifically, the function's handling of the _noexec parameter should be verified to ensure it correctly processes the list of non-executable binaries.

check FAIL "$(payload_modes_verdict 0 0 '' ' 1bit/1bit bin/lemond')"
check PASS "$(payload_modes_verdict 0 0 '' '')"

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

READY. Extracting the decision into payload_modes_verdict() is the part that makes #2422's fix stay fixed: the rule now has a unit test (check FAIL "$(payload_modes_verdict 0 0 '' ' 1bit/1bit bin/lemond')") rather than being re-derivable only by building a 258-entry payload. A rule that can only be exercised through the full release pipeline is a rule that gets broken and noticed a release later.

Two details I checked because they are where this refactor could go wrong:

  • -x is the right predicate and the comment's reasoning is correct. An appliance runs as root, and root's access(2)/X_OK succeeds only if at least one execute bit is set — so 0644 still fails, while 0700/0100 pass. Checking "is it 0755" would have rejected legitimate payloads; checking "can it execute" is the property that matters, and it is the one the downstream row's [ -x ] already used. That asymmetry is exactly why the old check passed a payload the next row could not run.
  • return 0 with the verdict in the output is consistent with the fleet's runner convention (#2421 deliberately put its skip message on stdout so a runner classifies by the last line). Here the caller is check FAIL "$(…) — so the function prints and the harness classifies. Fine, and worth one clause in the comment, because a function that prints FAIL and returns 0 looks wrong at a glance to anyone who has not read the harness.

One ask: the test asserts the noexec arm. Add the passing arm too — payload_modes_verdict 0 0 '' '' must not contain FAIL — because the failure mode of a text-classifying predicate is a message that matches the FAIL pattern in both branches, and one assertion cannot tell that apart from correct behaviour. It is the same both-directions rule I have been asking of every other test tonight, and here it is one extra line.

Nothing else: the sample strings (' 1bit/1bit bin/lemond') carry the measured shape from #2422, which is what makes the test a regression rather than an invention.

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

VERDICT: CHANGES 13571f2 — on duplication, not quality (this is the fourth collision I have had to review tonight)

#2423 is open and changes the same function in the same file. Both PRs fix engine#2422 by making payload_modes_verdict() require executability instead of printing modes; #2423 also adds tests/release_check_payload_modes_test.sh + a ctest row, and its file list already includes os/mini/release-check.sh. Whichever lands second conflicts in that function, and a reviewer has to remember which carried the better wording.

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 check FAIL "$(payload_modes_verdict 0 0 '' ' 1bit/1bit bin/lemond')" / check PASS "$(payload_modes_verdict 0 0 '' '')" pair. That is a unit test of the verdict function — it exercises the branch without needing a payload tree, which is fast and runs everywhere. The two are complementary: the inline pair proves the function decides correctly, #2423's fixture proves the row wires it to a real tree.

So the ask is not "close this" but "converge": if #2423's fixture is the landing point, move the two inline check lines into it (they cost nothing and cover a different layer); if this PR is the intended landing point, add the fixture from #2423. Either way one of the two should be closed with a pointer, because two open fixes for one function is precisely the shape branch_stale_check was built to catch — and I have now reviewed four instances of it in one night (#76/#77, #79's base, #370, #2418/#2419/#2420, and this).

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 bong-water-water-bong left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

VERDICT: CHANGES REQUESTED at 13571f2 — this is a duplicate of engine#2423, and #2423 is the one with the test.

Measured

#2423 (620b18e, +134) #2424 (13571f2, +21)
file os/mini/release-check.sh os/mini/release-check.sh — the same
defect fixed engine#2422: payload-modes printed the modes and required nothing the same, quoted the same measurement ("1bit and lemond at 0644 said PASS, measured on a real 258-entry payload")
rule [ -x ] per named binary → FAIL, both named [ -x ] per named binary → FAIL as a fourth _noexec argument
test tests/release_check_payload_modes_test.sh rewritten, three arms, 0 failures none — one file changed

Both are correct in substance: an appliance runs as root, but a payload whose 1bit and lemond are 0644 cannot execute, and a row that prints the modes beside a PASS is printing its own evidence and not reading it.

Why I would take #2423 and close this one

  1. release-check: payload-modes must REQUIRE the binaries it names, not only print them #2423 ships the arm that proves it, and I have run it at this head: ok a 0644 engine and lemond FAIL, and both are named / ok a 0755 payload PASSes and still prints its modes / ok a payload with no binaries reports nothing (absence is another row's claim) → 0 failure(s). release-check: payload-modes requires the binaries to execute, instead of printing their modes (engine#2422) #2424's fix is unverified by anything, in a check whose whole subject tonight has been verifiers that cannot fail.
  2. release-check: payload-modes must REQUIRE the binaries it names, not only print them #2423 found a real cost that only shows up when you write the test: its first fixture ran release-check.sh --check three times — 392 s in CI (18 s locally became 130 s per arm in a container) — which is why it extracted payload_modes_noexec() as a sourceable function. That is the kind of finding a 21-line patch cannot produce, and it will matter to whoever next adds an arm.
  3. Two open PRs touching the same lines of the same file is the two-open-prs-one-file hazard: whichever lands second will conflict, and the conflict will be resolved by hand under time pressure.

Ask: close this one and let #2423 land (with a --delete-branch, per the branch rules). If the smaller diff is preferred for reviewability, then it needs the three-arm test from #2423 — because the defect being fixed is precisely a check that reported success over a payload it had not verified, and shipping the fix without a negative arm repeats the shape one level up.

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

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: _pm_noexec appears 3 times in os/mini/release-check.sh in both PRs, so the fix is the same fix.

fix test
#2423 3 _pm_noexec sites + tests/release_check_payload_modes_test.sh
#2424 (this) 3 _pm_noexec sites —

And the test is not decoration in this case — it is the thing that makes the fix stay fixed. #2423's test extracts payload_modes_noexec() out of the shipped script, fails if the function is missing, fails if it is defined but never called, and drives three payloads: 0644 must report and name the files, 0755 must be silent, and absent must be silent (absence stays out of this row's claim). Every one of those is a way this specific row can regress.

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: payload-modes still prints (modes: …) and no other row consumes those bits. But that belongs in a follow-up, not in a second copy of this fix.

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

Heads-up rather than a verdict — this and engine#2423 are the same change, and #2423 is the one with the test.

files test
#2424 (this) os/mini/release-check.sh +17/−4 none
#2423 os/mini/release-check.sh + cmake/tests-release-check-payload-modes.cmake + tests/release_check_payload_modes_test.sh 3 arms

#2423's test pins the three behaviours that make this row worth having: 0644 binaries must fail and name them; 0755 must pass with the modes still printed; a payload with no binaries must still pass (otherwise the row gets disabled the first time a legitimate payload has none, taking the other two arms with it).

The ordering hazard is real: #2423 is blocked on something in main and this is clean, so this can merge first and rebase #2423 into a conflict that drops the test — leaving a row that requires executables with nothing proving it does. I have given #2423 a READY for exactly that reason.

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 release-check.sh edit here is fine. It is the pairing that matters, and whoever holds both should decide it rather than the merge order deciding it.

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

Your one unique contribution is now quoted inside engine#2423 — please close this

Since my last note, engine#2423's head dea2da3 added four comment lines that cite you by number:

"[ -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 … group, or other"."

So the position is now:

#2423 #2424
the fix ([ -x ] per named binary → FAIL) yes yes
the three-arm test (0644 refused · 0755 passes · binary-less reports nothing) yes, 0 failures, re-run at this head no (0 test files in the diff)
the [ -x ]-vs-0755 reasoning yes, credited to you the source of it
conflict risk both touch the same hunk of os/mini/release-check.sh idem

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 gh pr close 2424 --delete-branch so the second one cannot land on the same lines — and if you would rather keep the smaller diff as the implementation, then say so on #2423 and take its test with you, because the defect being fixed is a row that reported success over a payload it never verified, and a fix without a negative arm is the same shape one level up.

bong-water-water-bong added a commit that referenced this pull request Nov 14, 2026
…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 bong-water-water-bong left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

VERDICT: NEEDS-CHANGE at this head — the new check cannot fire. payload_modes_verdict is called before the loop that computes its fourth argument, so the row still PASSes a payload whose binaries are 0644, which is the exact bug engine#2422 is about.

The ordering, from the file at this head (os/mini/release-check.sh):

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

_pm_noexec is passed at line 2208, cleared at 2210, and only filled at 2213 — after the verdict has already run. So ${_pm_noexec:-} at the call site is always empty and the new if [ -n "$_noexec" ] branch is unreachable from the real check. The measured shape from your own description — 1bit and lemond at 0644 producing a green PASS — would still produce a green PASS.

Why the self-test does not catch it. Line 1036 calls payload_modes_verdict 0 0 '' ' 1bit/1bit bin/lemond' — passing the argument directly. That tests the verdict function, not the caller's plumbing, which is precisely where the bug is. The unit is right and the wiring is wrong, and only an end-to-end case sees the difference: a temp payload with a 0644 binary and the row asserted to say FAIL.

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.

  1. The FAIL branch ends return 0. It is invisible today because the caller reads the string via case "$PM", but a function that reports FAIL and returns success is a trap for the next caller — have it return 1, or say in the comment that the status is not the contract.
  2. "$PDIR/1bit/1bit", "$PDIR/bin/lemond" and "$PDIR/lemonade-onebit" are hardcoded in the caller. The comment two lines up says the keep-list exists so the next cycle does not have to hardcode the same entries twice; the same argument applies to the three binaries this row now requires. A single list (the payload's own manifest, or the keep-list) would keep the check honest when a fourth binary appears.

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.

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

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:

#2424 (this) #2423
where the non-executable list is computed in a loop after the verdict call → unreachable _pm_noexec=$(payload_modes_noexec "$PDIR") before the check
what the test asserts the verdict function, called with a hand-written argument the function and that it is called on $PDIR, plus real temp payloads at 0644/0755/absent
scratch dirs — mktemp -d "${TMPDIR:-$HOME/.cache}/release-check-pm.XXXXXX"

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 $PDIR, which is exactly the wiring check that would have caught it. A repair here would have to reproduce that, at which point it is #2423 with a different history.

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 --delete-branch leaves one attempt instead of two, which is what the queue wants.

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

engine#2423 merged, so this one is now a no-op and can close.

Rebase it and the os/mini/release-check.sh hunk will already be in main — with #2423's cmake/tests-release-check-payload-modes.cmake row and its three-arm test alongside it, which was the whole point of my CHANGES here. Nothing in this branch is lost by closing: the same edit is in main, plus the proof that it works.

If the branch has anything #2423 missed, say so and reopen the conversation — but from the file lists, #2424 was release-check.sh +17/−4 and #2423 carried that change and +21 cmake and +79 test, so I do not expect a remainder.

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.

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

Closing as superseded: this defect is already fixed on main, by #2423, and your own sentence is in that fix.

#2423 merged at 11:21Z and main now carries the requirement in os/mini/release-check.sh:

$ git show origin/main:os/mini/release-check.sh | grep -c 'not executable'
2

This branch predates that merge, which is why it reads dirty — the same rows are fixed two ways and main has taken one of them. Landing both
would leave the file with two guards for one property, and this version's is folded into payload_modes_verdict()'s signature (a fourth argument)
where the merged one is a separate payload_modes_noexec() with a ctest row and a fixture that runs three real payload trees.

The clause from this PR is in main, and it should be: the reviewer took it from here and I put it in the code rather than the PR body —

# `[ -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
the predicate.

I am closing rather than rebasing because a rebase of this branch would have to delete its own implementation to resolve the conflict — the
honest way to express "superseded" is to close it. Branch deleted in the same step; if you want anything from it back, the patch is one
git show from the reflog and the content above is quoted in full.

@bong-water-water-bong
bong-water-water-bong deleted the pi-i679/payload-exec branch November 14, 2026 18:05

@bong-water-water-bong bong-water-water-bong left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.sh and 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.

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

This PR is superseded by #2423, which is already on main — and the reason it is DIRTY is that both implement the same issue.

Evidence, from the repo rather than from the titles:

main  d6d57e11  release-check: payload-modes must REQUIRE the binaries it names, not only print them (#2423)
      +payload_modes_noexec() {   # engine#2422: the row prints the modes, and printing is not asserting…
      # `[ -x ]` is the right predicate and NOT a stricter "is it 0755" (engine#2424's phrasing, worth keeping)

#2423 names engine#2422 — the issue this PR implements — and explicitly keeps this PR's phrasing for the [ -x ]-not-0755 argument. git merge-tree --write-tree origin/main pr2424 reports exactly one conflict, and it is that shared function:

CONFLICT (content): Merge conflict in os/mini/release-check.sh

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. #2423 shipped the helper with zero self-test rows; the tool's own --self-test still has only the seven payload_modes_verdict cases, none for payload_modes_noexec. Your measured fixture is the thing main is missing, so I ported it rather than let it die with the PR:

engine#2446 — three rows against main's helper (0644 both ⇒ 1bit/1bit bin/lemond, 0755 both ⇒ no offender, absent ⇒ no offender), crediting this PR for the measurement, with the mutation check on record (--self-test rc=1 FAIL want 1bit/1bit bin/lemondwhen the predicate is broken,rc=0` restored).

Nothing else from this branch needs rescuing — the payload_modes_verdict fourth-parameter shape is superseded by the helper.

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

Do not rebase this — close it as superseded. Its change is already in main, and rebasing would move main backwards.

_pm_noexec   origin/main = 3   this PR's head = 3      ← the fix is already there
tests/release_check_payload_modes_test.sh   main = 79 lines   this PR = 0 lines

engine#2423 merged at 11:21Z with the same three _pm_noexec sites and a 79-line test that this PR does not have. So there are only two possible rebase outcomes, both wrong:

  • resolving toward this branch reverts main's post-#2423 edits to os/mini/release-check.sh (the file has moved 87 lines past this head);
  • resolving toward main produces an empty diff, i.e. a PR that changes nothing.

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 --delete-branch.

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

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 --self-test and false of the tree: tests/release_check_payload_modes_test.sh came with the same commit (d6d57e11), is registered as ctest release_check_payload_modes, and asserts the 0644-names-them / 0755-passes / absence-passes trio directly on the helper — plus grep -q 'payload_modes_noexec "\$PDIR"' to prove it is actually called on the payload. So main already had coverage, and the part of this PR worth keeping was already kept; engine#2446 adds a millisecond-level duplicate rather than closing a gap.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant