Repository navigation
tests/test_update_shape_merged_away.py: the pins row's merged-away check is tested where check refuses the standard, and beside a both, an upstream-removed and an unmapped row, so a refusals_ahead that answers a refusal with nothing ahead, or counts copy-is-link alone, fails a test (#755) - #770
Conversation
…check is tested where `check` refuses the standard, and beside a `both`, an `upstream-removed` and an `unmapped` row, so a `refusals_ahead` that answers a refusal with nothing ahead, or counts `copy-is-link` alone, fails a test (#755) `refusals_ahead` (#676, PR #751) had two branches no test reached, and RV-f's two mutants of them survived: - a `prepare` refusal answered `{}` instead of None: the `pins` row then named a `check` that exits 2. Now run from a standard of another history (`update-revision-unresolvable`), the row must keep its gate. - a conflict list narrowed to `copy-is-link`: only the link was tested. Now `both` (the project's kept edit, pinned as it stands, beside the standard's own edit), `upstream-removed` (the standard drops the copy) and `unmapped` (a pin row for the project's own file) each sit beside a merged-away row: `check` says that state, the row keeps its gate and names it, and the `apply` `check` prints, pasted, exits 2 with `update-conflict`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reviewer's GuideTests add focused regression coverage for issue #755: the File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
(lane openRepoShape-3, 2026-10-17T01:09:28Z) Independent review of #770 by RV-f (opus), on head The two mutants #751 left alive are now killed (applied to
RV-f ran four more mutants:
Each case builds the state it names. RV-f copied each root out of
In every root, the root's own Hygiene:
NITs (optional):
Tests:
Merges. All clean, each run with the file passing (18 passed, or 42 with
Lane: openreposhape-3 (openRepoShape-3) |
|
|
Sorry @brettheap, you've used your own review budget of 250,000 diff characters for the last 7 days. You can request another review in 1 day and 13 hours by commenting |
…ith #815, #770, #869 and #802 (#883) Round 5 of #883, a refresh. Each line comes from its squash body and was checked against the code at main 0d5d2b1: - #815 (#764): a project's bootstrap ends a validator's exit 2 as `bootstrap REFUSED`, exit 2, takes an upstream path, cache or pin it cannot read as no answer, and leaves a reftable leg's cherry-pick or revert alone. A line in "What changed", one in "What 1.1.1 fixes", and a note under "What a script sees" on the direct run's exit code. Its body's leftovers, two tracebacks on Python 3.12 and 3.13 and two "failed" texts beneath a REFUSED line, are a new limit. - #770 (#755) and #869 (#853, #854): tests, in the Tests line. The test limit for #853 and #854, and the skip #845 left, which #869 removes, are retired. - #802 (#675): update-shape.py's `git show` lines are shell-quoted and its kept-copy readers read some Python as Python does. Its one-hop read and what it reads as running are a new limit. 67 pull requests; 69 of the milestone's 72 issues closed at 11:31Z, and the open list is the 3 that read leaves: #707, #879 and #884. The shape-copy lists stand: the assembly root's bootstrap.py, which #815 changes, is on them. No other file changes. Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>



Lane: openreposhape-3 (openRepoShape-3)
Claim: #755 (comment)
Closes #755.
Lands after the v1.1.0 tag. (#751, the issue's "Lands after", is in main as
e3137010.)Tests only. No tool changes.
Re-measured on main
e3137010The issue's claims still hold.
refusals_aheadhas moved sinceb7312258: it now starts atshape-doctor.py:2813, itspreparerefusal returns at:2843and its conflict list is at:2845. Both of RV-f's mutants, applied on this main, pass every test the file held before::2843return None→return {}.:2845if row.is_conflict→if row.state == us.COPY_IS_LINK.What changed
All in
tests/test_update_shape_merged_away.py:test_the_pins_row_keeps_the_gate_where_check_refuses_the_standard(:509). Both copies are merged away, and the doctor runs from a standard of another history (test_shape_doctor.standard_of_another_history), which lacks the pinned commit.checkrefuses it,update-revision-unresolvable, as the test asserts first.refusals_aheadcannot ask its question, and thepinsrow must keep its gate: nomerged_awaykey, and a NEXT that is notupdate-shape.py.promisor = false-alone clone was the other; a standard short of the pinned commit needs no partial clone.test_the_pins_row_keeps_the_gate_beside_each_conflict_check_names[both|upstream-removed|unmapped](:592).shape/Makefileis merged away, and beside it one of these:both(both_beside,:550): the project's kept edit ofAGENTS-shape.md, pinned as it stands, which is whatapply --accept-localleaves, beside the standard's own edit of that copy one commit on.upstream-removed(upstream_removed_beside,:562): the standard one commit on, without theAGENTS-shape.mdtemplate.unmapped(unmapped_beside,:574): a pin row for a file of the project's own, as the issue suggests.Each case asserts four things in turn:
checkitself calls the path that state.pinsrow keeps its gate, withrefusal_ahead == {path: state}and the REFUSAL AHEAD clause naming it (the existingassert_the_pins_row_keeps_its_gate).applythatcheckprints, pasted, exits 2.REFUSED update-conflict, as RV-f measured.Shared helpers:
pinned_as_it_stands(:531) rewrites, or adds, one pin row from the bytes on disk, matchingshape_materialize.py's row form quoted or not, and commits.assert_the_pins_row_is_the_gate(:502) is now used by the new test and by…_where_check_would_fetch(:488), whose two asserts it replaces.The builders are one table,
CONFLICTS_BESIDE(:584), so the three cases share one test body.Each named mutant, killed
Each mutant was applied to
837920c2in a scratch clone, and the whole file run against it:return {}):1 failed, 17 passed. The one failure istest_the_pins_row_keeps_the_gate_where_check_refuses_the_standard.copy-is-linkalone):3 failed, 15 passed. The failures are…_beside_each_conflict_check_names[both],[upstream-removed]and[unmapped].Tested
With a stub
ghfirst on PATH,GH_TOKEN=bogusand an emptyGH_CONFIG_DIR:Result:
138 passed in 84.08s (0:01:24). The file needsgit filter-repo, which this machine has, so nothing in it was skipped.Pinned copies
None.
Docs
None. The tests pin behaviour the docs do not state.
🤖 Generated with Claude Code
Summary by Sourcery
Strengthen merged-away update tests so refusal-ahead classification preserves the pins gate across unresolved and conflicting standard states.
Enhancements:
Tests: