Skip to content

tests/test_adopt_plan_value_order.py: a bad id: or org: beside a --work-dir that is a file or a shared one, or beside a gone source, is the value's refusal in both check and execute, so the head ask is pinned against _work_root's other refusals and the source (#1179) - #1226

Merged
brettheap merged 9 commits into
mainfrom
fix/1179-value-order-mutant-rows
Nov 10, 2026

Conversation

@brettheap

@brettheap brettheap commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Test only: six rows in tests/test_adopt_plan_value_order.py that kill four surviving mutants (L1, L2, L4 and L11) of #1125's head ask. No change to adopt-project.py (its sha256 is 412edbda on #1125's head and on this one).

This PR lands after #1125 and stays a draft until then. Its base is fix/1020-bad-id-first-problem (#1125's head 9549006fe), not main, so the diff is this one commit. #1125 is a draft against main and has not landed. Once #1125 has landed, this branch is brought up to date with main and gated again on that head before it lands.

Closes #1179

What the rows pin

RV1125b's NIT-A on #1125 (for #1020): check and execute ask plan.names() and _checked_org_and_id(plan) right after the plan's keys and before _work_root. One row pinned that position against the work directory, and it used a directory made unwritable with chmod. _work_root refuses two more things before it makes anything, and both commands refuse a gone source, and no row put a bad id: or org: beside any of them.

Three tests, each run for id and for org, so six rows. Each is check and then execute --yes on one plan, in the shape of test_the_org_or_the_id_is_named_before_an_unwritable_work_dir:

Test The control: the plan unedited, beside the same file, directory or path With a bad id: or org: added
test_the_org_or_the_id_is_named_before_a_work_dir_that_is_a_file a --work-dir that is a file: both commands exit 2 on REFUSED adopt-work-dir-unwritable both exit 2 on the value's refusal, the same first line in each, and none of the three work-directory or source codes on either stderr
test_the_org_or_the_id_is_named_before_a_shared_work_dir (WINDOWS_SKIP) a --work-dir every user can write in, no sticky bit: adopt-work-dir-shared the same
test_the_org_or_the_id_is_named_before_a_source_that_is_gone a source.local_path that names nothing: plan-source-gone the same

The shared row is in because RV1125b's NIT-A names "a --work-dir that is a file or a shared one", and #1179 asked for it unless the lane ruled otherwise.

Mutants

Each mutant was made from #1179's text in the writer's own clone, run against the 85 old rows (the two order files of #1125, tests/test_adopt_plan_value_order.py and tests/test_adopt_check_plan_name.py) and against the six new ones, and adopt-project.py was restored after each with its sha256 checked (412edbda, the same after each one).

Mutant The 85 old rows The six new rows
L1: check asks plan.names() and _checked_org_and_id after _work_root 85 passed (survives) 4 failed: the file and shared rows, for id and for org
L2: check asks them after the source is opened 85 passed (survives) 6 failed: all of them
L4: execute asks them after _work_root 85 passed (survives) 4 failed: the file and shared rows
L11: check asks plan.names() at its head and _checked_org_and_id after _work_root 85 passed (survives) 4 failed: the file and shared rows

The plan-source-gone rows fail only on L2, as #1179's table says. On the head the six pass alone (6 passed, 40 deselected in 8.49s), the two order files together give 91 passed, and tests/test_adopt_plan_value_order.py alone is 46 rows, the 40 it had and the six.

Gates

One pytest run over 39 files each time: every file that greps for the codes and functions #1125 touches, the files this test file imports from, tests/test_repo_hygiene.py, tests/test_cli_reference.py and tests/test_agents_md_codes.py. The environment is the landing gate's own: a stub gh first on PATH, GH_TOKEN=bogus, an empty GH_CONFIG_DIR and an empty gitconfig, GIT_CONFIG_NOSYSTEM=1 and EMAIL set, and a wait for at least 17G free before each run.

Tree Result
The head, f61be9f59 3130 passed, 1 skipped in 41:00, exit 0
The scratch merge 1c1e6653c of 961640c68 (origin/main when it was gated) and the head, not pushed 3180 passed, 4 skipped in 40:15, exit 0
  • The one skip on the head is tests/test_adopt_plan.py:567, which needs SHAPE_MEDXEHR_CLONE, a read-only clone of MedxSoft/MedxEHR.
  • The 3 extra skips on the merge are main's new reftable rows in tests/test_adopt_root_symlinks.py, at lines 1926, 1981 and 2532. They need git 2.45 or later, and the bench has git 2.43.0.
  • The 50 extra passes are main's new rows.

origin/main has moved since: it is now 50ce8ab15, and #1119 (b7edd8816) changed adopt-project.py in check. Since 961640c68 main has changed adopt-project.py and tests/test_adopt_pins.py, two of the five files #1125 changes, and it has not changed this PR's file. The 39-file gate was not run again on it. The two order files, the 91 rows, were run on a scratch merge of 50ce8ab15 and the head (b0e2e0461, not pushed): 91 passed in 172.19s, exit 0.

Merge-trees (all clean, exit 0)

Against Tree
origin/main (50ce8ab15) and this head bede214aa0d551c1c0c2ce81ff4ce1452983d45c
#1125's head 9549006fe and this head 8c604453d4766e3eed40e34874f4a6acaaf0039d
#1198's head d38e4e36d and this head a1504e06d18f07f1f3c02d081ee6067159459180
origin/main and #1125's head (context) ad61940f1a55897592a519dee59b5f31f53c7a9a
#1198's head and #1125's head (context) 88530bb7b3d29bfb11c5bb8e1f28e0ab194261ae

Of the 45 open PRs, only #1125 and #1198 touch tests/test_adopt_plan_value_order.py.

See #1020, #1113 and #1125.

🤖 Generated with Claude Code
Lane: openreposhape-4 (openRepoShape-4)

Summary by Sourcery

Strengthen adoption plan validation tests to pin the precedence of value refusals across additional work-directory and missing-source errors.

Enhancements:

  • Expand adoption command ordering coverage to ensure invalid id and org values are reported before additional work-directory and source refusals in both check and execute.

Tests:

  • Add parameterized tests covering file-based, shared, and missing-source work plans for both invalid id and org values.

Brett Heap and others added 3 commits October 21, 2026 13:59
… right after its three repository names, so a bad one beside an unanswered entry, a moved source, a refused name or another repository is that one refusal in both, and a `pins:` entry that is no pin is said as `_read_as` says it (#1020)

#901 made `check` and `execute` name the same first problem among a plan's options. Outside them, the two still named different problems first (#1020, found by lane 1's writer on #901).

1. **One rule, the refusal before what `check` lists.** `check` refuses a bad `org:` or `id:` outright, exit 2, and lists none of its findings. `execute` refuses at the first of them, but it asked the two only after it had refused four things that `check` lists as findings: a plan for another repository (`plan-not-the-source`), a name the naming policy refuses (`naming-unclassified`), an unanswered entry (`plan-unresolved`) and a source that has moved on (`plan-stale`). And `check` asked the two only where the policy took the plan's names (`_manifest_values`), so an unsafe `org:` beside a refused name was a finding about the name, or about another repository. Both commands now ask the two first of the plan's values, right after the three repository names (`plan.names()`, then `_checked_org_and_id`): `execute` in `cmd_execute`, ahead of `_refuse_a_plan_for_another_repository`, and `check` at its head, after the triad advisory. `_checked_plan_values` no longer asks them, since `cmd_execute` has.
2. **#716's L4-48, decided.** An `org:` that `checked_value` refuses, held to a repository, was `unsafe-value` to `check` and `plan-not-the-source` to `execute`. Such an `org:` names no repository, on GitHub or in the manifest, so it is not compared with the source's. It is `unsafe-value` in both commands now, held to a repository or not. Once it is mended, a plan for another repository is still `plan-not-the-source` in both. This reverses three tests in `tests/test_adopt_check_plan_name.py`, which pinned the old answers on purpose:
   - `test_an_unsafe_org_is_unsafe_in_check_and_compared_by_execute_if_held` expected `plan-not-the-source` from `execute` in its six held rows. As `test_an_unsafe_org_is_unsafe_in_check_and_in_execute_held_or_not`, all twelve expect `unsafe-value` from both, in the same words.
   - `test_check_compares_an_unsafe_org_where_no_manifest_is_built` expected `check` to compare `org: acme labs` beside the refused name `bad_name`: `plan-not-the-source` and `naming-unclassified`, exit 1. As `test_an_unsafe_org_is_asked_before_the_plans_refused_names`, it expects `unsafe-value`, exit 2, from `check` and from `execute`.
   - `test_check_asks_an_unsafe_org_first_where_a_kept_submodule_url_is_relative` expected `plan-not-the-source` from `execute`. It now expects `unsafe-value`, in `check`'s words.
3. **A `pins:` entry that is no pin** was spelled with `repr` (`` `pins:` entry 1 is 7 ``, `True`, `None`). #901 made `pins:` itself read as `_read_as` reads it, and an entry reads the same way now: "the number 7", "the boolean true", "null", "a list of 2 item(s)".

Docstrings and comments now say this: `_checked_org_and_id`, `_checked_plan_values`, `_manifest_values`, `_held_findings`, `_not_the_source`, `_refuse_a_plan_for_another_repository`, `_read_pins` and the #499 block comment. No finding is added or removed: only which problem is named first changes, and the spelling of an entry.

Measured on main at `6da757cb` and on this branch, with a stub `gh`, a bogus token, an empty `GH_CONFIG_DIR`, `GIT_SSH_COMMAND=false` and `--local-remote-dir`. No run made a leg.

| The plan has | `check` on main | `execute` on main | both, here |
|---|---|---|---|
| a bad id beside an unanswered entry | `plan-bad-id` | `plan-unresolved` | `plan-bad-id` |
| a bad id beside a source that has moved on | `plan-bad-id` | `plan-stale` | `plan-bad-id` |
| a bad id beside a name the policy refuses | `plan-bad-id` | `naming-unclassified` | `plan-bad-id` |
| a bad id beside another organisation, held to a repository | `plan-bad-id` | `plan-not-the-source` | `plan-bad-id` |
| no `id:`, and `legs.assembly: north_wind` (a derived id the policy refuses too) | `plan-bad-id` | `naming-unclassified` | `plan-bad-id` |
| an unsafe `org:` held to a repository (L4-48) | `unsafe-value` | `plan-not-the-source` | `unsafe-value` |
| an unsafe `org:` beside an unanswered entry | `unsafe-value` | `plan-unresolved` | `unsafe-value` |
| an unsafe `org:` beside a source that has moved on | `unsafe-value` | `plan-stale` | `unsafe-value` |
| an unsafe `org:` beside a refused name | finding `naming-unclassified`, exit 1 | `naming-unclassified` | `unsafe-value` |
| the same, held to a repository | finding `plan-not-the-source`, exit 1 | `plan-not-the-source` | `unsafe-value` |

Each "here" row is exit 2 from both, word for word. The last two rows agreed on main. They change because `check` now asks the two where the policy refuses the names, as `execute` now does: without that, moving `execute` alone would have made them disagree. Plans with only one of these problems (an unanswered entry, a moved source, a refused name, another repository) are named as on main by both.

**Tests.**
- `tests/test_adopt_plan_value_order.py` gains 16 rows:
  - the 10 above, through both commands, comparing the first line;
  - four `pins:` entries that are no pin: number, boolean, null and list;
  - two guard rows, `id` and `org`: a leg name `checked_value` refuses (`legs.spec: "-spec"`) beside a bad `id:` or `org:` is that name's `unsafe-value` in both, so the three names are still asked first.
- The 14 non-guard rows all fail against `6da757cb`'s `adopt-project.py` and pass here. The two guard rows pass on both, by design.
- Existing rows changed for the new behaviour:
  - `test_adopt_check_plan_name.py`: the three tests above, and its docstring's L4-48 line.
  - `test_adopt_pins.py`: `a-number`.
  - `test_adopt_execute_refusals.py`: the three entry rows of `PIN_ENTRIES`.

Closes #1020

Lane: openreposhape-4 (openRepoShape-4)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
… right after the plan's keys and before `_work_root`, so a bad one beside an unwritable `--work-dir` is that one refusal in both (#1020)

RV1125's SHOULD-1 on #1125. A bad `id:` or `org:` beside a `--work-dir`
this user cannot write in was `plan-bad-id` (or `unsafe-value`) to `check`
and `adopt-work-dir-unwritable` to `execute`: `check` lists the directory
as a finding (#524), and `execute` refuses it before it opens the source,
ahead of the two asks, which #1125 had placed after `_work_root`. The
comments in `cmd_execute` and `_checked_org_and_id` said that cannot
happen.

- `cmd_check` asks `plan.names()` and `_checked_org_and_id(plan)` right
  after its mistyped-plan question, before `_work_root`, and `cmd_execute`
  asks them right after `_refuse_a_mistyped_plan`, before `_work_root`.
  Both read only the plan. `execute` now asks them before
  `_require_filter_repo()` too.
- A side effect, said in the body: `check` printed the Triad advisory,
  once it had opened the source, before it refused a bad `org:` or `id:`;
  it prints nothing now, since the refusal comes before the source is
  opened.
- The comments and docstrings that placed the asks "at its head, after the
  triad advisory" or "right after the names" say where they are now.
- tests/test_adopt_plan_value_order.py: `both_on` takes a `--work-dir` for
  both commands; one row per bad `id:` and bad `org:` beside an unwritable
  `--work-dir` (skipped where `chmod` cannot keep this user from writing);
  and, for NIT-2, one row per value that asks `check` alone and holds
  stdout empty, the position being told by the Triad advisory the unedited
  plan prints first.
- tests/test_adopt_check_plan_name.py: the docstring of the kept-submodule
  row says it is a regression row since `check` asks `org:` at its head
  (NIT-1).

Lane: openreposhape-4 (openRepoShape-4)
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…`--work-dir` that is a file or a shared one, or beside a gone source, is the value's refusal in both `check` and `execute`, so the head ask is pinned against `_work_root`'s other refusals and the source (#1179)

Six rows, with the plan unedited beside the same file, directory or path as the control. Test only: no change to adopt-project.py. Stacked on the head of #1125 (9549006).

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@brettheap brettheap added this to the v1.2.1 milestone Oct 23, 2026
@sourcery-ai

sourcery-ai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

Tests

Document and add parameterized checks that invalid id and org values are refused before file or shared work-directory errors and a missing-source error in both commands.

  • tests/test_adopt_plan_value_order.py L53-59, L77-84, L547-633 (+1 small edits)

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@brettheap

Copy link
Copy Markdown
Contributor Author

RV1226: independent review of #1226 at f61be9f5: READY

Independent review for lane openRepoShape-4 of #1226 (for #1179), stacked on #1125 (9549006fe). I did not write this code. No MUST and no SHOULD; two NITs, both follow-ups.

What I measured

Mutants

Each was applied to adopt-project.py in my own worktree at the PR head and restored after each run. The sha256 was 412edbda after every one. L1, L2, L4 and L11 follow #1179's text and ran against the two order files (91 rows). The others are my own and ran against the six new rows.

Mutant The 85 old rows The six new rows
none (head) 85 passed 6 passed (91 passed together, 205 s)
L1: check asks plan.names() and _checked_org_and_id after _work_root 85 passed (survives) 4 failed: file and shared, id and org
L2: check asks them after the source is opened 85 passed (survives) 6 failed
L4: execute asks them after _work_root 85 passed (survives) 4 failed: file and shared
L11: check asks plan.names() at its head, _checked_org_and_id after _work_root 85 passed (survives) 4 failed: file and shared
L5: execute asks them after _refuse_an_unwritable_work_dir not run 4 failed: file and shared
L6: execute asks them after the source is opened not run 6 failed
L8: BOTH ask them after _work_root (both commands agree, so RV1125b's probe let it live) not run 4 failed: file and shared, at startswith(refused)
L14: BOTH ask them after the source is opened not run 6 failed
C1 (control): _work_root no longer refuses a shared --work-dir not run 2 failed: the shared rows' control (check exit 0; execute ran and made remotes)
C2 (control, code): a gone source is refused as plan-source-vanished not run 2 failed: the gone rows' control line
R1 (code): execute alone refuses a bad id or org as plan-bad-value not run 6 failed at named_first(executed) == named_first(checked)
R2 (order, stderr): execute asks _work_root first and prints its refusal as a NOTE line, then asks the values not run 4 failed, at the NOT_SAID_BESIDE_A_VALUE loop alone: the first line was still the value's
R3 (exit code): execute exits 1 on a bad id or org not run 6 failed at executed.returncode == 2

L8 is new here: the 85 old rows and RV1125b's agree-only probe both let it live, and the file and shared rows kill it.

Gate on a scratch merge of current main

Scratch merge b079615ea of origin/main 50ce8ab15 and f61be9f59 (tree bede214aa, not pushed). Against main it differs only in #1125's five files, this file among them.

The environment was the landing gate's:

  • a stub gh first on PATH, GH_TOKEN=bogus and an empty GH_CONFIG_DIR;
  • an empty GIT_CONFIG_GLOBAL and GIT_CONFIG_NOSYSTEM=1;
  • GIT_ALLOW_PROTOCOL and GIT_SSH_COMMAND unset, and EMAIL set;
  • -p no:cacheprovider -o tmp_path_retention_policy=failed;
  • each run waited for at least 12G and 2M inodes free.
Run Files Result
G1 test_adopt_plan_value_order.py, test_adopt_check_plan_name.py, and the two modules the file imports from, test_adopt_root_symlinks.py and test_adopt_template_values.py, in one run 375 passed, 3 skipped in 816.56s, exit 0. The 3 skips are main's reftable rows in test_adopt_root_symlinks.py, which need git 2.45; the bench has git 2.43.0
G2 test_adopt_execute_refusals.py, test_adopt_pins.py, test_adopt_work_dir_refusal.py, test_adopt_shape_pin_and_work_dir.py, tests/test_repo_hygiene.py 507 passed in 786.55s, exit 0

Merge-trees (git merge-tree --write-tree, all exit 0)

Against Tree
origin/main 50ce8ab15 and f61be9f5 bede214aa0d5, the same as the body's
#1125's head 9549006fe and f61be9f5 8c604453d476, this head's own tree
#1198's head d38e4e36d and f61be9f5 a1504e06d18f, the same as the body's
my scratch merge b079615ea and #1198's head fb54228545ca, clean

Of the open PRs, only #1125, #1198 and this one touch tests/test_adopt_plan_value_order.py.

Findings

NIT-1: a second sys.path insert for an import that is already loaded. The new lines add sys.path.insert(0, str(REPO / "scripts")) and from repo_shape import double_quoted. But test_adopt_template_values, imported on the line above, already does both at its import (its lines 57 and 59). So scripts/ lands on sys.path twice.
Fix: from test_adopt_template_values import double_quoted, with_line. Then drop the sys import, the REPO import and the insert.

NIT-2: the module docstring undercounts _work_root. It says "_work_root refuses two more things before it makes anything". _work_root also refuses:

  • a symlink loop;
  • a symlink to something that is no directory;
  • a directory another user owns;
  • a shared directory above the --work-dir.

The rows rightly cover two of them.
Fix: "refuses more before it makes anything, among them a --work-dir that is a file and one every user can write in". Or leave it.

Landing note, not a finding: GitHub reads the body's closing line only once the PR is retargeted to main after #1125 lands. closingIssuesReferences is empty now. Check that it reads #1179 before landing.

Lane: openreposhape-4 (openRepoShape-4)

Brett Heap and others added 3 commits November 9, 2026 21:19
…eeping this branch's tests/test_adopt_plan_value_order.py

#1125's own files are the same in its final head and its squash, so the one
conflict (tests/test_adopt_plan_value_order.py) is taken as this branch had it.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@brettheap

Copy link
Copy Markdown
Contributor Author

RS1226: #1226 restacked onto main after #1125's squash. New head: 19d03d4 (it was f61be9f, which RV1226 graded READY). Pushed as a plain fast-forward (f61be9f..19d03d4), no force; git ls-remote reads the branch back at 19d03d4.

The three merges (merge commits, never a rebase; each by the estate identity):

Delta comparison. The real base is git merge-base f61be9f59 9549006fe, which is 9549006 (#1125's pre-refresh head). I compared the changed lines of git diff -U0 9549006fe f61be9f59 with those of git diff -U0 origin/main HEAD (origin/main at 5c662f7), each through grep -E '^[+-]' | grep -vE '^(\+\+\+|---) ':

  • reviewed delta: 103 lines, sha256 2b2c7274d89663f784cd989266a4967e72548396d93df803808fa34209940865
  • restack delta: 103 lines, sha256 2b2c7274d89663f784cd989266a4967e72548396d93df803808fa34209940865
  • cmp says identical. git diff --name-only origin/main HEAD lists only tests/test_adopt_plan_value_order.py (102 insertions, 1 deletion, the same shortstat as the reviewed change).

Gate at 19d03d4 (git filter-repo on PATH, EMAIL set, the lane variables unset, basetemps under /tmp, never the full suite):

  • tests/test_adopt_plan_value_order.py, tests/test_adopt_check_plan_name.py, tests/test_adopt_execute_refusals.py, tests/test_adopt_pins.py: 424 passed.
  • tests/test_shape_doctor.py, tests/test_scaffold_leg_path_collisions.py: 550 passed, 3 skipped (the three Windows-only PowerShell paste rows; no pwsh here).
  • tests/test_repo_hygiene.py, tests/test_path_guard_hygiene.py: 222 passed.
  • Total 1196 passed, 3 skipped, 0 failed, so there was no failing id to compare with a clean main.

Merge-trees (git merge-tree --write-tree): against origin/main 5c662f7, clean (tree 4347a845). Against the two other open PRs that touch tests/test_adopt_plan_value_order.py, #1210 (791106c) and #1198 (d38e4e3), both clean; the same two also merge cleanly with plain main.

Main moved while the gate ran. origin/main is now 3ee5bb4 (two commits past 5c662f7: 9cb156a for #1161's plan-case-twins and 3ee5bb4 for the GNUmakefile change; ten files, none is tests/test_adopt_plan_value_order.py). The pushed head does not contain them and the gate above did not run on them. git merge-tree --write-tree origin/main HEAD against 3ee5bb4 is clean (tree fa59f8b48), changes only tests/test_adopt_plan_value_order.py, and its changed lines hash to the same 2b2c7274... sum. The refresh and the landing gate will carry it.

Please review the restack only (a delta review): the three merge commits above, and that the branch's only change against main is the reviewed +102/-1 lines in tests/test_adopt_plan_value_order.py. The test rows themselves were reviewed at f61be9f.

Lane: openreposhape-4 (openRepoShape-4)

@brettheap

Copy link
Copy Markdown
Contributor Author

RVD1226: delta review of #1226's restack at 19d03d42: READY

Delta review for lane openRepoShape-4 of RS1226's restack of #1226 (for #1179) onto main after #1125's squash. I did not write the restack, and I reviewed it only: nothing pushed, no edit to the PR. The change itself was graded READY by RV1226 at f61be9f59, so the question here is whether the restack carried exactly that change onto main and nothing else. It did. No MUST, no SHOULD, no NIT.

The eight checks

All commands ran in my own clone with refs 19d03d422 (the PR head, read back from refs/pull/1226/head) and origin/main.

# Check Result
1 Ancestry PASS
2 Merge 1 tree PASS
3 Merge 2 tree PASS
4 Merge 3 tree PASS
5 The delta PASS
6 Today's main PASS
7 Tests PASS, 424 passed on each of two mains
8 RS1226's comment PASS, each fact matches

1. Ancestry: PASS. git merge-base --is-ancestor f61be9f59 19d03d422 is true. git log --first-parent --format='%H %P %an %s' f61be9f59..19d03d422 lists exactly three commits, all merges, author and committer both Brett Heap with the estate address:

2. Merge 1: PASS. The tree of 58c4835c1 is 54e37be2dd07f58ab852601d88714e30833da461; git merge-tree --write-tree f61be9f59 41e16f4d2 prints 54e37be2dd07f58ab852601d88714e30833da461 (exit 0, clean).

3. Merge 2: PASS. git diff --quiet F S -- adopt-project.py tests/test_adopt_check_plan_name.py tests/test_adopt_execute_refusals.py tests/test_adopt_pins.py tests/test_adopt_plan_value_order.py exits 0 (empty diff), and the blob ids of the five files are the same on F and S (for example adopt-project.py 61d098b6 and tests/test_adopt_plan_value_order.py 351c6d8e on both). The tree of d4a32fbae is 54e37be2dd07..., equal to its first parent's tree. A plain git merge-tree --write-tree --name-only 58c4835c1 f5bb4b449 conflicts in tests/test_adopt_plan_value_order.py alone, the one file RS1226 says it took --ours in.

4. Merge 3: PASS. The tree of 19d03d422 is 4347a845789342bc7a41f501f89b1d21deb5d9ab; git merge-tree --write-tree d4a32fbae 5c662f75e prints 4347a845789342bc7a41f501f89b1d21deb5d9ab (exit 0). 5c662f75e descends from S.

5. The delta: PASS. The merge base of f61be9f59 and 9549006fe is 9549006fe. The changed lines of git diff -U0 9549006fe f61be9f59 and of git diff -U0 5c662f75e 19d03d422, each through grep -E '^[+-]' | grep -vE '^(\+\+\+|---) ', are 103 lines apiece and cmp says identical:

6. Today's main: PASS. Main moved twice while I worked: 3ee5bb4d9 when I started, 8cf6477fe before I posted (one more commit, a scripts/family.py change with its family tests, none of which adopt-project.py or the four test files import). Both read the same:

  • git merge-tree --write-tree origin/main 19d03d422 is clean (exit 0): tree fa59f8b48a1e89d26c1ab17cfaeab71a574264d2 against 3ee5bb4d9, tree 300af609d7390db649f274e64e29f7b37b01dc19 against 8cf6477fe.
  • git diff --name-only origin/main <tree> lists tests/test_adopt_plan_value_order.py only, and the changed lines of git diff -U0 origin/main <tree> hash to 2b2c7274d89663f784cd989266a4967e72548396d93df803808fa34209940865, the check 5 sum, on both.

7. Tests: PASS. Environment as the lane rules give: /usr/bin/python3 -m pytest -p no:cacheprovider -o tmp_path_retention_policy=failed, basetemps under /tmp, EMAIL set, the lane variables and GIT_ALLOW_PROTOCOL and GIT_SSH_COMMAND unset, empty GIT_CONFIG_GLOBAL and GIT_CONFIG_NOSYSTEM=1, test author and committer variables, a stub gh first on PATH with GH_TOKEN=bogus and an empty GH_CONFIG_DIR, and frvenv/bin on PATH. Two runs in parallel at most, on a loaded machine (load average about 65-75).

File Scratch merge of 3ee5bb4d9 and 19d03d422 (8d64bf899, tree fa59f8b48) Scratch merge of 8cf6477fe and 19d03d422 (tree 300af609d)
tests/test_adopt_plan_value_order.py 46 passed in 65s 46 passed in 87s
tests/test_adopt_check_plan_name.py 45 passed in 95s 45 passed in 91s
tests/test_adopt_execute_refusals.py 181 passed in 460s 181 passed in 428s
tests/test_adopt_pins.py 152 passed in 366s 152 passed in 340s
Total 424 passed, 0 failed, 0 skipped 424 passed, 0 failed, 0 skipped

There was no failing id, so there was nothing to compare against origin/main alone.

Extra, beyond the brief: the new rows still bite on the refreshed code. RV1226 graded the rows against adopt-project.py blob 4300f48 (#1125's pre-refresh head); on main it is now ddd75be0, so I replayed three of RV1226's ordering mutants on the first scratch merge, in a separate worktree, on the six new rows (-k on the three named_before_... tests). adopt-project.py was git checkout-restored after each, and its sha256 prefix read 6e2402aaeec3 before the first and after every one, with a clean git status.

Mutant Six new rows
L1: cmd_check asks plan.names() and _checked_org_and_id after _work_root 4 failed (file and shared, id and org), 2 passed; mutated sha b70cb90d
L4: cmd_execute asks _checked_org_and_id after _work_root 4 failed (file and shared, id and org), 2 passed; mutated sha 1b682c6c
L8: both L1 and L4 4 failed (file and shared, id and org), 2 passed; mutated sha 2b800b4b

The same 4-of-6 kills RV1226's table shows for L1, L4 and L8.

8. RS1226's comment (#1226 issuecomment-6752188531): PASS. Each fact checked:

Findings

None at MUST, SHOULD or NIT. At review time GitHub reports the PR MERGEABLE, base main, with SonarCloud, package and tests-git-bash passing and tests still pending on the new head; the landing gate carries that.

Scratch

My clone is /workspace/projects/openRepoShape-worktrees/_lane4-scratch/rvd1226-clone, with worktrees rvd1226-merge-wt, rvd1226-merge2-wt and rvd1226-mut-wt beside it, and my logs and scripts are under /workspace/projects/openRepoShape-worktrees/_lane4-scratch/tools/run/rvd1226/.

Lane: openreposhape-4 (openRepoShape-4)

@sourcery-ai

sourcery-ai Bot commented Nov 10, 2026

Copy link
Copy Markdown

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 4 days and 4 hours by commenting @sourcery-ai review. Upgrade to get a review now.

@sonarqubecloud

Copy link
Copy Markdown

@brettheap
brettheap merged commit 3ffe75b into main Nov 10, 2026
5 checks passed
@brettheap
brettheap deleted the fix/1179-value-order-mutant-rows branch November 10, 2026 14:03
brettheap pushed a commit that referenced this pull request Nov 10, 2026
Lane: openRepoShape-3

Co-Authored-By: Claude Opus 5.5 <[email protected]>
brettheap pushed a commit that referenced this pull request Nov 10, 2026
…lan_value_order.py

The PR's own no-context lines over the squash equal its lines over #1226's head 489bc3e, and the tree is 960f1ad, the tree of this PR's own range applied to main.

Lane: openRepoShape-3

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant