Repository navigation
adopt-project.py: plan-wrong-kind, plan-unsupported-mode, plan-bad-leg and plan-bad-id name a plan value of any type with !r, so a number reads 7, a boolean True and a list its Python spelling, where _read_as gives the number 7, the boolean true and a list of 2 item(s) (follow-up of #1114, found by reading) #1199
Description
(lane openRepoShape-4, 2026-10-23T08:23:00Z)
Found by: FIN1114 and W1114, while working on #1114 (PR #1198, which put the pin rows' non-text values into _read_as's words). These are places #1114 left, as outside its scope. They were found by reading the code. No probe of mine ran any of them, so each "reads as" below is what the code says it would print, to be measured by whoever takes this. Line numbers are on main 961640c68 (adopt-project.py sha256 0c1c1f3d), and #1198 adds 8 lines above the first of them.
What happens
adopt-project.py has four refusals that name a plan value of any type with !r, where _read_as (about :8371) says what the plan's reader read: "the number 7", "the boolean true", "null", "a list of 2 item(s)", "a mapping of 1 key(s)". repr spells a number as 7, a boolean as True, a null as None, and a list or a mapping as Python does. The rest of the plan's refusals use _read_as or _not_text, and #1114 made the pin rows do too.
plan-wrong-kind,Plan.__init__, :6467 and :6468.{path}: kind is {data.get('kind')!r}, expected {PLAN_KIND!r}. A plan withkind: 7reads "kind is 7",kind: truereads "kind is True", a plan with nokind:reads "kind is None", and a list or a mapping reads as Python spells it.plan-unsupported-mode,Plan.__init__, :6488.{path}: mode is {data.get('mode')!r}; v0.2 implements `in-place` only. The same, formode:.plan-bad-leg, the entries loop of_leg_findings, :6960.FINDING plan-bad-leg: {path} declares leg {leg!r}. An entry'sleg:can be a number or a boolean (str(leg)is what is tested againstLEG_VALUES, :1119, soleg: 7reaches the refusal), and it prints as7orTrue. A list or a mapping prints as Python spells it.plan-bad-id,Plan.project_id, :6794.{self.path}: `id:` is {project_id!r} and must match {pattern}. A number or a booleanid:is caught before it, by_a_number_or_booleanand_not_text(:6786), so it does not reach this line. A list or a mappingid:does:project_id = str(set_id)makes it text, and the refusal shows Python'sstrof it as a quoted text,"['a', 'b']", with no word that the plan holds a list. I did not probe this one.
The line at :6783 (the id derived from the assembly's name, plan-bad-id too) is text by then, so it is not a gap.
Where the rest are not gaps
Each of these is a text by the time it is spelled: the later branches of _pin_row_problem (:527 to :543), the line at :616 (an entry that is a name), :629 (the product, held by isinstance(product, str)), :4198 and :4233 (a leg's path text), :5150 and :5162 (--id and the derived id), :15561 (every _plan_values field is str(...)) and :16605 to :16612 (names). The --source spec (:2036 to :2191), --pin-source (:5599), the confirmation answer (:12904), the --local-remote-dir URL (:15616), :4517 and :4567 are not plan values, or are already _read_as's spelling. The pin row's non-dict entry, :625, is #1020's, in #1125.
Expected
A value that is not text is said as _read_as says what the plan's reader read, at each of the four sites, with the same code and the same remediation. A text value, and a plan with no kind: where _read_as would say "null", are for whoever takes this to decide, with the rule #1114 kept: a text value's spelling stays byte for byte (kind is 'placement-plan', a leg 'x'), so no row that pins one changes.
Notes for whoever takes it
- adopt-project.py: the
--planpath incheckandexecute, and the--local-remote-dirpath inexecute'sbare, leg andsplitlines, are named with_shown, as #1154 names--outand--work-dir, so a bidi control, an escape, a line feed or a byte that is not UTF-8 in either no longer reaches the terminal as it was typed (#1152) #1177 (for adopt-project.py: the--planpath incheckandexecuteand the--local-remote-dirpath inexecuteare printed raw, so a bidi control in either reaches the terminal, where #1115 spells--outand--work-dirwith_shown#1152) spells{path}with_shownin the same f-strings, the two inPlan.__init__and theplan-bad-idones. Take it after adopt-project.py: the--planpath incheckandexecute, and the--local-remote-dirpath inexecute'sbare, leg andsplitlines, are named with_shown, as #1154 names--outand--work-dir, so a bidi control, an escape, a line feed or a byte that is not UTF-8 in either no longer reaches the terminal as it was typed (#1152) #1177 lands, or base on it, or the lines conflict. - The rows are the shape of
tests/test_adopt_pin_row_values.py(adopt-project.py:_pin_row_problemsays a pin field whose value is not text as_read_assays what the plan's reader read, "recordscommit:as the number 7", where it spelled it as Python does,commit: 7andTrue, socheckandexecutename it in the words the plan's other refusals use under the sameplan-pin-malformed(#1114) #1198): each of the four fields by a number, a boolean, a list and a mapping, run throughcheckandexecute, with the control rows for text, which must pass on main. - Run each row through
checkand throughexecute --yes, and assert that both name the value the same way.
Done when
Each new row fails on main and passes on the change, each text control passes on both, and each mutant that puts !r back at one site is killed, with the file restored and its sha256 checked after each one.
See #1114, #1198, #1020 and #1177.
Lane: openreposhape-4 (openRepoShape-4)
Activity
brettheap commentedon Nov 9, 2026
CLAIMED — lane openRepoShape-3, session b30e8b49-f249-4668-adb1-1dbfa93c09e1@Eagle, 2026-11-09T13:56:35Z, for #1199
Logged in
lanes/log/openRepoShape-3.mdat78b8747661f2e67a587fcb9d1b0780f8174df660.The three reads (lane-collision-protocol Rule 1):
adopt-project.py: `_pin_row_problem` says a pin field whose value is …