Repository navigation
tests/test_release_workflow.py runs the stamp writer and the steps after it through the wheel check, so a step that rewrites the stamp is refused by the wheel check and not only counted by the step-order pin (closes opensoft/openRepoTools#288) - #11
Merged
Merged
Conversation
…hrough the wheel check in order, so a step inserted after the writer that rewrites the stamp is refused by the wheel check and not only counted by the step-order pin (#288) Lane openRepoTools-2's mutant N5, an unnamed step after the stamp writer that rewrote both TAGs (release.yml:762), was caught by `STEP_ORDER` alone: test_release_upload_each_job_runs_exactly_its_steps_in_order[build] failed on the build job's step count. No test ran the stamp step followed by another step, because each stamp case ran it alone. In production the wheel check refuses such a stamp. `run_from_the_stamp_writer_to_the_wheel_check` runs the build's steps from the stamp writer through the wheel check, as the workflow has them and in its order, each as GitHub runs it. The two extractions are copies of the committed stamp, `python3` is this interpreter, and the build's backend is faked by `CHAIN_BUILD`, which packages each extraction's own `src/openrepotools/_release.py` into a copy of the release's wheel. So the stamp that any step leaves in a tree is the stamp the wheel check reads. A step in that span that is not a `run:` step fails the case, since the suite cannot run it. Two tests use it. The first runs the steps as the workflow has them: each exits 0, and the wheel check passes the stamp and runs to its last line. The second has five cases, one for each of the writer's five values. A step the test inserts right after the writer rewrites that value in both extractions, so the build's `cmp` passes the two wheels, and the wheel check refuses, with an `::error::` line naming the value. N5 rewrote TAG, and the writer sets five. With N5 applied to release.yml, as lane 2 gave it and with the step unnamed, the first test fails on its own: the wheel check exits 1 with "the stamp says 'TAG = "v9.9.9"' where the release's says 'TAG = "v1.1.0"'". The five rewrite cases hold the check and pass. A step that changes nothing is still caught only by `STEP_ORDER`'s count, and that pin's comment now says the rewriting case is also run. Only tests/test_release_workflow.py changes, and release.yml is as it was. -k test_release_workflow: 505 passed. A branch for the code leg, not a pull request: it is cherry-picked into openRepoTools-code after v1.1.0 is tagged. Part of #288. Lane: openRepoTools-2 Co-Authored-By: Claude Sonnet 5.5 <[email protected]> (cherry picked from commit d7fa5c85bbf2d837c2653ad192f1beb3dc3307ee)
…ract HEAD's own stamp as the build's git archive does, keeps the inserted step's command line to 99 columns, and corrects two comments, on the heredocs run under -I and on the build steps the list covers (#288)
Lane openRepoTools-3's comment on #288 asked for two comment fixes in the same change, and lane openRepoTools-2's review of the commit (RV-A) found them not made (SHOULD), and two NITs in the new code. This commit makes all four. Only tests/test_release_workflow.py changes: release.yml is as it was, and no test is added, removed or loosened.
- The BUILD_STEPS comment said contracts/workflows.md's build steps 2 to 13, and the list ends at step 14, the record (`:198-201` at a42946e). It now says 2 to 14.
- The header's sentence on the heredocs run under `-I` (`:95-101` at a42946e) left out the 3.9 leg's compile step, which the file runs under `-I` through `AS_ANOTHER_PYTHON` (`:3931` at a42946e). It now names that step, and says that the first two are the ones that read the release's values.
- The chain's two extractions (`:2549`, NIT) were copies of the WORK TREE's `src/openrepotools/_release.py`, where the build's `git archive` extracts the commit. So a work tree with an uncommitted change to that file failed the as-written test on its own, because the wheel check compares the stamp with HEAD's blob. Each copy is now `head_blob("src/openrepotools/_release.py")`.
- `REWRITES_THE_STAMP`'s first line was 123 characters long, where the file keeps to 99 (`:2497`, NIT). It is now two lines, joined by a backslash that bash reads as a line continuation. The step it runs is the same.
A branch for the code leg, not a pull request: it is cherry-picked into openRepoTools-code after v1.1.0 is tagged, on top of d7fa5c8.
Part of #288.
Lane: openRepoTools-2
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
(cherry picked from commit 655f7e7b08ffe9efa0e8fb6d8f38462810006881)
Reviewer's GuideTestsRun the build workflow from stamp writing through wheel validation, and verify that rewriting any of the five stamped values causes the wheel check to refuse the packaged stamp.
Update the workflow test documentation and step-order comment to describe the expanded stamp-to-wheel coverage and the build-step range it covers.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
The in-place merge of runbook v9: the stack grows by this clean merge, with no force-push. Lane: openRepoTools-2 Co-Authored-By: Claude Opus 5.5 <[email protected]>
The in-place merge of runbook v9: the stack grows by this clean merge, with no force-push. Lane: openRepoTools-2 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
brettheap
dismissed
sourcery-ai[bot]’s stale review
November 9, 2026 22:01
The base branch was changed.
This was referenced Nov 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Lane: openRepoTools-2
Claim: opensoft/openRepoTools#288 (comment)
No test ran the stamp step followed by another step, so a step inserted after the stamp writer that
rewrote the stamp was caught only by the step-order pin's count, although the wheel check refuses
such a stamp in production. The first pick runs the build's steps from the stamp writer through the
wheel check, in order and each as GitHub runs it, and requires the wheel check to refuse a step that
rewrites any of the writer's five values. The second has the chain extract HEAD's own stamp as the
build's git archive does, keeps the inserted step's command line to 99 columns, and corrects two
comments. Only tests/test_release_workflow.py changes, and release.yml is as it was.
The picks, from lane openRepoTools-2's branches in opensoft/openRepoTools, each made with
git cherry-pick -xand followed by its source commit:(cherry picked from commit d7fa5c85bbf2d837c2653ad192f1beb3dc3307ee)
(cherry picked from commit 655f7e7b08ffe9efa0e8fb6d8f38462810006881)
Closes opensoft/openRepoTools#288.
Lane: openRepoTools-2
Co-Authored-By: Claude Sonnet 5.5 [email protected]
🤖 Generated with Claude Code
Summary by Sourcery
Run the release stamp and wheel-validation steps together to ensure post-stamp changes are rejected as they are in production.
Enhancements:
Tests: