Repository navigation
tests/test_bom_tool_io.py: the byte-order-mark rows hold each tool's own read and write and that only U+FEFF is cut, so a utf-8-sig read that drops the mark and a cut that also takes spaces no longer survive (#1176) - #1188
Conversation
…own read and write and that only U+FEFF is cut, so a `utf-8-sig` read that drops the mark and a cut that also takes spaces no longer survive (#1176) #1050's rows (tests/test_bom_rewrites.py) hold what the three line rewriters return. They do not hold the tools' own read and write, nor that the cut in front of line 1 takes U+FEFF and nothing else, so rv1050's five mutants (`utf-8-sig` at `_repin`'s two reads and at `_leg_pin_text`'s read, and an `lstrip` that also cuts spaces and line feeds in `_marks_off` and in `rewrite_pin`) each passed the whole file set that reads a pin. The new file runs update-shape.py's `_repin` and bump-leg.py's `_leg_pin_text`, `rewrite_pin` and `write_lf` over a file that starts with 0, 1 or 2 marks, and each tool end to end (`update-shape.py apply` against a local `--upstream`, and `bump-leg.py`). It asserts that the marks are written back exactly and that every byte after them is the rewrite, that another zero-width or format character as the second character stays (refused in front of the key, written back in front of a key of its own), that a space, a tab or a whole file indented two spaces is refused as it was before #1050, and that a mark that is the second character of a comment is text. No tool code changes: no row showed a fault. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Reviewer's GuideAdds 120 regression tests covering the complete BOM lifecycle in File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
… the spec leg on a branch of their own, so the full suite no longer pushes `bump-leg-advance` twice and tests/test_bump_leg.py's 47 setup errors are gone (#1176) CI's full suite on #1188 (tests.yml run 39861510476) gave 47 setup errors in tests/test_bump_leg.py. This file imported test_bump_leg.py's module-scoped fixture `advanced`, and a module-scoped fixture runs once for every module that names it. Both runs push HEAD to the branch `bump-leg-advance` of the session's one shared remote, so the second push was refused as non-fast-forward: this file sorts first, and test_bump_leg.py's own `advanced` was the one refused. The gates run one file at a time and could not see it. The file now has its own module-scoped `advanced`, which pushes to `bom-tool-io-advance`, as the other modules that advance the spec leg do (test_bump_leg_unreadable.py, test_bump_leg_unopenable.py and others). Nothing else the file imports writes shared state: `upstream_and_project` builds in its own tmp paths and `tools` only loads two modules. All 120 rows are kept and the tools are untouched. tests/test_bom_tool_io.py, tests/test_bump_leg.py and tests/test_update_shape.py in ONE pytest: 218 passed, 47 errors at aa0275b, 264 passed, 1 skipped with this change. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
(lane openRepoShape-3, 2026-10-23T07:48:07Z) Independent review (RV1188, opus, ruling 8) of #1188 at SHOULD-1,
NIT-1,
NIT-2, the body's Merges.
NIT-3, :445 and :462 retype "has 0 Observation, nothing for this PR:
Checked:
Lane: openreposhape-3 (openRepoShape-3) |
…used in each tool's words as one behind a mark is, the compared pair of files is named before it is asserted, and the retyped refusal words are the finders' own (#1176) RV1188's review of #1188, from the head 024084b: SHOULD-1 (SonarCloud python:S3415, "Unify assertion argument order in this file"): the one assert with a bracketed tuple on the left was `assert (pin.read_bytes(), manifest.read_bytes()) == before`, the shape #131 (d682127) fixed. The pair is now bound to `now` and compared as `assert now == before`. Not `after`, which is a function in this file. Every other `==` assert has the value read on the left; the `in` asserts keep the text looked for on the left, as `in` reads. NIT-1: the module docstring, the row's docstring and the PR body said a space or a tab in front of the key was held "before a mark or after one", and the rows held no mark and one mark in front of it. A space or a tab in FRONT of a mark is now a row for each of the three files: refused unchanged by each tool's own code (update-pin-unrecognised, update-manifest-no-shape, bump-leg-pin-unrecognised), as the reader refuses it. Six rows more (126 in all), and the places are named in LEAD_PLACES. NIT-3: the two end-to-end refusal rows retyped "has 0 `commit` line(s)"; they now use FINDERS["shape-pin-commit"].refused and FINDERS["leg-pin-commit"].refused, as the in-process rows do. The tools are untouched. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
|
(lane openRepoShape-3, 2026-10-23T08:30:48Z) Delta review (RV1188, opus) of #1188's second fix round: head Verdict: READY. All four findings from the review of
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 10 hours and 26 minutes by commenting |
…t's bootstrap.py under a Latin-1 locale it builds, over `tb\udcffx`, at each place step (a) asks whether HEAD is on the tracking branch (#1283) 30 rows. Each runs `bootstrap.py --skip-validators` in a child under the locale it names, so a suite under UTF-8, as CI's is, measures Latin-1. The locale is built by this module's own module-scoped `latin1` fixture with `localedef -c`, not imported from `test_adopt_one_byte_locale.py` (#1188); where none can be built the Latin-1 rows skip with `localedef`'s words. - the first run and every later run, over `tb\udcffx` under Latin-1, UTF-8 and ASCII, over `feature/x` and U+00FF itself under Latin-1, and over `caf\udcc3\udca9` under all three; - a failing post-checkout hook where nothing moved, a branch behind the pin (HEAD on it, and detached at the new pin), a branch past the pin moved back, a branch with a commit of its own, and HEAD on the branch with no commit yet, each under Latin-1 and UTF-8. Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…blems against its source, in the order a person mends them (another repository, a refused name, a moved source, an unanswered entry), so `check`'s first finding is `execute`'s refusal for each pair (#1113) (#1210) **Stacked on #1125.** This PR's base is `fix/1020-bad-id-first-problem` (#1125's branch, head `9549006f`). It lands after #1125 and stays a draft until then. #1125 makes `check`'s first finding `execute`'s first refusal for a bad `id:` or `org:`. This PR extends that rule to the four pairs #1113 measured, which have neither. **Fix round.** The first gate failed six rows of `tests/test_adopt_relative_submodule_url.py` that pinned `check`'s old order on a plan hand-edited into another organisation, the relative url before `plan-not-the-source`, a plan `execute` already refused `plan-not-the-source` first on #1125's head; they now expect `plan-not-the-source` first, and a new row asserts that both commands name it first. ## The rule and the order One generator, `_against_its_source`, asks a plan's four problems against its source in one order, and both commands read it. `execute` refuses its first problem. `check` lists each one, in that order and in its own words, before the split branch and the entries. The order is the one a person mends them in: 1. a plan for another repository (`plan-not-the-source`); 2. a name the naming policy refuses (`naming-unclassified`, or `naming-role-mismatch`); 3. a source that has moved on since `plan` (`plan-stale`); 4. an unanswered entry (`plan-unresolved`). Why this order: - **An unanswered entry last.** Each of the first three is mended by running `plan` again, as its remediation says, and a fresh plan takes back every answer given before. An answer given first would be lost. - **Another repository first.** Nothing in such a plan is this source's own: it is mended by `plan` under the source's own name, or from the source it is about. And `execute` must ask the naming policy nothing about the plan's names, and no remote anything, before it refuses it (#499). `_against_its_source` is a generator, so `execute` asks nothing after the first problem, and that still holds. - **A refused name before a moved source.** The name is mended by `plan` given another `--project`, or after the source is renamed on GitHub. That run reads the source as it is now, so it mends the moved source too. `plan` run again as it was, for the moved source, would leave the name to mend. - **The least change to each command.** The order keeps `execute`'s order for the plan's names (#499, #716) and `check`'s order of a moved source before its entries. Only the pairs that disagreed change. ## Before and after Measured on #1125's head `9549006f` and on this head, with a stub `gh` (exit 97), `GH_TOKEN=bogus`, an empty `GH_CONFIG_DIR`, `GIT_SSH_COMMAND=false`, a proxy that goes nowhere, an empty global git config and `--local-remote-dir`. No run made a leg. `check` exits 1 and `execute` exits 2 in every row. | The plan holds | `check` before | `execute` before | both, here | |---|---|---|---| | a moved source and an unanswered entry (#1113) | `plan-stale` | `plan-unresolved` | `plan-stale` | | another repository and an unanswered entry (#1113) | `plan-unresolved` | `plan-not-the-source` | `plan-not-the-source` | | another repository and a moved source (#1113) | `plan-stale` | `plan-not-the-source` | `plan-not-the-source` | | a refused name and an unanswered entry (#1113) | `plan-unresolved` | `naming-unclassified` | `naming-unclassified` | | a refused name and a moved source (not in #1113's table) | `plan-stale` | `naming-unclassified` | `naming-unclassified` | | all four | `plan-stale` | `plan-not-the-source` | `plan-not-the-source` | | another repository and a refused name | `plan-not-the-source` | `plan-not-the-source` | `plan-not-the-source` (unchanged) | The fifth row is not in #1113's table, but the two commands disagreed there too, and the same rule decides it. The same probe, comparing each command's output before and after, with paths and hashes masked: - A plan with one of the four problems: both commands print the same stderr and stdout before and after. - Both commands' stdout is the same before and after in every row. - `check`'s stderr in each pair row holds the same lines as before, reordered: the same findings and the same remediation lines. - `execute`'s stderr changes in one row only, a moved source beside an unanswered entry: `REFUSED plan-stale`, in its own words, where it said `REFUSED plan-unresolved`. No refusal's code or wording changes, and no code is added. Re-run on this head after the fix round, the probe gives the same: the 24 plans (these 11, and the 13 of the next section) each get one first problem from both commands, no run makes a leg, and the comparison with #1125's head is the one above, line for line. ## #1113's suspected case: a `--work-dir` that cannot be written Measured on #1125's head and on this head, the two commands agree in every row, and nothing here changes it: - **A bad `id:` or `org:` beside a `--work-dir` this user cannot write in** (`chmod 500`): `plan-bad-id` or `unsafe-value` to both. #1125's review round 1 (RV1125's SHOULD-1) made both commands ask the two before `_work_root`, which settled this case. - **Each of the 11 plans above beside the same `--work-dir`:** `adopt-work-dir-unwritable` first to both. ## What changed, in `adopt-project.py` - **`_against_its_source` and `_Unmended` (new).** `_against_its_source` is the rule. It asks: - `_refuse_a_plan_for_another_repository`; - `_check_names`, given the source only where the plan names no other repository, as `check` gave it (#716); - `_refuse_an_unrunnable_plan`. It yields each problem as an `_Unmended`: the `Refusal` `execute` refuses it with, and `check`'s FINDING lines and remediation for it, in `check`'s words as they were. `check` lists an unanswered entry with the entries, each by its path (`_leg_findings`), after the rule's problems. - **`cmd_execute`.** It refuses the first problem, `next(_against_its_source(...))`. Before, it called `_refuse_a_plan_for_another_repository`, `_check_names` and `_refuse_an_unrunnable_plan` in turn. - **`cmd_check`.** It lists the rule's findings right after the Triad advisory, where it listed a moved source. Another repository and the names are no longer listed after the entries. Three things are still asked where they were, and only where no name was refused: - the names' classification lines on stdout; - the findings about what the disk or GitHub will not hold (#863); - the leg question (#798). The remediation lines it prints after its findings follow the findings' order, so the rule's come first. - **`_refuse_an_unrunnable_plan`.** It asks a moved source before an unanswered entry. Its docstring says why. - **`_refuse_a_plan_for_another_repository`.** Unchanged. The rule calls it. ## Tests `tests/test_adopt_plan_against_its_source.py` (new, ASCII only), 11 rows. Each runs `check` and then `execute --yes` on one hand-edited plan, both with the same `--local-remote-dir`, and asserts that no leg is made. - **7 pair rows** (the six pairs and all four). Each asserts: - `check` exits 1 and `execute` exits 2; - both name first the same code, the rule's first; - `check` lists every problem the plan holds, in the rule's order. - **4 controls**, one per code: the plan holds that problem alone, and both commands name it. - **Against #1125's head `9549006f`:** - the 6 pair rows that disagreed fail, each because the two commands named different codes, for example `('plan-stale', 'plan-unresolved') != ('plan-stale', 'plan-stale')`; - the `another-and-name` guard row and the 4 controls pass. - **Here:** 11 passed. `tests/test_adopt_relative_submodule_url.py`, 6 rows changed and 1 new (the fix round): - **The 6 rows** are `test_check_keeps_a_relative_url_its_github_leg_resolves_alike` for `[https]`, `[scp]`, `[scp-other-case]`, `[ssh-port]` and `[ssh-github-443]`, and `test_a_credential_in_the_source_remote_is_never_printed`. - Each hand-edits the plan's `org:` to `otherorg`, so the plan names `otherorg/Thing` and the source is `testorg/Thing`: a plan for another repository. - Each expected `check` to list the relative url first and `plan-not-the-source` after it, `check`'s old order. They now expect `plan-not-the-source` first. Their other assertions are unchanged; the credential is still printed nowhere. - **The new row,** `test_check_names_another_repository_first_as_execute_refuses_it`, runs one such plan. It asserts that `check`, with and without `--local-remote-dir`, lists `plan-not-the-source` and then the url, that `execute` refuses `plan-not-the-source`, and that no leg is made. - **Measured on #1125's head** for the six source remotes: `execute` already refused each such plan `plan-not-the-source`, and its output is the same on both heads. Only `check`'s order changed. No spelling of the source's `origin` reads as another repository: with `org:` left as the source's, `check` passes on both heads, as the rows assert. Both files together, 46 rows: - **Against #1125's head:** 13 failed, 33 passed. The 13 are the 6 pair rows above and the 7 relative-url rows, each on the order: `plan-not-the-source` where the url was expected first, or the url first in the new row. - **Here:** 46 passed. ## Mutants Each was applied to `adopt-project.py`, run against both files (46 rows), and restored, with its sha256 checked (`4c8c1c9e`, the same after each one). Unmutated, the 46 pass. M1-M6 are the first round's; M7 and M8 are the fix round's. | Mutant | Killed by | |---|---| | M1, `execute`: `_refuse_an_unrunnable_plan` asks an unanswered entry before a moved source (pair 1) | 2: `moved-and-unanswered`, `all-four` | | M2, `check`: lists another repository after the entries (pair 2) | 11: `another-and-unanswered`, `another-and-moved`, `another-and-name`, `all-four`, and the 7 relative-url rows | | M3, `check`: lists a moved source before another repository (pair 3) | 3: `another-and-moved`, `name-and-moved`, `all-four` | | M4, `check`: lists a refused name after the entries (pair 4) | 3: `name-and-unanswered`, `name-and-moved`, `all-four` | | M5, `check`: lists a moved source before a refused name (pair 5) | 2: `name-and-moved`, `all-four` | | M6, the rule: asks a refused name before another repository (both commands) | 2: `another-and-name`, `all-four` | | M7, `execute`: asks `_refuse_what_check_finds` before the rule | 8: the pair rows but `another-and-name`, the `plan-stale` control, and the new relative-url row | | M8, `check`: lists all the rule's problems after the entries | 14: the pair rows but `another-and-name`, the `plan-stale` control, and the 7 relative-url rows | ## Gate Run on the scratch merge `743ebe176`: `origin/main` `961640c68` plus this head `90eca4144` (tree `d71d6f00a`, never pushed). It ran in the landing gate's own environment (a stub `gh`, `GH_TOKEN=bogus`, an empty global git config, `EMAIL` set, the `LANES_*` and `GIT_SSH_COMMAND` variables unset), one shard at a time, each started with at least 19G free. The ids were collected from that tree, 4405 + 448 = 4853, and each is in exactly one shard. The file list is the 46 test files W1113's gate named and four more, added in the fix round (50 in all): `test_adopt_c_locale_bytes.py` and `test_adopt_submodule_url_answers.py` (they import helpers and the module-scoped `adopter` fixture from the changed test file, so they sit in its shard, r03), `test_reader_refusals_named.py` (it hand-edits a plan's `org:` and checks `check`'s exact findings) and `test_github_name_limits.py`. Every shard exited 0. | Shard | Result | |---|---| | r01 | 600 passed | | r02 | 613 passed | | r03 | 464 passed, 1 skipped (`test_adopt_plan.py::test_plan_on_medxehr_matches_the_rulings`) | | r04 | 547 passed | | r05 | 599 passed, 19 skipped (all in `test_family_init_values.py`) | | r06 | 542 passed | | r07 | 489 passed | | r08 | 531 passed | | d01 to d07 | 56 passed each (`test_shape_doctor.py`) | | d08 | 53 passed, 3 skipped (`test_shape_doctor.py`) | - **r01 to r08:** 4385 passed, 20 skipped (4405 ids). - **d01 to d08:** 445 passed, 3 skipped (448 ids). - **Total:** 4830 passed, 23 skipped, none failed, none errored. Main has moved since this gate: `origin/main` is `ac5f28d2a` (#1188, #1130 and #1098 landed). They change `scaffold-project.py`, `scripts/family.py` and four test files. None of them is a file this PR changes, a module `adopt-project.py` imports, or one of the 50 gated test files, so the gate was not run again on that tip. The merge-trees below were. ## Merge-trees `git merge-tree --write-tree`, run again on 2026-10-23 at 15:31Z against the current `origin/main`, every one clean: - **`origin/main` `ac5f28d2a`:** clean, tree `1a65ab9bd`. - **#1125 `9549006fe`:** clean. This branch is on it. - **#1177 `5208e874e`** (`fix/1152-plan-and-remote-paths-spelled`, which edits a line of `_refuse_a_plan_for_another_repository`): clean, with this head and three-way on the scratch merge. - **Every open PR that touches `adopt-project.py` or either test file, 25 of them, #1125 and #1177 among them:** clean, both with this head and three-way on the scratch merge of `ac5f28d2a` and this head, `98afb128a` (`git merge-tree --write-tree <that merge> <its head>`). Since the first run, #1207 is new, and #1119, #1189 and #1190 have moved; all four are clean. No open PR touches either test file. The list is in a code block, so that it does not mention each PR: ``` PR head with this head on the scratch merge #1105 b28f40d clean (tree 32fce74c6) clean (tree 490f555f9) #1106 504a1dd clean (tree 3abfa1b6a) clean (tree db57682e9) #1118 2307036 clean (tree 79a3888bf) clean (tree 629f167ca) #1119 195d993 clean (tree a2926127e) clean (tree 6aec4c863) #1120 c55e55e clean (tree 6171a52f8) clean (tree 0cb310664) #1121 1c51737 clean (tree 3acb80467) clean (tree 2771fbfd0) #1122 c01c4d7 clean (tree af9a4c414) clean (tree ef00f52f7) #1123 5c3908f clean (tree eb7cb34b3) clean (tree 4c311748b) #1125 9549006 clean (tree 239df6d) clean (tree 1a65ab9bd) #1141 7a2711d clean (tree e1c8f7169) clean (tree 3afeda790) #1143 7af5fab clean (tree 35cd165de) clean (tree aae00cfc7) #1153 ff33ba1 clean (tree 57da668e8) clean (tree f91ce3d8d) #1154 8a78283 clean (tree 28699ba0c) clean (tree 3e6b1ae98) #1169 1e958ca clean (tree e3ef802be) clean (tree f4566b2c4) #1170 24ee133 clean (tree 94b9291c8) clean (tree 848bb0ed0) #1171 8162b87 clean (tree 65ca8196d) clean (tree f15571ef3) #1177 5208e87 clean (tree 08e3d6a62) clean (tree 111f3c238) #1178 c4beba1 clean (tree 646f02266) clean (tree eae3b5996) #1180 b316f41 clean (tree 25b3d4b6f) clean (tree 85a559171) #1186 07486a4 clean (tree d0fe77836) clean (tree 849f0ef41) #1189 a131fc2 clean (tree 5b1ab0620) clean (tree 9851d22b7) #1190 91a937e clean (tree aa83fae05) clean (tree 18101f50b) #1194 900f77a clean (tree 9d74efa35) clean (tree 46317beae) #1198 d38e4e3 clean (tree 87ca21b8c) clean (tree 7fc45a875) #1207 1c7ca5c clean (tree 1dbab659d) clean (tree 1e44c98f0) ``` ## Left for a follow-up (outside #1113) - **An unanswered entry beside an uncovered path still gives two first problems,** filed as #1197. `check` lists `plan-uncovered` first and `execute` refuses `plan-unresolved` first. Measured the same on #1125's head and on this head. `execute` refuses an unanswered entry before `_refuse_what_check_finds`, while `check` lists it in `_leg_findings`, after the paths and the coverage. Other entry findings ahead of it in `_entry_findings` are likely the same (`plan-unsafe-path` among them), and so is the taken split branch, but those were not measured. Closes #1113 Lane: openreposhape-4 (openRepoShape-4) Co-Authored-By: Claude Opus 5.5 <[email protected]>



What changed
A follow-up outside v1.2.0 (Brett Heap, 2026-10-21T10:32:04Z). It lands only after the v1.2.0 tag, on a later merge word.
One new file,
tests/test_bom_tool_io.py(126 rows), and no tool code. #1050's byte-order-mark rows (tests/test_bom_rewrites.py) hold what each line rewriter returns. They do not hold the tools' own read and write, nor that the cut in front of line 1 takes U+FEFF and nothing else, so rv1050's five mutants each passed every file that reads a pin (#1176).update-shape.py's_repin(the shape pin and the manifest, through theRollbackledger) andbump-leg.py's_leg_pin_text,rewrite_pinandwrite_lf(in the order itsmaincalls them) run over a file that starts with 0, 1 or 2 marks. The file written starts with exactly the marks it was read with, and every byte after them is the rewrite. The marks are bytes (codecs.BOM_UTF8), never typed.update-shape.py apply(a local--upstreamonly, never the default GitHub one) on a root whose pin and manifest are committed with the marks, andbump-leg.pyon a leg pin with the marks: both write the marks back, and the project's own gate is green after.Cf) character as the second character (ZWSP, ZWNJ, ZWJ, word joiner, soft hyphen, LRM) stays: in front of the key the file is refused unchanged in each tool's words, and in front of a key of its own it is written back where it was. A space or a tab in front of the key (with no mark, behind a mark and in front of one) and a file indented two spaces on every line are refused as before update-shape.py and scripts/bump-leg.py: the three line rewriters find a first-line key after a byte-order mark, as every reader does, and write the mark back as it was (#933) #1050. A mark that is the second character of a comment is text and is written back.Measured at main (
961640c6)tests/test_bom_rewrites.py+tests/test_bom_reads.py= 37 passed. rv1050's five mutants (utf-8-sigat_repin's two reads and at_leg_pin_text's read; anlstripthat also cuts spaces and line feeds in_marks_offand inrewrite_pin) each pass the six files of the issue (272 passed under each).tests/test_bom_tool_io.py= 126 passed in about 13 s. Each of the five fails 5 to 20 of its rows (table below), and every row passes without them.Mutants
Each is one exact-once edit, run against the 3 or 6 existing files (the BOM files, plus the files that read a pin for M1 to M5 and M19 to M22) and against the new file. The tool file is restored from a saved copy after each and checked with
cmp(22 of 22cmpexit 0;git diffof the tools against HEAD is empty). Runner: W1176's ownmutants.py, in the lane's scratch._repinreads the shape pin asutf-8-sig_repinreads the manifest asutf-8-sig_leg_pin_textreads the leg pin asutf-8-sig_marks_off:lstripalso cuts spaces and line feedsrewrite_pin:lstripalso cuts spaces and line feeds_marks_off: cut widened to everyCfcharacterrewrite_pin: cut widened to everyCfcharacter_marks_off: cut left outrewrite_pin: cut left out_marks_off: cut also applied to the second characterrewrite_pin: cut also applied to the second character_marks_off: cut takes one mark onlyrewrite_pin: cut takes one mark only_marks_off: cut takes every mark anywhererewrite_pin: cut takes every mark anywhere_repinwrites the shape pin asutf-8-sig_repinwrites the manifest asutf-8-sigwrite_lf(bump-leg.py's write) asutf-8-sig_marks_off: a space or a tab in front of the marks is cut first (lstrip(" \t"), then the marks)rewrite_pin: the same cut, in front of the marks, first_marks_off: a space or a tab is cut only where a mark follows itrewrite_pin: the same, only where a mark followsTests
Under a stub
gh(exit 97),GH_TOKEN=bogus, an emptyGH_CONFIG_DIR,GIT_SSH_COMMAND=false, a scratchGIT_CONFIG_GLOBALand[email protected], one pytest at a time. The two lines below are the first two heads', with 120 rows; the third head's gates, with 126, are in Fix round 2:tests/test_bom_tool_io.py tests/test_bom_rewrites.py tests/test_bom_reads.py tests/test_pin_rewrite_layout.py tests/test_repo_hygiene.py tests/test_path_guard_hygiene.py tests/test_no_auto_maintenance.py tests/test_agents_md_codes.py tests/test_cli_reference.py: 550 passed, 2 skipped in 87.26s.tests/test_update_shape.py tests/test_bump_leg.py tests/test_update_shape_apply_lines_and_headers.py tests/test_update_shape_header_comments.py tests/test_bump_leg_dry_run_truth.py(the helpers the new file imports, and the files the issue names): 264 passed, 1 skipped in 200.18s.tests/test_shape_doctor.pyis not run: noshape-doctor.pyor helper changes.Merges
Re-listed live on 2026-10-23 at about 07:52Z and again at 08:21Z (the same eleven PRs at the same heads), and run at
d65340e5b:git merge-tree --write-treeof this head is clean (exit 0) with origin/main (961640c6, frozen until the v1.2.0 tag) and with each of the eleven open PRs that touchupdate-shape.py,scripts/bump-leg.py,scripts/shape_materialize.pyorscripts/repo_shape.py:update-shape.py: update-shape.py:applyputs every byte back under anyOSErrorafter its first write, says what it put back on stderr, and raises the error as it was, so a file gone between itsstatand its read, a broken pipe or anEIOno longer leaves the tree half-written behind a traceback (#1173) #1187 (cc8a87ee93, theapplyrollback of update-shape.py:applyrolls back anOSErrorafter its first write only where the system refused a read, so a file gone between thestatand the read, or an error naming no path, ends in a traceback with the tree half-written #1173, this lane's sibling), validate-manifest.py, validate-family.py, family.py and update-shape.py: anid:, a date or arepository:ending in a line feed is refused by name, and a pin'ssource_repository:that is no path orowner/reponame is named as the pin's (#1139) #1166 (2593952c95), update-shape.py:update-accept-local-missing-nameasks a copy an earlier apply kept, readunchanged, as a module a written copy imports from and as an importer of a written one, so a plain apply that stops either on its import is refused (#1082) #1133 (a7bfee1bdb);scripts/bump-leg.py: bump-leg.py: a tag a leg with nooriginholds without its commit, or through a tag it lacks, is told so, a tag of a tree or a blob it lacks is refused by name, and rows holdYAML_NOT_TEXT_RE's exponents of two digits (#1103) #1131 (55c30f20f0), shape_materialize.py and bump-leg.py: the fetch for a branch's answer leaves out a pattern likerefs/heads*that puts a branch under another name, its clauses move into_left_out, and the docstrings name the clashes left and the way back (#1100) #1157 (baa19972a2, alsoscripts/shape_materialize.py);scripts/shape_materialize.py: scripts/shape_materialize.py:adopt_makefile_block's docstring says the block lands whereplacewrites the shape'sMakefile, the root's orshape/Makefilewhere the source keeps one, not the root's alone (#1135) #1160 (0068f5af8a), adopt-project.py, shape_materialize.py and tests: a named bad link left out of the copy and pin findings takes no other path's finding with it, and the docstrings and the materializer's refusal name the #979 exception and what helps it (#1089) #1118 (2307036abe), shape_materialize.py and the pinned AGENTS-shape.md: where the root keeps aGNUmakefileor amakefile, which GNU make reads first, the Makefile collision follow-up no longer says the shape's make targets arrive with the merge, and the pinned file saysmakereads the first of the three and the block reaches it only once that file holds it (#1048) #1105 (b28f40de09), shape_materialize.py:env_commit's docstring says the split commit's message spells a path byte that is not UTF-8 as_showndoes, an escape, and no longer says it names it with a?in its place, which #900 replaced (#1018) #1104 (de89aa81b1);scripts/repo_shape.py: adopt-project.py and repo_shape.py: a name that holds a default-ignorable character, which a terminal draws as nothing, is spelled by its code point inplan's lines and in theunsafe-valuerefusal, so a branchma<U+034F>inno longer prints asmain(#1128) #1171 (8162b874ec) and repo_shape.py and bootstrap.py:COMMIT_RE,SHA256_REandCOMMIT_40end in\Z, not$, so a pin'scommit:ortree_sha256:that ends in a line break is refused as not 40 or 64 hex by every validator andadopt-project.py(#1017) #1126 (4c1f80cf4d).#1178 no longer touches these files. No open PR touches this file or
tests/test_update_shape.py,tests/test_bump_leg.py,tests/test_bom_rewrites.py,tests/test_pin_rewrite_layout.pyortests/conftest.py, which it imports. The rows were not run on a merged tree: a clean merge is a clean merge of text only.Fix round
CI's full suite on the first head (
aa0275be, tests.yml run 39861510476) gave 47 setup errors, all intests/test_bump_leg.py.tests-git-bash,packageand SonarCloud passed.tests/test_bom_tool_io.pyimportedtests/test_bump_leg.py's module-scoped fixtureadvanced. A module-scoped fixture runs once for every module that names it, and both runs pushHEADtobump-leg-advanceon the session's one shared remote. The file sorts first, sotests/test_bump_leg.py's own push was refused as non-fast-forward. No gate before the push ran the new file in the same pytest astests/test_bump_leg.py, so none could see it.tests/test_bom_tool_io.pyhas its own module-scopedadvanced, which pushes tobom-tool-io-advance, as the other modules that advance the spec leg do (tests/test_bump_leg_unreadable.pyand others). Nothing else the file imports writes shared state:upstream_and_projectbuilds in its own tmp paths andtoolsloads two modules. All 120 rows are kept, and the three end-to-endbump-leg.pyrows still run against a real advance of the leg.gh,GIT_SSH_COMMAND=false,[email protected]:tests/test_bom_tool_io.py tests/test_bump_leg.py tests/test_update_shape.pyataa0275be:218 passed, 47 errors in 64.96s, eachERRORa setup oftests/test_bump_leg.pywith! [rejected] HEAD -> bump-leg-advance (non-fast-forward). The same 47 as CI.264 passed, 1 skipped in 80.64s.mutants.pyre-run at024084b9, each to its end: 18 of 18new rows: KILLED(the kill counts of the first head), 18 of 18cmpexit 0,runner exit 0, andgit diffof the three tool files against HEAD empty.gh:tests/test_bom_tool_io.pywith those five files in ONE pytest, in CI's order and reversed: 384 passed, 1 skipped in 131.44s and 384 passed, 1 skipped in 134.05s.024084b9:git merge-tree --write-treeis clean (exit 0) with origin/main (961640c6) and with update-shape.py:applyputs every byte back under anyOSErrorafter its first write, says what it put back on stderr, and raises the error as it was, so a file gone between itsstatand its read, a broken pipe or anEIOno longer leaves the tree half-written behind a traceback (#1173) #1187, validate-manifest.py, validate-family.py, family.py and update-shape.py: anid:, a date or arepository:ending in a line feed is refused by name, and a pin'ssource_repository:that is no path orowner/reponame is named as the pin's (#1139) #1166, scripts/shape_materialize.py:adopt_makefile_block's docstring says the block lands whereplacewrites the shape'sMakefile, the root's orshape/Makefilewhere the source keeps one, not the root's alone (#1135) #1160, shape_materialize.py and bump-leg.py: the fetch for a branch's answer leaves out a pattern likerefs/heads*that puts a branch under another name, its clauses move into_left_out, and the docstrings name the clashes left and the way back (#1100) #1157, update-shape.py:update-accept-local-missing-nameasks a copy an earlier apply kept, readunchanged, as a module a written copy imports from and as an importer of a written one, so a plain apply that stops either on its import is refused (#1082) #1133, bump-leg.py: a tag a leg with nooriginholds without its commit, or through a tag it lacks, is told so, a tag of a tree or a blob it lacks is refused by name, and rows holdYAML_NOT_TEXT_RE's exponents of two digits (#1103) #1131, adopt-project.py, shape_materialize.py and tests: a named bad link left out of the copy and pin findings takes no other path's finding with it, and the docstrings and the materializer's refusal name the #979 exception and what helps it (#1089) #1118, shape_materialize.py and the pinned AGENTS-shape.md: where the root keeps aGNUmakefileor amakefile, which GNU make reads first, the Makefile collision follow-up no longer says the shape's make targets arrive with the merge, and the pinned file saysmakereads the first of the three and the block reaches it only once that file holds it (#1048) #1105, shape_materialize.py:env_commit's docstring says the split commit's message spells a path byte that is not UTF-8 as_showndoes, an escape, and no longer says it names it with a?in its place, which #900 replaced (#1018) #1104 and adopt-project.py:plan's table pads each name by the columns a terminal gives it, not the code points it holds, so a wide or combining name'slegcolumn lines up underlegwith every other row's (#1034) #1178. No other open PR touchestests/test_bom_tool_io.py.Fix round 2
RV1188's review of
024084b9(issuecomment-6360127603): READY, one SHOULD and three NITs. One new commit,tests/test_bom_tool_io.pyonly; the three tool files are byte-identical to HEAD (cmpagainst saved copies, exit 0).python:S3415("Unify assertion argument order in this file"). The one==assert with a tuple on its left,assert (pin.read_bytes(), manifest.read_bytes()) == before, is nownow = pin.read_bytes(), manifest.read_bytes()andassert now == before, the shape tests/test_naming_policy.py: bind the compared tuple to a name before asserting it, so Sonar's assertion-order rule stops misreading the literal-looking display as the expected side (#130) #131 (d682127d6) fixed. The name isnow, notafter, which is a function in this file. A scan of every assert in the file by syntax tree found no other==with the expected value on the left: theinasserts keep the text looked for on the left, asinreads. The local analyzer does not reproduce the rule, so the result is read on SonarCloud once CI has run on this head.LEAD_PLACES: no mark, behind a mark, in front of one). Each tool refuses it unchanged by its own code (update-pin-unrecognised,update-manifest-no-shape,bump-leg-pin-unrecognised), as the reader does. Six rows more: 126 in all. The module docstring, the row's docstring and the third bullet above say what the rows hold.scripts/repo_shape.pyadded to the files watched.FINDERS["shape-pin-commit"].refusedandFINDERS["leg-pin-commit"].refusedin place of the retyped words.tests/test_bom_tool_io.py,tests/test_bump_leg.pyandtests/test_update_shape.pyin ONE pytest, stubgh,[email protected]:270 passed, 1 skipped in 129.58sin CI's order and270 passed, 1 skipped in 137.65sreversed. With the three other files the issue names (tests/test_bump_leg_dry_run_truth.py,tests/test_update_shape_apply_lines_and_headers.py,tests/test_update_shape_header_comments.py), six files in ONE pytest:390 passed, 1 skipped in 218.42sand390 passed, 1 skipped in 195.71sreversed.tests/test_bom_rewrites.py,tests/test_bom_reads.pyandtests/test_pin_rewrite_layout.py: 278 passed in 21.85s. The hygiene files, each alone:tests/test_repo_hygiene.py101 passed,tests/test_path_guard_hygiene.py49 passed,tests/test_no_auto_maintenance.py58 passed and 2 skipped,tests/test_agents_md_codes.py47 passed,tests/test_cli_reference.py23 passed.mutants.pyre-run at this head, each to its end, and four more for the new rows (M19 to M22): 22 of 22new rows: KILLED, 22 of 22cmpexit 0,runner exit 0. M4 and M5 fail two and one rows more than before. M21 and M22 cut a space or a tab only where a mark follows it, so only the new rows in front of a mark kill them; the six existing files all pass under both.Left out of scope
docs/release-notes/v1.2.0.md(it records v1.2.0's state, known limits included, and is not edited). No milestone.Closes #1176
Lane: openreposhape-3 (openRepoShape-3)
🤖 Generated with Claude Code