Skip to content

release.yml's wheel checks disagree on a member's mode, its corrupt-member and index checks end in tracebacks, and its macOS rerun places none of the 16 commands under bash 3.2 #278

Closed
opensoft/openRepoTools-spec
#11

Description

@brettheap

Found by lane openRepoTools-2's independent review of #228's pull request 3, now #268 (its verdict is #228's comment 6273189381, NIT table; the reading-and-probes reviewer's NITs 2, 3 and 7, and its index probe). The review's verdict is that no finding shows release.yml doing a wrong thing today, and these four are NITs about how its checks behave at the edges: (b) and (c) exit 1 and fail closed, (a) affects no real build, and in (d) the lines and rows still hold.

Line numbers are .github/workflows/release.yml at 29cc1b3, as the review gives them, unless a file is named. At #268's head 9682f0b, release.yml differs from 29cc1b3 in one comment block (at :1379), so (a) to (c) are at the same lines there and (d) is at :1475-1478.

What happens

  • (a) The two wheel checks disagree on modes.
    • release.yml reads only S_IMODE of a member's mode (:896), so a member typed as a symlink passes.
    • tests.yml's mode & 0o777 (tests.yml:370) passes setuid 4755 and sticky 1755, which release.yml refuses. (Its next clause does refuse a member that is neither a regular file nor untyped.)
    • Measured by the review's probe of both checks on those modes (lane 2's wheel-modes-both.log). No real build is affected.
  • (b) The CRC traceback (:885-886). A corrupt member makes wheel.read raise an uncaught BadZipFile. The step still exits 1.
    • The review's wheel probe ran the check on lane 3's 20 defective wheels: each was named with exit 1, except the symlink wheel of (a) and the CRC wheel of this item.
  • (c) The index checks' tracebacks: :1162-1188 and :1199-1228 in the testpypi job, and the same two scripts in the pypi job at :1663-1689 and :1698-1727.
    • The empty-index check stops with an uncaught traceback on HTTP 500 or 403, a network error, or a 200 that is not JSON.
    • The served check does so on a 403, or on a non-JSON 200, at read 1, where it retries 404s, 503s, timeouts and network errors.
    • Each exits 1, and fails closed. The neighbouring refusals print an ::error:: line (:1181, :1185, :1225); these print none.
    • Measured by the review's index probe, on both jobs. The scripts are right on every case the probe set: a 404, and the verified wheel at its digest, pass; that wheel yanked, another digest and an extra sdist are refused; the served check passes after lag, timeouts and 503s up to read 20, and refuses after 20.
  • (d) Placement under 3.2 (:1474-1477). The macOS rerun of --install under Apple's /bin/bash 3.2 reuses step 8's bin directory (OPENREPOTOOLS_BIN_DIR="$PIPX_BIN_DIR" in both). So all 16 commands take "already installed (unchanged)", and none of them is placed under Apple's bash. The lines and rows the step checks still hold.
    • Measured by the review's probe: steps 8 and 9 with one bin directory, two homes and the test layout's fake pipx environment. With step 9 under bash 3.2.57, both runs print the exact skip line and 16 of 17 placed in <bin>, and 1 left to pipx, with 28 lines and 28 rows in each receipt; with a non-3.2 bash in place of /bin, step 9 refuses. That was a Linux build of 3.2.57: Apple's own /bin/bash was not run.

Where

  • (a) release.yml:896, tests.yml:370 (the same at 29cc1b3 and at 9682f0b).
  • (b) release.yml:885-886.
  • (c) release.yml:1162-1188, :1199-1228, :1663-1689, :1698-1727. The pypi copies are byte-for-byte the testpypi scripts.
  • (d) release.yml:1474-1477.

How it was found

The fix

  • The review proposed none for these four; each row names the defect and what was measured.
  • What a fix has to settle (nothing here is decided):
    • (a) which rule both checks hold a member's mode to, since each now holds one the other lacks;
    • (b) and (c) whether these stop with an ::error:: line, as the other refusals do, and for (c) which replies are retried and which are refused;
    • (d) whether the rerun needs a bin directory of its own, so that the 16 commands are placed under bash 3.2.

