Skip to content

adopt-project.py: plan-wrong-kind, plan-unsupported-mode, plan-bad-leg and plan-bad-id say a plan value that is not text as _read_as says what the plan's reader read, kind is the number 7 and declares leg a list of 2 item(s) where repr spelled it 7, True and ['a', 'b'], and a plan with no kind: or mode: line says absent where it said None (#1199) - #1281

Merged
brettheap merged 4 commits into
mainfrom
l3-1199-plan-values-spelled-as-read
Nov 10, 2026

Conversation

@brettheap

@brettheap brettheap commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

What changed

A v1.2.1 fix for #1199, a follow-up of #1114 (PR #1198), found by reading by FIN1114 and W1114 of lane 4. It lands under Brett Heap's v1.2.1 merge word (2026-10-23T13:10:26Z) once reviewed and green.

Four refusals in adopt-project.py named a plan value of any type with repr, where every other refusal of a plan's value says what the plan's reader read (_read_as): "the number 7", "the boolean true", "null", "a list of 2 item(s)", "a mapping of 1 key(s)". They say a value that is not text that way now, in check and in execute, under the same code with the same remedy:

Two small helpers sit under _read_as: _plan_value_said(value) is repr of a text and _read_as of anything else, and _plan_key_said(data, key) is that for a top-level key, or absent where the plan has no such line.

What a person sees change

A text value is spelled byte for byte as before (kind is 'placement-plan', a leg 'Spec', `id:` is 'North Wind'), under the same code and with the same remedy: the control rows pass on main. Everything else:

plan main said now says
kind: 7 kind is 7, expected 'adoption-plan' kind is the number 7, expected 'adoption-plan'
kind: true kind is True, ... kind is the boolean true, ...
kind: [a, b] kind is ['a', 'b'], ... kind is a list of 2 item(s), ...
kind: null or a bare kind: kind is None, ... kind is null, ...
no kind: line kind is None, ... kind is absent, ...
mode: true mode is True; v0.2 implements ... mode is the boolean true; v0.2 implements ...
mode: {k: v} mode is {'k': 'v'}; ... mode is a mapping of 1 key(s); ...
id: [a, b] `id:` is "['a', 'b']" and must match ... `id:` is a list of 2 item(s) and must match ...
entry leg: 7 declares leg 7; it is one of [...] declares leg the number 7; it is one of [...]
entry leg: [a, b] declares leg ['a', 'b']; ... declares leg a list of 2 item(s); ...

The two decisions the issue left to whoever takes it, made here:

Measured, before and after

$X/probe.py (kept in the writer's scratch) makes a source, runs plan, sets one line of the plan to each value and runs check and execute --yes on it, with a stub gh first on PATH and GIT_SSH_COMMAND=false. On main 42308f26b, then on the head before the merge with main (aa6fdae27); the plan's path is elided:

main:  REFUSED plan-wrong-kind: <plan>: kind is 7, expected 'adoption-plan'
head:  REFUSED plan-wrong-kind: <plan>: kind is the number 7, expected 'adoption-plan'
main:  REFUSED plan-wrong-kind: <plan>: kind is ['a', 'b'], expected 'adoption-plan'
head:  REFUSED plan-wrong-kind: <plan>: kind is a list of 2 item(s), expected 'adoption-plan'
main:  REFUSED plan-wrong-kind: <plan>: kind is None, expected 'adoption-plan'      (no kind: line)
head:  REFUSED plan-wrong-kind: <plan>: kind is absent, expected 'adoption-plan'
main:  REFUSED plan-unsupported-mode: <plan>: mode is True; v0.2 implements `in-place` only
head:  REFUSED plan-unsupported-mode: <plan>: mode is the boolean true; v0.2 implements `in-place` only
main:  REFUSED plan-bad-id: <plan>: `id:` is "['a', 'b']" and must match ^[a-z0-9][a-z0-9-]*$
head:  REFUSED plan-bad-id: <plan>: `id:` is a list of 2 item(s) and must match ^[a-z0-9][a-z0-9-]*$
main:  FINDING plan-bad-leg: `README.md` declares leg True; it is one of ['spec', 'code', 'root', 'drop']
head:  FINDING plan-bad-leg: `README.md` declares leg the boolean true; it is one of ['spec', 'code', 'root', 'drop']

check and execute said the same words before and say the same words now, for every value probed (a number, a boolean, a float, a list, a mapping, a null, an absent line and a text). The issue's "reads as" for plan-bad-id with a list id: was unprobed there; it is the quoted "['a', 'b']" line above.

Rows

tests/test_adopt_plan_values_read_as.py, 31 rows, each through check and execute --yes on one edited plan with the same --local-remote-dir, asserting the two say the same words and nothing else follows them but the remedy:

  • kind, mode by a number, a boolean, a float, a list and a mapping; id by a list and a mapping (a number or a boolean id: is _not_text's, held by tests/test_adopt_values_as_typed.py); an entry's leg: by the same five. Each also asserts main's spelling is absent.
  • The whole refusal as a person reads it, for kind: 7 and for a list id:.
  • kind and mode: null, a bare key, and no line.
  • Controls, which PASS on main: a text kind, a text kind holding a tab (repr escapes it), a text mode, a text id the pattern refuses, a text leg and one holding a tab, and kind: placement-plan with its own remedy.

On main's adopt-project.py swapped in (restored and cmp-checked): 25 failed, 6 passed, the 6 being the controls above. On the head before the merge (aa6fdae27): 31 passed. On the merge commit, the swap run is under Gates, and these rows run inside g1 there.

Mutants

Each applied to adopt-project.py, tests/test_adopt_plan_values_read_as.py run, the file restored from a copy and cmp-checked, every time:

mutant result
M1 plan-wrong-kind puts data.get('kind')!r back 9 failed, killed
M2 plan-unsupported-mode puts data.get('mode')!r back 8 failed, killed
M3 plan-bad-leg puts {leg!r} back 5 failed, killed
M4 plan-bad-id puts {project_id!r} back 3 failed, killed
M5 _plan_key_said says null for an absent line 2 failed, killed
M6 _plan_value_said says _read_as of a text too (the text 'x') 6 failed, killed (every control)

Gates

Each with -rs, one pytest at a time, a stub gh first on PATH, GH_TOKEN=bogus, GIT_SSH_COMMAND=false, GIT_CONFIG_GLOBAL=/dev/null, /usr/bin/python3.

The first four bullets were measured on the head before the merge with main (aa6fdae27; Gate A on that head merged with main 674077657, as its bullet says); the bullets after them were measured on the merge commit 9aabd8afe.

  • New module with ten modules that pin these codes or hold the helpers they import, in ONE run (test_adopt_plan_values_read_as, _values_as_typed, _plan_value_order, _question_and_submodule_spelling, _finding_spelling, _execute_refusals, _plan, _submodules, _plan_yaml_quoting, _plan_flag_refusals_first, _project_is_the_source): 1387 passed, 1 skipped in 835.85s (the skip is SHAPE_MEDXEHR_CLONE unset). That run held the commit before a comment-only edit to the new module's TREE comment; the module alone after it: 31 passed in 26.64s.
  • Gate A of lane 3's review (RV1281b, adopt-project.py: plan-wrong-kind, plan-unsupported-mode, plan-bad-leg and plan-bad-id say a plan value that is not text as _read_as says what the plan's reader read, kind is the number 7 and declares leg a list of 2 item(s) where repr spelled it 7, True and ['a', 'b'], and a plan with no kind: or mode: line says absent where it said None (#1199) #1281 issuecomment-6746015239), on aa6fdae27 merged with main 674077657 (tree 6b1df14a7): the 16 modules that pin plan-wrong-kind, plan-unsupported-mode, plan-bad-leg or plan-bad-id (git grep -ln, the new module among them), plus their two fixture sources test_github_name_limits and test_scaffold_leg_path_collisions, 18 modules in ONE run: 2375 passed, 9 skipped in 1287.52s. It adds the seven pinning modules the run above left out: test_adopt_leg_path_collisions, test_adopt_leg_paths, test_adopt_manifest_values, test_adopt_template_values, test_adopt_verify, test_github_limits_init_check_org and test_leg_path_yaml_scalars.
  • Doctor gates: tests/test_shape_doctor.py: 446 passed, 3 skipped in 624.59s; tests/test_scaffold_leg_path_collisions.py: 104 passed in 4.68s.
  • Guards (test_repo_hygiene, test_agents_md_codes, test_git_output_decoding, test_stdout_encoding, test_cli_reference, test_no_auto_maintenance, test_update_add_codes_documented): 349 passed, 3 skipped in 67.06s (Windows-only and a GIT_CONFIG_GLOBAL skip). No code's wording is pinned in AGENTS.md or the docs, so none changed; docs/cli.md is untouched (no flag or command changed).
  • On the merge commit 9aabd8afe (main 4552efa6a merged in, tree edf792618), the same wrapper, one pytest at a time:
    • g1, 20 modules in ONE run: the new module, test_adopt_plan_and_remote_paths_spelled and test_adopt_spelled_names, plus gate A's 18 (its 16 pinning modules and the two fixture sources, the new module among them): 2587 passed, 9 skipped in 1381.72s (0:23:01) (the same nine skips as gate A: SHAPE_MEDXEHR_CLONE unset, and eight the module makes by design in test_leg_path_yaml_scalars.py).
    • Doctor gates: tests/test_shape_doctor.py: 446 passed, 3 skipped in 894.86s (0:14:54) (the three are Windows-only PowerShell lines); tests/test_scaffold_leg_path_collisions.py on its own: 104 passed in 7.66s.
    • Guards, the same seven modules: 349 passed, 3 skipped in 115.34s (0:01:55) (one Windows-only skip, and two GIT_CONFIG_GLOBAL skips in test_no_auto_maintenance.py:222 that this wrapper's own GIT_CONFIG_GLOBAL causes).
    • The new module with main 4552efa6a's adopt-project.py swapped in (restored and cmp-checked, the clone clean afterwards): 25 failed, 6 passed in 54.72s, the six passes being the controls above.

Merges

Main moved while this was open: #1177 (8bcdb2c) and #1178 (4552efa6a) landed, and #1177 changed three lines this change changes, so the PR conflicted with main. The merge with main is done in the PR, in commit 9aabd8afe (parents aa6fdae27 and main 4552efa6a). Its three conflict hunks, all in adopt-project.py, are resolved as this body advised: plan-wrong-kind and plan-unsupported-mode in Plan.__init__, and plan-bad-id in Plan.project_id, each keep main's _shown(str(path)) (_shown(str(self.path))) with this change's value words. Nothing else conflicted. The resolution is byte-equal (cmp) to the one lane 3 made from git merge-tree.

This change's own diff is unchanged. git diff -U0 of it over main 4552efa6a is 365 lines, and was 371 over its old base 42308f26b; the two differ only in the three statements above, which say the same words with _shown(...) around the path (they wrap differently, because the merge keeps main's wrapping of all three statements).

git merge-tree --write-tree of the head 9aabd8afe with main 4552efa6a (fetched by URL into refs/remotes/gh/main): clean, tree edf792618 (the head's own tree, as main is already in it). With #1278's head 31f942700: clean, tree a784d8d29. With #1282's head e91c57e96: clean, tree e10cc510c. Main has moved since, to 370a23cd2 (five more commits): git merge-tree --write-tree of the head 9aabd8afe with it is clean too, tree 32f3959e2 (with 3ee5bb4d9 it was tree cf80b8711).

Before the merge, git merge-tree --write-tree of the head aa6fdae27 with main 674077657 (fetched by URL into refs/remotes/upstream/main; main moved by two commits while this was written): clean, tree 6b1df14a7. With the heads of the 21 open PRs that touch adopt-project.py: 18 clean, and three that do not:

Clean: #1268, #1265, #1253, #1252, #1249, #1210, #1207, #1198, #1194, #1189, #1186, #1178, #1171, #1154, #1141, #1125, #1122, #1120.

Out of scope

  • The same kind is {data.get('kind')!r}, expected pattern, in other tools and under other codes: scripts/path_classify.py:189 (path-policy-wrong-kind), scripts/repo_shape.py:2242 (policy-wrong-kind), scripts/bump-leg.py:241 (bump-leg-wrong-kind), scripts/family.py:580 (family-wrong-kind), templates/assembly-root/scripts/validate-manifest.py:824 (manifest-kind), templates/assembly-root/scripts/validate-pins.py:793 (pin-wrong-kind) and templates/family-root/scripts/validate-family.py:648 (family-kind) (these four on main ebb87168a), and declares leg {rule.get('leg')!r} at scripts/path_classify.py:136 (path-policy-leg). They are policy, manifest, family and pin files, not the adoption plan; the issue names adopt-project.py only.
  • The places the issue lists as text by the time they are spelled (at the issue's line numbers, on 961640c68: _pin_row_problem :527-:543, :616, :629, :4198, :4233, :5150, :5162, :15561, :16605-:16612) and the --source, --pin-source, confirmation-answer and --local-remote-dir values: unchanged.
  • The derived-id plan-bad-id at :7184 on main 4552efa (the id from legs.assembly) is text by then: unchanged.

Closes #1199

Lane: openreposhape-3 (openRepoShape-3)

🤖 Generated with [Claude Code]

Summary by Sourcery

Make adoption-plan validation errors describe non-text and missing values consistently with the plan reader.

Bug Fixes:

  • Report non-text adoption-plan values using the same human-readable descriptions as other plan-value errors, distinguishing null values from missing keys.

Enhancements:

  • Preserve existing text-value formatting while standardizing value descriptions across plan kind, mode, ID, and leg diagnostics.

Tests:

  • Add comprehensive coverage for check and execute diagnostics across scalar, collection, null, absent, and text plan values, including controls and mutation checks.

…ad-leg` and `plan-bad-id` say a plan value that is not text as `_read_as` says what the plan's reader read, `kind is the number 7` and `declares leg a list of 2 item(s)` where `repr` spelled it `7`, `True` and `['a', 'b']`, and a plan with no `kind:` or `mode:` line says `absent` where it said `None` (#1199)

Four refusals named the plan value they refused with `repr`, where every
other refusal of a plan's value says what the reader read (`_read_as`). A
text is still spelled as Python spells it, quoted, byte for byte, under the
same code with the same remedy; any other value is `_read_as`'s words, in
`check` and in `execute`. An `id:` that is a list or a mapping was the quoted
text `"['a', 'b']"` that `str` made of it, with no word that the plan holds a
list. A bare `kind:` or `mode:` or one set to null is `null`, and a plan with
no such line is `absent`.

tests/test_adopt_plan_values_read_as.py holds the rows: each site by a number,
a boolean, a float, a list and a mapping, through `check` and `execute --yes`,
and the text controls, which pass on main.

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

sourcery-ai Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

Implementation

Centralize how adoption-plan values are described and use those descriptions for kind, mode, leg, and id refusals, distinguishing absent top-level keys from explicit nulls while preserving text formatting.

  • adopt-project.py L9378-9400 (+5 small edits)

Tests

Exercise the changed refusal wording through check and execute for non-text, null, absent, and text values, including full-output checks and regression controls.

  • tests/test_adopt_plan_values_read_as.py L1-312

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

(lane openRepoShape-3, 2026-11-09T16:55:18Z) Lane 3's independent review of #1281 (for #1199, v1.2.1), by RV1281 and RV1281b (opus), neither of whom wrote #1281, at head aa6fdae2782da561517ea88a1ee1a399402bc9e5: READY.

PR: #1281, branch l3-1199-plan-values-spelled-as-read, head aa6fdae2782da561517ea88a1ee1a399402bc9e5. At 16:52Z the head had not moved, the PR was a draft with no milestone, and CI on the head was all green: tests, SonarCloud Code Analysis, package and tests-git-bash. That CI run started at 14:36:29Z, after main 674077657 landed at 14:33:42Z.

Two reviewers wrote this, neither of whom wrote #1281. RV1281 ran sections 1 to 4, 6 and 7 against main 674077657. RV1281b ran section 5. Main moved to ebb87168a (#1122) at 16:20Z while gate A was running. Gate A stays on the 674077657 merge; every gate that started after that ran on the ebb87168a merge. Each result below names the main it used.

Every run used a wrapper with a stub gh that exits 97, GH_TOKEN=bogus, an empty GH_CONFIG_DIR, GIT_SSH_COMMAND=false, GIT_CONFIG_GLOBAL=/dev/null, [email protected] and /usr/bin/python3.

Verdict

READY. There is no MUST and no SHOULD. The three NITs are about the body's wording only and do not hold up landing.

1. Before and after (measured, by RV1281)

A probe (probe.py) ran check and execute --yes on 55 cases, on main and on the merge. The cases set kind, mode, id and an entry's leg to:

  • a number, a float, a boolean, a list and a mapping;
  • null, a bare key and an absent line (no absent case for leg);
  • a date-like value;
  • text: plain, with ', with both quote kinds, with é, and with a tab.

Results:

  • 23 cases changed, exactly the non-text, null and absent ones. For example:
    • kind is 7 became kind is the number 7.
    • kind is None became kind is null (for null and a bare key) or kind is absent (no line).
    • mode is {'k': 'v'} became mode is a mapping of 1 key(s).
    • `id:` is "['a', 'b']" became `id:` is a list of 2 item(s).
    • declares leg True became declares leg the boolean true.
  • 32 cases are byte-equal to main. These are:
    • every text spelling, for example kind is 'say "hi" it\'s', `id:` is 'café' and declares leg 'a\tb';
    • the date-like value, which the plan's reader reads as text;
    • the _not_text lines for a number, float or boolean id:.
  • check and execute say the same words in all 50 cases that refuse. In the other 5 (id set to null, bare, absent, a date or x), check passes and execute refuses later under adopt-empty-leg-unconsented. That refusal is outside this PR.
  • The body's six probe lines match what was measured, word for word.

2. Consistency with _read_as (read)

3. Missed sites (measured, by RV1281)

git grep -n '!r}' adopt-project.py on the head gives 33 lines. Every one left is something #1199 itself calls text or not a plan value:

  • the pin rows and the derived id (:522-:545, :618, :627, :631, :7028);
  • leg paths and --id (:4302, :4337, :5254, :5266);
  • --source, --pin-source and the confirmation answer (:2138-:2293, :5703, :13842);
  • _plan_values and the remote url (:16543, :16598);
  • names (:17620-:17627).

No test outside the new module pins an old non-text spelling. A git grep of the non-.py files on the merge finds no doc that quotes these refusals either; the one hit is a family.yaml comment about `id:` (RV1281b). The four out-of-scope tools the body names are other tools under other codes: path-policy-wrong-kind (path_classify.py:189), path-policy-leg (:136), policy-wrong-kind (repo_shape.py:2242) and bump-leg-wrong-kind (bump-leg.py:241).

4. Rows and mutants (measured, by RV1281)

  • The new module on the 674077657 merge: 31 passed in 26.90s.
  • With main's adopt-project.py swapped in: 25 failed, 6 passed in 26.88s. The 6 that pass are the controls: text_is_spelled[kind|kind-escape|mode|id], text_leg and placement_plan_kind. The file was restored and checked with cmp.
  • RV1281's own mutants were all killed, and each file was restored and checked with cmp:
mutant result
R1: _plan_key_said uses data.get(key) is None (null and bare read as absent) 4 failed, killed
R2: _plan_value_said applies _read_as to bool/int/float only 13 failed, killed
R3: plan-bad-id says _plan_value_said(project_id) instead of set_id 3 failed, killed
R4: plan-bad-leg says _plan_value_said(str(leg)) 5 failed, killed
  • The body's mutants M1 to M6 were not re-run. Counting the rows each one touches gives the body's numbers: 9, 8, 5, 3, 2 and 6.

5. Gates (measured, by RV1281b)

gate main result
A: the 16 modules that pin plan-wrong-kind, plan-unsupported-mode, plan-bad-leg or plan-bad-id (from git grep, without the doctor), the new module among them, plus their two fixture sources test_github_name_limits.py and test_scaffold_leg_path_collisions.py; 18 modules in one pytest 674077657 (merge bd4967a5c, tree 6b1df14a7) 2375 passed, 9 skipped in 1287.52s (0:21:27)
rows2: the new module plus #1122's test_adopt_unsearchable_source.py ebb87168a (merge 64e2f79ff, tree 58cf64e78bce) 75 passed in 43.36s
doctor: tests/test_shape_doctor.py ebb87168a 446 passed, 3 skipped in 953.94s (0:15:53)
scaffold: tests/test_scaffold_leg_path_collisions.py on its own ebb87168a 104 passed in 8.93s
guards: test_repo_hygiene, test_agents_md_codes, test_git_output_decoding, test_stdout_encoding, test_cli_reference, test_no_auto_maintenance and test_update_add_codes_documented ebb87168a 349 passed, 3 skipped in 87.24s (0:01:27)
#1177 resolution: test_adopt_plan_values_read_as.py with test_adopt_plan_and_remote_paths_spelled.py #1281 merged into #1177 5208e874e, conflicts resolved as the body advises 179 passed in 142.70s (0:02:22)

The skips:

  • Gate A: one skip is SHAPE_MEDXEHR_CLONE is unset (this host has no MedxEHR clone). The other 8 are skips the module makes by design in test_leg_path_yaml_scalars.py ("got empty parameter set", "the templates read ... back").
  • Doctor: all 3 are the PowerShell line is printed ... only on a Windows host.
  • Guards:
    • One is Windows-only in test_stdout_encoding.py.
    • Two in test_no_auto_maintenance.py:222 skip because the review wrapper itself sets GIT_CONFIG_GLOBAL. Those two are unmeasured here; CI's tests ran them.

Every module these runs import from exports plain helpers, not fixtures. The names are asked_what, LANE, rendered_shape_line, NOT_UTF8, repository, with_origin, paste and printed_strings. So running a module on its own does not split a module-scoped fixture, the #1188 trap.

6. Merges (measured)

7. Body (measured, by RV1281)

  • It has exactly one closing keyword, `Closes #1199`. closingIssuesReferences is [1199].
  • It is ASCII except line 108, the robot line (U+1F916).
  • Its line numbers are on its named base 42308f26b, where :6697, :6718, :7037, :7203, :17967 and :7025 all check out. On current main they are a few lines higher.
  • A bot added a "Summary by Sourcery" block after the robot line. It holds no closing keyword. This is a note, not a request.

Findings

MUST: none.

SHOULD: none.

NIT 1 (the gate's module list). The body says its gate ran "the modules that pin these codes". git grep -ln 'plan-wrong-kind\|plan-unsupported-mode\|plan-bad-leg\|plan-bad-id' tests/ finds 7 more that its run left out:

  • test_adopt_leg_path_collisions
  • test_adopt_leg_paths
  • test_adopt_manifest_values
  • test_adopt_template_values
  • test_adopt_verify
  • test_github_limits_init_check_org
  • test_leg_path_yaml_scalars

It also left out test_github_name_limits, which test_github_limits_init_check_org imports from. All of them are now measured green in gate A (2375 passed, 9 skipped), so only the body's wording is left to fix.

NIT 2 (the out-of-scope list). The same kind is {...!r}, expected pattern sits in four more places. All are other tools under other codes, not the adoption plan:

  • scripts/family.py:580 (family-wrong-kind)
  • templates/assembly-root/scripts/validate-manifest.py:824 (manifest-kind)
  • templates/assembly-root/scripts/validate-pins.py:793 (pin-wrong-kind)
  • templates/family-root/scripts/validate-family.py:585 on the head, :648 on main ebb87168a (family-kind)

Naming them would make the list complete.

NIT 3 (line numbers). The out-of-scope line numbers (:4198, :15561 and so on) are the issue's, on 961640c68. On the head they are :4302, :16543 and so on. Saying "the issue's line numbers" would avoid confusion.

Not measured

State and paths

  • Scratch folder: /workspace/projects/openRepoShape-worktrees/_lane3-scratch/RV1281-scratch.
  • Clone: /workspace/projects/openRepoShape-worktrees/_lane3-scratch/RV1281, detached at aa6fdae27. RV1281b fetched only from the local shared repo, into this clone's own refs: refs/rv/main-ebb8716, plus refs/rv/merge-main2 for the new merge. A first fetch also moved this clone's origin/main to the shared repo's stale local main (247699206). Nothing else changed.
  • Worktrees (in the scratch folder), all clean (status --porcelain --untracked-files=all empty):
    • wt-merge: bd4967a5c, on main 674077657. Its adopt-project.py is byte-equal (cmp) to merge-adopt.orig.py.
    • wt-merge2: 64e2f79ff, on main ebb87168a. New, added by RV1281b.
    • wt-main: 674077657.
    • wt-1177: 5208e874e, the local merge aborted. Its adopt-project.py is byte-equal (cmp) to pr1177's.
  • Stray files: three .merge_file_* temp files from a checkout-index --temp call in wt-1177 were moved to trash/stray-1177/, not deleted.
  • Logs: gateA.log (the killed first run is kept at trash/gateA-killed-run1.log), rows2.log, doctor.log, scaffold.log, guards.log, m1177.log and chain2.log.
  • Scripts: gateA.sh, chain2.sh (chain.sh was stopped before it ran anything), envrun.sh, resolve.py, probe.py and mutate.py.
  • No process is left running. Nothing was pushed, posted, approved or marked ready.

@brettheap
brettheap marked this pull request as ready for review November 9, 2026 16:56
@sourcery-ai

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

@brettheap brettheap added this to the v1.2.1 milestone Nov 9, 2026
…'s _shown() with #1281's spelled plan values

Main landed #1177 (8bcdb2c) and #1178 (4552efa), and both changed
adopt-project.py where #1281 does. Merging main into the branch leaves exactly
three conflict hunks, all in adopt-project.py, each resolved as the PR body
advised: keep main's `_shown(str(path))` (or `_shown(str(self.path))`) for the
path, and keep #1281's spelled value after it.

- `plan-wrong-kind` in the plan reader (Plan.__init__):
  `{_shown(str(path))}: kind is {_plan_key_said(data, 'kind')}, expected ...`
- `plan-unsupported-mode` in the plan reader (Plan.__init__):
  `{_shown(str(path))}: mode is {_plan_key_said(data, 'mode')}; v0.2 ...`
- `plan-bad-id` (Plan.project_id):
  `{_shown(str(self.path))}: `id:` is {_plan_value_said(set_id)} and must match ...`

No other file conflicted. The PR's own change is unchanged: over the new main
it differs from the old diff only in those three path spellings.

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

brettheap commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor Author

(lane openRepoShape-3, 2026-11-09T23:04Z) Lane 3's independent review of #1281's merge of main (aa6fdae27..9aabd8afe), by RV1281c (opus), who wrote none of #1281, at head 9aabd8afe: READY AFTER FIXES, the fixes being in the body only.

The merge, the resolution and the code are correct as they stand, so the PR needs no new commit. The only fixes are two sentences in the body draft that went stale after FX1281 wrote it. Make them before gh pr edit. CI tests was still pending when I checked.

PR: #1281, #1281 (OPEN, not a draft, milestone v1.2.1, closingIssuesReferences = [1199]). I made no edit, comment, merge or push.

Branch and head: l3-1199-plan-values-spelled-as-read, head 9aabd8afe7d85cc023f6f77a680ce401bb2b69f3, tree edf792618f30e7844a69c6ee64fed9408e62ec85. Its parents are aa6fdae27 then 4552efa6a, and the author and committer are both Brett Heap <[email protected]>. My clone was clean, I fetched by URL (pr/1281 = 9aabd8afe, gh/main = 370a23cd2), and HEAD is detached at 9aabd8afe.

1-2. The merge commit and the resolution

3. The PR's own change is the reviewed one

  • git diff -U0 42308f26b aa6fdae27 is 371 lines and git diff -U0 4552efa6a 9aabd8afe is 365. The stats are 2 files, 346/9 before and 343/6 now.
  • With the @@ and index lines taken out, diff of the two shows only the lines of the three statements.
  • I parsed the four adopt-project.py files with ast, took each statement's f-string, and replaced _shown(str(X)) with X:
    • head-old == head-new (unwrapped): True
    • base == main (unwrapped): True
  • So the PR changes each statement in exactly the same way on both bases. The other hunks (the docstring, plan-bad-leg, the new helpers and the test module) are byte-identical.

4. Behaviour at 9aabd8a

  • The three modules in one pytest: 223 passed in 121.17s (0:02:01). I used the envrun wrapper with GIT_CONFIG_GLOBAL=/dev/null and basetemp /tmp/claude-1000/l3bt/RV1281c-three.
  • Probes through check: the plan sat in a folder named p\u202ekind (bidi) or p\x1bkind (ESC). The control plan's check returned rc 0, and every row below returned rc=2 with raw-controls-in-output=[]. Text below is shown through ascii(), so \u202e and \x1b are literal escapes in the output.
    • REFUSED plan-wrong-kind: <work>/bidi-kind-0/p\u202ekind/adoption-plan.yaml: kind is a list of 2 item(s), expected 'adoption-plan'
    • REFUSED plan-wrong-kind: <work>/esc-kind-1/p\x1bkind/adoption-plan.yaml: kind is the number 7, expected 'adoption-plan'
    • REFUSED plan-bad-id: <work>/bidi-id-3/p\u202ekind/adoption-plan.yaml: id: is a list of 2 item(s) and must match ^[a-z0-9][a-z0-9-]*$
    • REFUSED plan-bad-id: <work>/esc-id-4/p\x1bkind/adoption-plan.yaml: id: is a mapping of 1 key(s) and must match ...
    • Text values with a real control character are quoted with the character escaped: kind is 'x\u202e' and `id:` is 'a\x1bb'. The control 'Bad_Id' is unchanged.
  • FX1281's gates: I did not re-run them. Their logs agree with the body: g1 2587 passed, 9 skipped in 1381.72s (0:23:01) (20 modules, on 9aabd8afe), doctor 446 passed, 3 skipped in 894.86s (0:14:54), scaffold 104 passed in 7.66s, guards 349 passed, 3 skipped in 115.34s (0:01:55), swap 25 failed, 6 passed in 54.72s.
  • Coverage: git grep -l at 9aabd8afe finds 18 test modules that pin the four codes. 17 are in g1, and the 18th, test_shape_doctor.py, is the doctor gate.

5. Merges (git merge-tree --write-tree)

merge result
9aabd8afe x current main 370a23cd2 clean, tree 32f3959e2c874cec76fd08ff6fcea9bf12d50ee5; the three statements are intact at :6889, :6910 and :7261
x 4552efa6a clean, edf792618 (the head's own tree)
x 3ee5bb4d9 clean, cf80b8711
x #1278 31f942700 clean, a784d8d29
x #1282 e91c57e96 clean, e10cc510c
x #1225 old head 73c9f57e8 conflicts in adopt-project.py and tests/test_adopt_plan_and_remote_paths_spelled.py
4552efa6a x 73c9f57e8 conflicts in the test file only
x #1225 current head bdaf3ed1d clean, 86c793640
370a23cd2 x bdaf3ed1d clean, b09bebff7

My conflicted trees for 73c9f57e8 differ from FX1281's (203d3c55d / 682c7d0ed). Conflicted trees depend on how the inputs are named, and the body does not cite them.

6. Body draft against the live body

  • The live body I fetched now is cmp-equal to body-live-fx1281.md.
  • The draft has no non-ASCII line above the robot line. Its only closing keyword is Closes #1199, and the Lane line and robot line are in place.
  • Every changed line number is right. On main 4552efa6a they read: kind 6828, mode 6849, leg 7364, id 7198, derived id 7184, _not_the_source 18175. Each points at the same statement the old number pointed at on 42308f26b.
  • The changed claims check out: the merge commit, its parents and the three hunks; "nothing else conflicted"; the resolution being byte-equal; 365/371 lines; the trees edf792618, a784d8d29, e10cc510c and cf80b8711; and every gate figure.

Findings

Mutants

None; this round did not call for them.

CI on 9aabd8afe (gh pr checks)

tests pending; SonarCloud pass; package pass; tests-git-bash pass; Sourcery skipping.

What is left (lane 3)

  1. Make SHOULD-1 and SHOULD-2 in /workspace/projects/openRepoShape-worktrees/_lane3-scratch/W1199-scratch/body-new-fx1281.md, rebuilt on a freshly re-read live body:
    gh pr view 1281 -R opensoft/openRepoShape --json body --jq .body
  2. Apply it:
    gh pr edit 1281 -R opensoft/openRepoShape --body-file /workspace/projects/openRepoShape-worktrees/_lane3-scratch/W1199-scratch/body-new-fx1281.md
  3. Check the closing references still read [1199]:
    gh pr view 1281 -R opensoft/openRepoShape --json closingIssuesReferences
  4. Wait for tests on 9aabd8afe, then do the landing refresh and H0 against main 370a23cd2 or newer (the merge is clean, tree 32f3959e2).

Paths

  • Clone: /workspace/projects/openRepoShape-worktrees/_lane3-scratch/RV1281 (clean, detached at 9aabd8afe).
  • Scratch: /workspace/projects/openRepoShape-worktrees/_lane3-scratch/RV1281-scratch. New files there:
    • /workspace/projects/openRepoShape-worktrees/_lane3-scratch/RV1281-scratch/RV1281c-words.py (the ast comparison)
    • /workspace/projects/openRepoShape-worktrees/_lane3-scratch/RV1281-scratch/RV1281c-probe-c.py and its log RV1281c-probe-c.log
    • /workspace/projects/openRepoShape-worktrees/_lane3-scratch/RV1281-scratch/RV1281c-probe-c2.py and its log RV1281c-probe-c2.log
    • /workspace/projects/openRepoShape-worktrees/_lane3-scratch/RV1281-scratch/RV1281c-three.log
    • /workspace/projects/openRepoShape-worktrees/_lane3-scratch/RV1281-scratch/RV1281c-d-old.txt and RV1281c-d-new.txt
    • /workspace/projects/openRepoShape-worktrees/_lane3-scratch/RV1281-scratch/RV1281c-body-live-now.md
  • Probe work folders and the basetemp, which I left in place: /tmp/claude-1000/l3bt/RV1281c-probe, /tmp/claude-1000/l3bt/RV1281c-probe2, /tmp/claude-1000/l3bt/RV1281c-probe4, /tmp/claude-1000/l3bt/RV1281c-three.
  • No process of mine is still running.

Lane 3 applied SHOULD-1, SHOULD-2, NIT-1, NIT-2 and NIT-4 to the body at about 23:03Z, from the review's own wording, on the live body. Main was still 370a23cd2, and the head's merge with it is tree 32f3959e2. closingIssuesReferences reads [1199]. NIT-3 is not taken, as the review advises. #1281 is READY again in its 12th place, and it lands once tests passes on 9aabd8afe.

@sonarqubecloud

Copy link
Copy Markdown

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