Repository navigation
tests/test_release_workflow.py runs the ref step on a tag in a checkout that holds four commits and requires it to leave them whole, so a --depth on its fetch cannot pass the suite (closes opensoft/openRepoTools#287) - #10
Merged
Conversation
…ut that holds four commits and requires it to leave them whole, so a --depth on its fetch cannot pass the suite (#287) The ref step fetches git's copy of the release tag again, and its comment (release.yml:377-380) and the header (:25-28) say it does so without `--depth`: the checkout holds full history, and a depth would cut that history off at the run's commit. The test file pinned the checkout's `fetch-depth` as 0 and nothing else about it: no `--depth`, no `shallow`, no `git fetch`. The tag cases ran against a checkout with no history, so a `--depth=1` at release.yml:409 passed every test (lane openRepoTools-2's re-check of #284, NIT 5). `tagged_origin` takes a `history` argument, one commit by default so its callers are unchanged, and builds that many commits, each the child of the one before it, with the tags at the last. The new test makes an origin with four commits and `v1.1.0`, fetches every tag into the checkout, which is what `fetch-depth: 0` leaves (it asserts that premise: not shallow, four commits), and runs the ref step on `refs/tags/v1.1.0` under the forge fake. It requires the step to pass, the checkout to be not shallow afterwards and to hold all four commits, and the step's one `git fetch` to name none of --depth, --deepen, --shallow-since and --shallow-exclude. The effect alone cannot show a depth that reaches the root of the history, which git leaves whole, so the line is held too. With `--depth=1` added to that fetch, the 22 older ref-step tests still pass and the new test fails: "the step left the checkout shallow", 'true' == 'false'. With `--depth=100` the effect checks pass and the line check fails. Only tests/test_release_workflow.py changes, and release.yml is as it was. -k test_release_workflow: 500 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 #287. Lane: openRepoTools-2 Co-Authored-By: Claude Sonnet 5.5 <[email protected]> (cherry picked from commit 15f5e2b162fd62c0833eed165727b798e406e672)
…ts commits, and says in the ref-step test's docstring that a depth beyond the four commits taken from a variable passes both checks and is not held (#287)
Lane openRepoTools-2's review of #287's commit (RV-A) found two NITs, both about docstrings. This commit changes those two docstrings and nothing else. The file's syntax tree is the same with its docstrings blanked, so no test is added, removed or changed, and release.yml is as it was.
- `tagged_origin`'s docstring (`:715-722`) described its `history` commits in a parenthesis ("one with no parent, unless a case asks for more, each the child of the one before it") that read awkwardly. It now says in two plain sentences that the commits are in a line, the first with no parent and each later one the child of the one before it, and that `history` is 1 unless a case asks for more.
- The ref-step test's docstring now says that a depth beyond the four commits that the fetch line takes from a variable would pass both checks. The text check reads the line as written, so `git fetch $limit origin ...` shows it no `--depth`, and a depth that reaches past the root leaves the checkout whole (RV-A's variant: `limit="--depth=100"`). RV-A called it contrived, worth a sentence at most, so the docstring says so and no test is added for it. RV-A wrote "four or more", and the boundary is one higher: git leaves a checkout of four commits shallow at `--depth=4`, which the shallow check refuses, and whole from `--depth=5`.
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 15f5e2b.
Part of #287.
Lane: openRepoTools-2
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
(cherry picked from commit 132e478b2b2032a587bcd1eaca686350c9538600)
…est's docstring on a depth taken from a variable, so that the variable is read as qualifying the depth and not the four commits (#287)
The final review of #287 (Lane openRepoTools-2's opus pass on head 43891a2, comment 6321040376) found no MUST and no SHOULD and one optional NIT: the docstring sentence at `tests/test_release_workflow.py:1470-1472` read "A depth beyond the four commits that the line takes from a variable would pass both checks", and "that the line takes from a variable" can be read as describing the commits. This commit rewords that one sentence and nothing else. The file's syntax tree is the same with its docstrings blanked (80 test functions before and after, and the one docstring whose text differs is this test's), so no test is added, removed or changed, and release.yml is as it was.
- The sentence now reads "A depth that the fetch line takes from a variable, and that is beyond the four commits, would pass both checks": the clause on the variable stands next to the depth it qualifies, and the commits come after it. The rest of the sentence ("that is contrived, and no case holds it") is as it was. It is three lines before and after, so no later line of the file moves.
- The gap's meaning is as 132e478 stated it and the review confirmed it: the text check reads the fetch line as written, so a depth taken from a variable shows it no `--depth`. Git leaves a checkout of four commits shallow at `--depth=4`, which the shallow check refuses, and whole from `--depth=5`, which neither check refuses. No case is added for it, as before.
- `tests/run.sh -k ref_step` on this tree: 23 passed, 2987 deselected.
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 43891a2.
Part of #287.
Lane: openRepoTools-2
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
(cherry picked from commit e14c2f71d6825c95ed63f88ca4be250141c5e389)
Reviewer's GuideTestsExtend the tagged-repository fixture to create multi-commit history and use it to verify that the release ref step preserves all four commits without shallow-fetch options.
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 21:59
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#287 (comment)
release.yml's ref step fetches git's copy of the release tag without --depth, because the checkout
holds full history. No test held that: the tag cases ran against a checkout with no history, so a
--depth=1 on the fetch passed every test. The first pick runs the ref step on a tag in a checkout
that holds four commits and requires the step to leave the checkout whole and its one git fetch to
name no depth option. The second pick rewords tagged_origin's docstring and says in the ref-step
test's docstring that a depth taken from a variable, and beyond the four commits, would pass both
checks and is not held; the third rewords that sentence. Neither changes a test. 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 15f5e2b162fd62c0833eed165727b798e406e672)
(cherry picked from commit 132e478b2b2032a587bcd1eaca686350c9538600)
(cherry picked from commit e14c2f71d6825c95ed63f88ca4be250141c5e389)
Closes opensoft/openRepoTools#287.
Lane: openRepoTools-2
Co-Authored-By: Claude Sonnet 5.5 [email protected]
🤖 Generated with Claude Code
Summary by Sourcery
Strengthen release workflow tests to require full-history tag fetches and prevent regressions to shallow checkout behavior.
Bug Fixes:
Enhancements:
Tests: