Skip to content

The package job's check that the wheel's stamp is the committed one, and step 10's count line and row count, can be removed with tests/test_tests_workflow.py still passing #275

Closed
opensoft/openRepoTools-spec
#12

Description

@brettheap

Found by lane openRepoTools-3's independent review of #228's pull request 2, now #267 (verdict LAND after fixes, no MUST; findings S4 and S5), and by lane openRepoTools-5's re-check of its fix round (#228, comment 6267650575; its three NITs are the last section). Lane 3 proposed all of them as v1.2.0 follow-ups: S4 and S5 on #228 (comment 6266284667), and all five in #267's body ("Proposed as v1.2.0 follow-ups").

Line numbers are at #267's head fa3bd83. The review's own, from its trial assembly, are the same except tests/test_tests_workflow.py:1017-1018, which are :1018-1019 at fa3bd83 (the fix commit added one line above them).

What happens

  1. S4: the stamp check, and three more wheel checks, have no test that fails without them.
    • Check 4 of the package job's wheel check ("the stamp is the committed file", specs/006-release-pypi/contracts/wheel.md) has one guard, if wheel.read(name) != blob(source): at tests.yml:362. WHEEL_CASES (tests/test_tests_workflow.py:215-220) holds four synthetic wheels that change only LICENSE, one payload byte and one payload mode. So no case reaches check 3 (the modules), check 4 (the stamp), check 6 (nothing else) or the duplicate-member check.
    • Measured by the review: mutants M12 (check 6 off), M13 (modules and the stamp never compared) and M14 (the duplicate-member check off) each ran 30 passed.
    • On a real wheel (hatchling 1.27.0, Python 3.9) built from a tree whose _release.py had one uncommitted line, step 6's script, verbatim, refused it: exit 1, one ::error::. With mutant M34 (if wheel.read(name) != blob(source): made if source != STAMP and wheel.read(name) != blob(source):) the same script passed it: exit 0, no error. The suite cannot see M34, because no synthetic case touches any src/ file, and M13 is its superset and survived.
    • For checks 3, 5 and 6 the job has a second guard: tests/test_package.py's test_wheel_* tests, run on the built wheel in step 11. They do not cover the stamp: test_wheel_modules_are_the_commits_own skips _release.py (tests/test_package.py:464) and leaves it to check 4.
    • The job is right today. On real wheels the script refused all seven damaged trees (cli.py edited; _release.py edited; LICENSE removed; an extra extra.py; an extra notes.txt; lanes-index at mode 644; lanes-index edited), each with one ::error:: naming the right member.
    • The failure scenario: an edit to the script drops the stamp compare. The suite stays green. From then on a package run passes a wheel whose stamp is not the committed one, which FR-026 and contracts/wheel.md check 4 say it must not.
  2. S5: two of step 10's static checks are labelled for more than they check (tests/test_tests_workflow.py:1018-1019).
    • "the count line, exactly" is has_all(*COUNT_LINE_PARTS) over the step's text. Mutant M21 removes "$count" from for line in "$skip" "$count" (tests.yml:467), so the count line is never looked for, and it survives: the count= assignment still holds the words.
    • "28 receipt rows" is \b28\b. Mutant M22 turns both -ne 28 into -ne 29 (tests.yml:481) and survives, because the error text still says "not 28".
    • The failure scenario: an edit that drops the count line's check, or changes the row count, passes the suite, and the job then passes an install that prints no count line.
    • The contract asks only for "steps 4 to 11 in order", so this is no contract breach. The rule the review held the suite to, "each fails against a mutant that removes what it pins", fails for exactly these two labels.

Where

  • tests.yml:362 and :467, :481; tests/test_tests_workflow.py:215-220 and :1018-1019; tests/test_package.py:464, all at fa3bd83.
  • The four synthetic wheels are fixed in specs/006-release-pypi/contracts/workflows.md:313 and :358 ("the same four synthetic wheels as the release build's") and in tasks.md:242 and :278.

How it was found

The fix the review proposed

Also from the re-check: three NITs, left for v1.2.0 (#228, comment 6267650575)

  • The pipx lock's header never mentions tomli, and no test pins the two locks' tomli entries equal. .github/release-pipx-requirements.txt:1-34 is the header, and its entry is at :80. The build lock's header (.github/release-build-requirements.txt:22-26) says the two entries must move together, since the package job installs the pipx lock's after the build lock's.
  • tests.yml:203-205 reads as if pytest is installed after step 7. The comment says step 7 installs the pipx lock's tomli "after this", then "Then pytest at the other jobs' pin keeps that tomli". The same step installs pytest (:227-228), before step 7.
  • specs/006-release-pypi/tasks.md:254 (T017) keeps the old bash 3.2 wording, "is the one place the payload runs under bash 3.2". AGENTS.md says, since the S3 fix (AGENTS.md:249), "It is the one 3.2 run anywhere, and runs no other command."

Why it is not in v1.1.0

  • The review's verdict on PR 2 was LAND after fixes, with no MUST. Its S1 to S3 were fixed before landing; S4, S5 and the NITs change tests, comments and documents, not what the job does, and changing them is a change after that review. S4 also changes a line of the contract.

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:01:34Z, for #275

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

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

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

    @brettheap
    ContributorAuthor

    Lane openRepoTools-2, 2026-10-21T02:5xZ: #275 is done, on a branch only. It is branch test/275-package-stamp-count-line-lane2, two commits on main a42946e, to be cherry-picked into openRepoTools-code after v1.1.0 is tagged:

    • 5b87b26, the code side: tests/test_tests_workflow.py, and one comment in tests.yml;
    • 8151c41, the spec side: specs/006-release-pypi/contracts/workflows.md.

    Keeping them separate lets the cutover's split take them apart.

    • The wheel check gains four cases: a module byte changed, a stamp line added, a member nothing lists, and a member written twice. Its refusal must now name the file in an ::error:: line, with no traceback.

    • Step 10 now runs whole, offline, against a stand-in for pipx's link, in eight cases: as printed, no skip line, no count line, the count line twice, 27 rows, 29 rows, and a stray line beside 28 rows and beside 27.

    • The proof: each removal the issue names now fails a new case:

      • the stamp comparison skipped fails [stamp-line];
      • the module comparison skipped fails [module-byte];
      • the extra-member check off fails [extra-member];
      • the duplicate-member check off fails [member-twice];
      • the count line never looked for fails [no-count-line] and [count-line-twice];
      • the row count moved to 29 fails [as-printed] and [29-rows].

      The old file passes against all of these removals together (30 passed). The new one fails 8.

    • Results: -k test_tests_workflow passes 42 (30 old and 12 new), and -k repo_hygiene passes 237.

    Lane: openRepoTools-2

  4. brettheap commented on Oct 21, 2026

    @brettheap
    ContributorAuthor

    Lane openRepoTools-2, 2026-10-21T14:1xZ: #275's three re-check NITs and RV-C's wording NITs are fixed on the branch, the new test has its mutant proof, and one NIT stays open.

    Branch test/275-package-stamp-count-line-lane2 is two commits longer. It still sits on a42946e and is not rebased: main was 33ce26d at 14:1xZ, and git merge-tree of the branch with it is clean. 5b87b26 and 8151c41 are as they were.

    • 2120c39, the code side: .github/release-pipx-requirements.txt (its header), .github/workflows/tests.yml (two comments) and tests/test_tests_workflow.py (one test and one docstring).
    • 363c975, the spec side: specs/006-release-pypi/tasks.md and specs/006-release-pypi/contracts/workflows.md.

    The issue's three re-check NITs (RV-C's SHOULD S2). All three still stood at 8151c41.

    1. The pipx lock's header named no tomli, and no test held the two locks' entries equal. The header now says the entry is the build lock's too, and why. The new test test_tests_yml_pipx_lock_carries_the_build_locks_own_tomli_entry holds the pipx lock's tomli entry, its requirement line (so version and marker) and every digest, equal to the build lock's. It reads two text files and needs no submodule.
    2. The tests.yml step 4 comment read as if pytest were installed after step 7. It now says what the steps do, in order. Step 4 installs tomli by hash and then pytest, which keeps that tomli. Step 7, after the two builds and the wheel check, installs the whole pipx lock by hash. The package's tests (step 11) run on the pipx lock's tomli.
    3. tasks.md T017 said the macOS install leg "is the one place the payload runs under bash 3.2". I read both workflows. The payload runs under 3.2 in one place only, release.yml's macOS-only step that runs openRepoTools --install under /bin/bash, and tests.yml has no macOS job. The bullet now says that leg "runs openRepoTools --install under /bin/bash 3.2. It is the one 3.2 run anywhere, and it runs no other command", as AGENTS.md does.

    RV-C's wording NITs in lines this branch wrote: N1, N2, N3, N4 and N6 are fixed.

    • N1: the step 6 comment in tests.yml now says "four more, one for each check those four never reach", not "one for each way the check refuses a wheel".
    • N2, N3 and N4: contracts/workflows.md now says "a receipt that is not 28 lines, each a row", "a member that is no member wheel.md lists", and "Each of these refusals is an ::error:: line, and never a traceback".
    • N6: the step 10 test's docstring now names the case of 27 rows and a line that is no row.

    Mutant proof for the new test. Each mutant was applied alone to a private clone of 363c975 and run with tests/run.sh, LANES_* and TMUX* unset, -k test_tests_yml_pipx_lock_carries_the_build_locks_own_tomli_entry. After each run the clone was put back with git apply -R and was clean.

    • Unmutated, on the clean clone: 1 passed, exit 0. The submodule was not initialized and the test ran, so it needs none.
    • MA, the pipx lock's tomli moved from 2.4.1 to 2.4.0: 1 failed, exit 1, at the first assertion: AssertionError: release-pipx-requirements.txt holds ["tomli==2.4.0 ; python_full_version < '3.11'"] and release-build-requirements.txt holds ["tomli==2.4.1 ; python_full_version < '3.11'"]: the two entries move together.
    • MB, the build lock's tomli moved the same way: 1 failed, exit 1, at the same assertion, with the two versions the other way round (the pipx lock holds 2.4.1, the build lock 2.4.0).
    • MC, one digest of the pipx lock's tomli entry changed, the last character of its first digest from 3 to 4: 1 failed, exit 1, past the first assertion and at the second: AssertionError: release-pipx-requirements.txt's tomli==2.4.1 ; python_full_version < '3.11' carries 47 digests, and release-build-requirements.txt's 47: the same ones, and only those.

    Tests. -k 'test_release_workflow or test_tests_workflow or test_package' on 363c975: 712 passed, 5 skipped, exit 0. The 5 skips are all in tests/test_package.py: OPENREPOTOOLS_TEST_WHEEL is unset. That is the 699 the same selection gives on #279's branch, plus the 12 cases of 5b87b26, plus the one new test.

    Still open. RV-C's N5 only. Step 10's run holds the two lines and the row count, and has no case for the exit-status refusal, the missing-receipt refusal, the link-unchanged refusal or the skip line printed twice. It stays open because it is not a wording fix: it asks for four more cases in step 10's run, which is beyond #275, and the contract claims only what the run holds, so nothing it says is false. Not done either, and not asked: the contract's "Held by" list and research R12 do not yet name the new lock test.

    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 #275 is READY, with no MUST and no SHOULD. It was an opus pass, on Brett Heap's word.

    • Head: e98c874. It holds the branch's own commits 5b87b26, 8151c41, 2120c39 and 363c975, plus a merge of main 33ce26d. That merge changes nothing but main's delta: git merge-tree of 363c975 and 33ce26d gives the head's own tree.
    • RV-C's findings:
      • S2's three parts are FIXED: the pipx lock's header and the new lock test, the step 4 comment, and T017.
      • N1, N2, N3, N4 and N6 are FIXED.
      • N5 is correctly left open, as lane 2's note says.
    • Mutants on the head:
      • V22 (rows counted as lines): 2 failed.
      • M21, V21 and M22: 2 failed each.
      • The lock test's marker changed (LC), and one of its digests dropped (LD): 1 failed each.
      • The stamp compare skipped (M34): 1 failed.
      • All together, the new test file gives 8 failed. Main's old file passes 30, as the issue says.
    • Flakiness: three runs, with no flake.
    • CI: run 39621126655 on e98c874 has all four jobs green.
    • One optional NIT: the contract's "Held by" list (workflows.md:355-386) and research R12 do not name the new invariant, that the two locks' tomli entries are equal. It can go in a later spec commit.

    Lane: openRepoTools-2

  7. brettheap commented on Oct 21, 2026

    @brettheap
    ContributorAuthor

    Lane openRepoTools-2, 2026-10-21T16:3xZ: the one NIT of RVF-C's final review of #275 is fixed on the spec side, in one new commit on top of e98c874.

    Branch test/275-package-stamp-count-line-lane2 is one commit longer, pushed as a fast-forward: 5446185. It changes two spec files and nothing else (8 insertions, 1 deletion); nothing under .github/ or tests/ differs from e98c874.

    What it fixes: the optional NIT of the final review (the verdict is comment 6320860768). Neither the contract's "Held by tests/test_tests_workflow.py" list nor research R12 named the invariant that test_tests_yml_pipx_lock_carries_the_build_locks_own_tomli_entry holds.

    • specs/006-release-pypi/contracts/workflows.md: one bullet in that list, after the one on the package job's tomli. It says the pipx lock's tomli entry is the build lock's, its requirement line (version and marker) and every digest, and that step 4 installs the build lock's entry and step 7 the whole pipx lock, so the package's tests run on the pipx lock's.
    • specs/006-release-pypi/research.md, R12's Decision: one sentence after the one on the first test: "Another holds that the pipx lock's tomli entry is the build lock's, its requirement line and every digest, so a resolution that moves one and not the other fails." It claims no more than the test compares: the two requirement lines and the sorted digest lists, not the order of the hash lines.

    Mutant proof. None: no test and no workflow changed, so there is nothing for a mutant to fail.

    Tests. -k repo_hygiene on this tree with both edits in place, just before the commit: 237 passed, none skipped, exit 0. Its scan of every tracked file for host paths covers both files.

    CI. Run 39634765472, dispatched on 5446185, in progress when this was posted: package and guard-launch-mode are green, tests and tests-no-submodule are running. The last full run on this branch, on e98c874, took about 70 minutes.

    Still open. RV-C's N5, as the earlier note says: step 10's run holds no case for the exit-status, missing-receipt, link-unchanged or doubled-skip-line refusals. Four more cases in that run are beyond #275, and the contract claims only what the run holds.

    Lane: openRepoTools-2

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

    @brettheap
    ContributorAuthor

    RELEASED — lane openRepoTools-2, session 202778d2-0e63-4478-9c95-fdde314b0524@Eagle, 2026-11-09T23:28:49Z, for #275 — W2 landed it as opensoft/openRepoTools-code#13 merge bd86447 and opensoft/openRepoTools-spec#12 merge 8af9988 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