From 509f2f9f4a68b2d932f11d3e195844572438077e Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Wed, 2 Dec 2026 00:04:00 +0100 Subject: [PATCH] =?UTF-8?q?Answer=20product-owner=20round=201:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=201=20=F0=9F=9F=A1=20(0=20misread);=200=20?= =?UTF-8?q?=F0=9F=94=B4,=201=20=F0=9F=9F=A1=20(0=20misread);=20say=20the?= =?UTF-8?q?=20indentation=20fact=20counts=20the=20first=20200=20code=20fil?= =?UTF-8?q?es,=20and=20add=20mutate-changes'=20changelog=20entry?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + bin/chunk_preflight/facts.py | 4 ++-- bin/chunk_preflight/indentation.py | 2 +- bin/chunk_preflight/main.py | 4 ++-- bin/chunk_preflight/test_chunk_preflight.py | 4 ++-- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a255d9d..98a4d249 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ - stability-reviewer checks the neighbours of each input shape a change starts to handle against what the base made of them. - stability-reviewer lists every caller of a shared function, generator or iterator whose output the diff changes, and states what each does with the new case. - task-bench leaves out of a fix a change Haiku makes to a PHP test named `*Test.php` or a JavaScript or TypeScript test that `node --test` finds by a name such as `*-test.js`, and plants no bug in such a file. +- mutate-changes takes a PHP file named `*Test.php`, and a JavaScript or TypeScript file that `node --test` finds by a name such as `*-test.js`, as a test, and no longer mutates it. - `chunk-preflight` names the next release's items that have no `Touches:` list, where the release holds other items, and the worker of the next item's chunk has one subagent write the lists before its chunk, so other chunks can start beside it. `rank_todo.py --check` warns of such items, still exiting 0. - Technical principles: a function keeps a copy of an argument it retains, and a size limit counts every cell the code allocates, empty ones too. - larv-review's security pass and stability-reviewer now check that the doc beside a new secret or token names what the credential can reach, such as the other repositories its owning account can use, not only what the change uses it for. diff --git a/bin/chunk_preflight/facts.py b/bin/chunk_preflight/facts.py index 4cd5d5f0..73549a61 100644 --- a/bin/chunk_preflight/facts.py +++ b/bin/chunk_preflight/facts.py @@ -8,7 +8,7 @@ from forge.commands import Forge from chunk_preflight.gathered import Gathered, ItemFacts, NamedPath, Ran from text_files.markdown_text import listed, quoted from chunk_preflight.choices import PULLS_LIST -from chunk_preflight.indentation import SpaceIndented +from chunk_preflight.indentation import SAMPLE, SpaceIndented from plan.touches import unpredicted, without_a_list from plan.release import version @@ -46,7 +46,7 @@ def indentation_lines(found: SpaceIndented | Failure | None) -> list[str]: return [f"- Whether the project's code is space-indented cannot be read: {found.reason}"] if found is None: return [] - return [f"- The project's code is space-indented ({found.spaced} lines against {found.tabbed} with tabs), and neither an `.editorconfig` with `indent_style` nor a formatter setting (`rustfmt.toml` `hard_tabs`, Prettier `useTabs`, Biome `indentStyle`) sets the indent. The technical principles, under “Indent with hard tabs by default”, say what overrides that. Don't reindent in a chunk with another purpose. Where the plan holds no item for either way out, file one: convert the code to tabs, or record the override in `.editorconfig` and a decision."] + return [f"- The project's code is space-indented ({found.spaced} lines against {found.tabbed} with tabs, in the first {SAMPLE} code files git lists), and neither an `.editorconfig` with `indent_style` nor a formatter setting (`rustfmt.toml` `hard_tabs`, Prettier `useTabs`, Biome `indentStyle`) sets the indent. The technical principles, under “Indent with hard tabs by default”, say which settings override the tabs. Don't reindent in a chunk with another purpose. Where the plan holds no item for either way out, file one: convert the code to tabs, or record the override in `.editorconfig` and a decision."] def last_release(default: str, release: LastCut) -> str: diff --git a/bin/chunk_preflight/indentation.py b/bin/chunk_preflight/indentation.py index 26f6a924..2b8ace4d 100644 --- a/bin/chunk_preflight/indentation.py +++ b/bin/chunk_preflight/indentation.py @@ -23,7 +23,7 @@ SETTINGS = ( # Two spaces is the narrowest space indent; a lone leading space aligns a comment's continuation. SPACED_LINE = re.compile(r"^ {2,}\S", re.MULTILINE) TABBED_LINE = re.compile(r"^\t+\S", re.MULTILINE) -# How many code files are counted. chunk-preflight runs for every chunk, and a client's repo may hold tens of thousands of files; the first 200 +# How many code files are counted. chunk-preflight runs for every chunk, and a client's repo may hold tens of thousands of files; the first that git lists # tell which indent most of the code uses. SAMPLE = 200 diff --git a/bin/chunk_preflight/main.py b/bin/chunk_preflight/main.py index 768dbf37..03969a78 100644 --- a/bin/chunk_preflight/main.py +++ b/bin/chunk_preflight/main.py @@ -21,8 +21,8 @@ and prints that the release reviews and the cuts are the human's to call. It pri finished on the branch of an open pull request that is not a draft, where the checkout holds the plan. Where no item of the release can start and one awaits such a merge, it names those pull requests and says the working loop stops there; -- where the project's tracked code (files of common programming languages, by extension; not - Markdown, JSON or YAML, nor anything under vendor/, node_modules/ or third_party/) has more +- where the first 200 files git lists of the project's tracked code (files of common programming languages, by extension; not + Markdown, JSON or YAML, nor anything under vendor/, node_modules/ or third_party/) hold more space-indented than tab-indented lines, and neither an `.editorconfig` with `indent_style` nor a formatter setting (`rustfmt.toml` `hard_tabs`, Prettier `useTabs`, Biome `indentStyle`) sets the indent, one line naming the technical principles' hard-tabs default and the two ways out. It diff --git a/bin/chunk_preflight/test_chunk_preflight.py b/bin/chunk_preflight/test_chunk_preflight.py index 2f604294..5245bc1e 100644 --- a/bin/chunk_preflight/test_chunk_preflight.py +++ b/bin/chunk_preflight/test_chunk_preflight.py @@ -810,7 +810,7 @@ class IndentationFact(unittest.TestCase): def test_names_the_counts_the_principle_and_the_two_ways_out(self): (line,) = self.said(SpaceIndented(spaced=120, tabbed=3)) - self.assertIn("space-indented (120 lines against 3 with tabs)", line) + self.assertIn("space-indented (120 lines against 3 with tabs, in the first 200 code files git lists)", line) self.assertIn("under “Indent with hard tabs by default”", line) self.assertIn("file one: convert the code to tabs, or record the override in `.editorconfig` and a decision", line) @@ -826,7 +826,7 @@ class IndentationFact(unittest.TestCase): spaced.commit(spaced.root, "spaces") done = spaced.preflight() self.assertEqual(done.returncode, 0, done.stderr) - self.assertIn("- The project's code is space-indented (2 lines against 0 with tabs)", done.stdout) + self.assertIn("- The project's code is space-indented (2 lines against 0 with tabs, in the first 200 code files git lists)", done.stdout) spaced.write(spaced.root, ".editorconfig", "[*]\nindent_style = space\n") spaced.commit(spaced.root, "setting") self.assertNotIn("space-indented", spaced.preflight().stdout)