Why it is not in v1.1.0

  • Each needs a behaviour change in release.yml after its review (for (a), in release.yml, tests.yml or both), and none makes a real release wrong today: (a) affects no real build, (b) and (c) exit 1 and fail closed, and in (d) the lines and rows still hold.

Filed in milestone v1.2.0 on Brett Heap's word (2026-10-19T18:3xZ, "yes, file the v1.2.0 issues"). It is unclaimed.

Lane: openRepoTools-3

🤖 Generated with Claude Code

Activity

  1. added this to the v1.2.0 milestone on Oct 19, 2026
  2. brettheap commented on Oct 20, 2026

    @brettheap
    ContributorAuthor

    CLAIMED — lane openRepoTools-2, session 202778d2-0e63-4478-9c95-fdde314b0524@Eagle, 2026-10-20T23:02:06Z, for #278

    Logged in lanes/log/openRepoTools-2.md at 2b05ac26f325a1cf4610c020880a5fbdb376782d.

    The three reads (lane-collision-protocol Rule 1):

    1. existing `CLAIMED —` comments on opensoft/openRepoTools#278:
       none
    2. `gh pr list --repo opensoft/openRepoTools --state all --search "#278"`, kept where the row or its body names `#278`:
       none
    3. `git ls-remote --heads [email protected]:opensoft/openRepoTools` branches naming `278` as a whole token:
       none
    
  3. brettheap commented on Oct 21, 2026

    @brettheap
    ContributorAuthor

    Lane openRepoTools-2, 2026-10-21T02:4xZ: #278 is done, on a branch only. It is branch fix/278-wheel-checks-agree-lane2 at 64cd308, one commit on main a42946e, to be cherry-picked into openRepoTools-code after v1.1.0 is tagged. Each item has a test that fails against main's workflows and passes on the branch.

    • (a) The two wheel checks now agree on a member's mode. Both require the commit's whole mode, 100755 or 100644: a regular file, with no setuid, setgid or sticky bit.
      • Changes: release.yml's mode table and check, plus one code line in tests.yml's package check.
      • Why this reading: git records exactly this, and both the TestPyPI 1.1.0rc1 wheel and a pip build of a42946e carry it.
      • The proof: on main, a symlink, a directory or a member with no file type passes release.yml's check, and setuid, setgid or sticky passes tests.yml's. Both checks refuse all six on the branch.
    • (b) A member the wheel check cannot read is named. The check reads every member first. A bad CRC, a broken deflate stream or an unknown compression method each ends in an ::error:: line and exit 1. On main, each ends in a traceback.
    • (c) The index checks refuse by name.
      • The empty-index check refuses each of these by name: any status but 404, no answer, an answer cut short, and an answer that is not the index's JSON.
      • The served check still retries a 404, a 5xx and no answer, and now also a connection broken mid-answer. Anything else refuses by name.
      • Both upload jobs' copies are identical. On main, 20 of these cases end in tracebacks; on the branch, all 54 index cases pass.
    • (d) The macOS rerun places the commands.
      • It gets a bin directory of its own, holding only a link with pipx's link's value. So --install places all 16 commands there under /bin/bash, and the step requires 16 installed at lines.
      • Under a real bash 3.2.57, main's rerun prints 16 "already installed" and the branch's prints 16 "installed at". Docker's bash:3.2 agrees.
    • Results: -k 'test_release_workflow or test_tests_workflow or repo_hygiene' passes 790. actionlint 1.7.12, with shellcheck, is clean on both workflows.
    • Left alone, on purpose:
      • tests/test_package.py:449 keeps the older mode reading. It refuses a subset of what the workflows refuse, so there is no gap.
      • tests.yml's own wheel check still tracebacks on a corrupt member. The issue names release.yml for (b), and rehearsal D rewrites tests.yml, so its diff here is one line.
      • specs/006-release-pypi/contracts/wheel.md:108-110 states the looser rule. That belongs to openRepoTools-spec.
      • Apple's own /bin/bash was not run, because no macOS host is here.

    Lane: openRepoTools-2

  4. brettheap commented on Oct 21, 2026

    @brettheap
    ContributorAuthor

    Lane openRepoTools-2, 2026-10-21T14:0xZ: #278's review fixes are on the branch, three new commits, still on the branch only. fix/278-wheel-checks-agree-lane2 is now at 3e886c9, on main a42946e, above 64cd308 and dddb879. It is still to be cherry-picked into openRepoTools-code (the code commit) and openRepoTools-spec (the two spec commits) after v1.1.0 is tagged. The review of 64cd308 and dddb879 found two SHOULDs and eight NITs. These commits fix both SHOULDs and NITs 1, 2, 3, 7 and 8, and the spec follows the code.

    • ea93108 (code).
      • SHOULD 1, a member stored as LZMA with corrupt data: step 13's read loop also catches lzma.LZMAError, so the member is named in an ::error:: line and the step exits 1, with no traceback. New case a-payload-file-stored-as-lzma-with-corrupt-data; the unreadable-wheel cases are now four.
      • SHOULD 2, the macOS rerun runs the already-installed arm too: after its placing --install into its own bin directory, it runs --install a second time into that directory and requires exactly 16 already installed at ... (unchanged) lines. On the macOS leg, both arms of the installer now run under /bin/bash 3.2. The rerun's runtime test now runs two ways: all 16 found unchanged passes, and with one command the second run would update, the step counts 15 and exits 1.
      • NIT 1: tests.yml's mode message prints the wheel's mode as {mode:06o} and names the commit's as a regular file at its permissions and no other bit. NIT 2: the served check's comment lists what it really reads again: a 404, a 5xx, any OSError and any http.client.HTTPException. NIT 3: both upload jobs' copies say "a status this check does not read again". NIT 7: the link message says "changed the copy of pipx's link". NIT 8: the tests/test_package.py docstring says it reads permission bits only, a subset of the whole-mode rule the two workflows hold in full.
    • 0480504 (spec). spec.md (scenario 10 of user story 5, FR-032, SC-008) and contracts/workflows.md (install step 6, step 13's read errors, the held-by list) now name the second --install and the corrupt LZMA stream.
    • 3e886c9 (spec). contracts/workflows.md's served-check sentence listed a 404, a 5xx and "a read with no answer, one that times out or whose connection breaks, even mid-answer". It now says what the code reads again, NIT 2's set: any OSError and any http.client.HTTPException. The held-by list's line names the four cases the offline test runs, so it stays.
    • Mutant proofs, each in a private clone. The unmutated clone passes 8 of 8 for the same selection.
      • M1, lzma.LZMAError dropped from the tuple: 1 failed, 7 passed. The new LZMA case fails at assert "Traceback (most recent call last)" not in out, with _lzma.LZMAError: Corrupt input data on stderr.
      • M2a, the second --install with its status check and count check removed: 3 failed. Both rerun cases fail at "the rerun no longer puts /bin first for its version probe and for each of its two --install runs" (assert 2 == 3), and the one-script test fails.
      • M2b, only the count check removed: 2 failed. The case where one command would update fails (assert 0 == 1: the step exits 0), and the one-script test fails.
      • M2e, the check wants 15, not 16: 3 failed. The step refuses a true 16 (assert 1 == 0) and accepts 15 (assert 0 == 1), and the one-script test fails.
    • Results: one run at 3e886c9, -k 'test_release_workflow or test_package or test_tests_workflow or repo_hygiene': 962 passed, 5 skipped, none failed. The five skips are the tests/test_package.py tests that check a built wheel and need OPENREPOTOOLS_TEST_WHEEL, which CI's package job sets. By module: test_release_workflow 525, test_repo_hygiene 237, test_package_stamp 140 (-k test_package selects it too), test_package 30, test_tests_workflow 30. The first note's selection, test_release_workflow or test_tests_workflow or repo_hygiene, is 525 + 30 + 237 = 792: its 790 and the two new cases. actionlint 1.7.12, with shellcheck, exits 0 on release.yml and tests.yml at 3e886c9.
    • Left open, on purpose:
      • NIT 4: both index checks still end in a RecursionError traceback on a JSON answer nested past the recursion limit, because that error is outside their except tuple. It is an input far beyond anything an index sends, so it is left for a later change.
      • NIT 5: a member name flagged UTF-8 that is not UTF-8 ends in UnicodeDecodeError. It is pre-existing.
      • NIT 6: step 13 skips names ending in "/", so an extra directory entry passes it while tests.yml refuses it. It is pre-existing.

    Lane: openRepoTools-2

  5. added a commit that references this issue on Oct 21, 2026
  6. brettheap commented on Oct 21, 2026

    @brettheap
    ContributorAuthor

    Lane openRepoTools-2, 2026-10-21T16:2xZ: the final review of #278 is READY, with no MUST and no SHOULD. It was an opus pass, on Brett Heap's word.

    • Head: 273e32c. It holds the branch's own commits 64cd308, dddb879, ea93108, 0480504 and 3e886c9, plus a merge of main 50d05d4. That merge changes nothing but main's delta: git merge-tree gives the head's own tree.
    • SHOULD 1 is FIXED. The read loop now names lzma.LZMAError.
      • On the real rc1 wheel, a corrupt LZMA member gives the named ::error:: line and exit 1, with no traceback.
      • Dropping lzma.LZMAError from the tuple makes the new case fail.
    • SHOULD 2 is FIXED. The macOS rerun's second --install must report all 16 commands as already installed and unchanged.
      • A Docker bash:3.2 run of the staged step exits 0, with 16 such lines and nothing reinstalled.
      • In the rc1 release run (39417405752), Apple's own bash 3.2.57 printed the same 16 lines.
      • Three mutants of the count each fail.
    • NITs 1, 2, 3, 7 and 8 are FIXED. The 21-mode matrix shows the two checks agreeing on all 21.
    • NITs 4, 5 and 6 are left open, as lane 2's note (6318028197) says truthfully. 5 and 6 are pre-existing on main.
    • The spec: dddb879's delta, never finished in the first review, holds. Its hatchling 1.27.0 and pip 26.2.1 citations are exact. 0480504 and 3e886c9 match the code.
    • The combined tree: all seven of lane 2's branches together on main 33ce26d give 988 passed, 5 skipped and 0 failed.
    • CI: run 39619652856 on 273e32c has all four jobs green.
    • Three new NITs, which lane 2 fixes in a small follow-up commit:
      • A: a test comment (tests/test_release_workflow.py:2216-2218) says LZMAError is the only one of the four read errors that is neither an OSError nor a ValueError. None of the four is either.
      • B: the second run's (unchanged) requirement is held only by the text-matching test. A mutant that drops it, together with its pinned copy, passes. No case makes the second run report a restored mode.
      • C: a comment carried over from main (:3481-3484) says the served check refuses any other file at once, but the table beside it reads again 20 times.

    Lane: openRepoTools-2

  7. brettheap commented on Oct 21, 2026

    @brettheap
    ContributorAuthor

    Lane openRepoTools-2, 2026-10-21T16:3xZ: the three NITs of the final review of #278 (6320879246) are FIXED in one code-side commit, cc20d58, pushed to fix/278-wheel-checks-agree-lane2 as a fast-forward from 273e32c.

    • The commit changes tests/test_release_workflow.py only: 59 insertions and 30 deletions, and no workflow, script or spec.
    • NIT A (the LZMAError comment above UNREADABLE_MEMBERS): it called LZMAError "the one error here that is neither an OSError nor a ValueError", and none of the four read errors is either. It now says what set LZMAError apart: the read loop's except tuple did not name it, as it names BadZipFile, zlib.error and RuntimeError (NotImplementedError's base), and it derives from Exception alone.
    • NIT B (the second --install's (unchanged), held by text matching alone): RERUN_SECOND_RUN has a third case, one-command-whose-mode-the-second-run-would-restore.
      • A find stand-in ahead of the system's, in the test's /bin, prints nothing for */bin-bin-bash/lane, which mode_is (find -perm 755) reads as a mode that is not 755. The second run then prints lane: already installed at <bin>/lane (mode restored to 755), 15 lines are (unchanged), and the step must exit 1 with its found 15 commands already installed and unchanged ... not all 16 line.
      • CO1 proof, in a private clone of the branch with the change, on the five tests of -k 'test_release_install_check_the_macos or test_release_install_check_the_offline_installs_are_one_script': unmutated, 5 passed. With RVF-B's CO1 applied (grep -cF ' (unchanged)' becomes grep -c . in release.yml and in its pin), 1 failed and 4 passed. The one failure is the new case, at assert again.returncode == (0 if passes else 1): assert 0 == 1, because the step exited 0 on a second run that printed lane: already installed at <bin>/lane (mode restored to 755). Before this commit CO1 passed all four tests that existed (RVF-B's own run).
    • NIT C (the comment above SERVED_CASES): it now says what the table holds. The wheel yanked, a client error and an answer that is not the index's JSON are refused at the first read, and an index that never serves exactly the wheel (another file beside it every time, its digest another every time, or the wheel only at the 21st read) after the 20.
    • Tests: -k test_release_workflow on the tree at cc20d58, through tests/run.sh with every LANES_* and TMUX* variable unset: 526 passed, 2510 deselected, 0 failed.
    • CI: tests.yml is dispatched on the branch at cc20d58, run 39635903160. Its result is not in yet.
    • Still open:
      • The spec side. contracts/workflows.md's held-by bullet for the rerun's second --install says only "with one of them reported different, it updates that one, counts 15, and the rerun exits 1 naming that count". It does not name the new case, where one command's restored mode also leaves the count at 15. One sentence is owed at the split, for openRepoTools-spec. It is not in this commit, because lane 2's brief made this one code-side commit and the split keeps code and spec apart.
      • release.yml's own comment above step 13's read loop (the lzma.LZMAError sentence) still says it "is neither an OSError nor a ValueError, so the read loop names it". That is true of LZMAError, and of the other three read errors too. RVF-B's NIT A names the test's comment, so release.yml is untouched here.
      • NITs 4, 5 and 6 of the earlier review stay open, as 6318028197 says; 5 and 6 are pre-existing on main.

    Lane: openRepoTools-2

  8. brettheap commented on Oct 21, 2026

    @brettheap
    ContributorAuthor

    Lane openRepoTools-2, 2026-10-21T16:5xZ: the spec side of NIT B (6320879246) is pushed as 3ee5022, one spec-only commit, a fast-forward from cc20d58 on fix/278-wheel-checks-agree-lane2. It adds the one sentence that 6321162936 listed as owed, to the held-by bullet for the macOS rerun in specs/006-release-pypi/contracts/workflows.md: with the mode of one command reported as not 755, the second --install says (mode restored to 755) of it, which is already installed but not (unchanged), so the count is 15 and the rerun exits 1, as cc20d58's third RERUN_SECOND_RUN case holds. FR-032 in spec.md lists no held cases, so it is unchanged.

    Tests, CI, open: -k 'test_release_workflow or repo_hygiene' at 3ee5022, through tests/run.sh with every LANES_* and TMUX* variable unset: 763 passed, 2273 deselected, 0 failed. No test or code changed, so no mutant proof is owed. tests.yml is dispatched on the branch at 3ee5022, run 39638651991, and its result is not in yet. Still open: release.yml's own comment above step 13's read loop (the lzma.LZMAError sentence), untouched because RVF-B's NIT A names the test's comment only, and NITs 4, 5 and 6 of the earlier review (6318028197). The branch stays a branch until v1.1.0 is tagged.

    Lane: openRepoTools-2

  9. modified the milestones: v1.2.0, v1.2.1 on Nov 8, 2026
  10. brettheap commented on Nov 9, 2026

    @brettheap
    ContributorAuthor

    RELEASED — lane openRepoTools-2, session 202778d2-0e63-4478-9c95-fdde314b0524@Eagle, 2026-11-09T23:28:35Z, for #278 — W2 landed it as opensoft/openRepoTools-code#12 merge 1c48ae0 and opensoft/openRepoTools-spec#11 merge 6dfe0fa and the issue is closed

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions