From 4b51675596541713165da122910def6b32bc3a26 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Thu, 26 Nov 2026 10:20:46 +0100 Subject: [PATCH 1/4] Add two testing rules: assert the exception exists, filter after fixups --- docs/reading-cost.md | 13 +++++++++++++ principles/technical-principles.md | 2 ++ 2 files changed, 15 insertions(+) diff --git a/docs/reading-cost.md b/docs/reading-cost.md index 9d7c2652..02047e31 100644 --- a/docs/reading-cost.md +++ b/docs/reading-cost.md @@ -3648,3 +3648,16 @@ Read most (opens and searches): - `bin/task_bench/plant.py` 2 - `bin/task_bench/runs.py` 2 - `docs/decisions.md` 2 + +## Reading cost, chunk d1dab3385426, finished 2026-11-26T09:20:19Z + +581672 new input tokens before the first commit. + +Read most (opens and searches): + +- `README.md` 5 +- `bin/project_config/main.py` 2 +- `bin/project_config/settings.py` 2 +- `bin/task_bench/bench_folder.py` 2 +- `bin/task_bench/feature_tasks.py` 2 +- `docs/decisions.md` 2 diff --git a/principles/technical-principles.md b/principles/technical-principles.md index 95e988a9..7a55e9b1 100644 --- a/principles/technical-principles.md +++ b/principles/technical-principles.md @@ -30,6 +30,7 @@ * Make invalid states unrepresentable. - Example: using a time-only type in the database when we actually want to store a time of day introduces risk for errors. - A function's inputs too: take only inputs that cannot disagree, instead of checking that they agree. BANNED: a test helper that takes a token and a message, and checks that the message holds the token. GOOD: the helper makes the token and builds the message. When a review finds a second edge case in a check, change the signature so the input can't occur. + - A data importer's filter on a field reads the value after the importer's fixups for that field, or exempts the rows they fix. BANNED: dropping source rows with an empty `population` before a fixup fills in `population` for one of them. GOOD: apply the fixups, then filter. * Always store timestamps as full ISO datetime in UTC. - Always communicate timestamps as full ISO datetime in UTC from APIs with database access. * Always grant explicit access to data, both read and write. @@ -55,6 +56,7 @@ - Pin wording only where the wording is the contract: a message a consumer parses, a published format. For prompts, help and error text, assert the facts the text must carry — an item ID, a model argument, an error code — not the sentence. BANNED: `assertIn("", prompt)`. GOOD: `assertIn("model opus, effort high", prompt)`. - One behaviour per test, named for it, tested once, at the lowest level that reproduces it. No loops or branches in a test body; parametrize the cases. - A test doesn't decide at run time whether to check anything: no conditional skip, early return, or catch around its assertions. A test that needs a state creates it, or fails and names what is missing. BANNED: `test.skip(created.every((count) => count === 0))` after the payroll run under test, since a broken payroll also creates zero rows. GOOD: before running the payroll, check each precondition and fail naming the one that is missing; after it, `expect(created).toEqual([1, 2, 1])`. + - A test that scans rows for an exception also asserts that the exception exists, or it passes when the exception is missing. BANNED: looping over every row and asserting that only the row named `X` has an empty cell, which passes when the table has no row `X`. GOOD: collect the rows with an empty cell, then `assertEqual(["X"], collected)`. - Every escaped bug becomes a test that fails without its fix. - Write no test that no real bug could fail: a constant's value, a list's length, the framework's own behaviour. - A test neither sleeps nor asserts on the wall clock, and seeds any randomness. -- 2.52.0 From a929e2ccc08953dc24ede2178af0aaef823ae5f5 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Thu, 26 Nov 2026 10:22:54 +0100 Subject: [PATCH 2/4] =?UTF-8?q?Answer=20stability=20round=201:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=201=20=F0=9F=9F=A1=20(0=20misread);=20keep=20a=20?= =?UTF-8?q?blanked=20row?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- principles/technical-principles.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/principles/technical-principles.md b/principles/technical-principles.md index 7a55e9b1..bde9eb8c 100644 --- a/principles/technical-principles.md +++ b/principles/technical-principles.md @@ -30,7 +30,7 @@ * Make invalid states unrepresentable. - Example: using a time-only type in the database when we actually want to store a time of day introduces risk for errors. - A function's inputs too: take only inputs that cannot disagree, instead of checking that they agree. BANNED: a test helper that takes a token and a message, and checks that the message holds the token. GOOD: the helper makes the token and builds the message. When a review finds a second edge case in a check, change the signature so the input can't occur. - - A data importer's filter on a field reads the value after the importer's fixups for that field, or exempts the rows they fix. BANNED: dropping source rows with an empty `population` before a fixup fills in `population` for one of them. GOOD: apply the fixups, then filter. + - A data importer's filter on a field never drops a row the importer's own fixups complete. A fixup is a hand-written correction to one source row. Filter after applying the fixups, and exempt a row whose fixup leaves the field empty on purpose. BANNED: dropping source rows with an empty `population` before a fixup fills in `population` for one of them. GOOD: apply the fixups, then filter. * Always store timestamps as full ISO datetime in UTC. - Always communicate timestamps as full ISO datetime in UTC from APIs with database access. * Always grant explicit access to data, both read and write. @@ -56,7 +56,7 @@ - Pin wording only where the wording is the contract: a message a consumer parses, a published format. For prompts, help and error text, assert the facts the text must carry — an item ID, a model argument, an error code — not the sentence. BANNED: `assertIn("", prompt)`. GOOD: `assertIn("model opus, effort high", prompt)`. - One behaviour per test, named for it, tested once, at the lowest level that reproduces it. No loops or branches in a test body; parametrize the cases. - A test doesn't decide at run time whether to check anything: no conditional skip, early return, or catch around its assertions. A test that needs a state creates it, or fails and names what is missing. BANNED: `test.skip(created.every((count) => count === 0))` after the payroll run under test, since a broken payroll also creates zero rows. GOOD: before running the payroll, check each precondition and fail naming the one that is missing; after it, `expect(created).toEqual([1, 2, 1])`. - - A test that scans rows for an exception also asserts that the exception exists, or it passes when the exception is missing. BANNED: looping over every row and asserting that only the row named `X` has an empty cell, which passes when the table has no row `X`. GOOD: collect the rows with an empty cell, then `assertEqual(["X"], collected)`. + - A test that scans rows for the one row that breaks a pattern also asserts that the row exists, or it passes when the row is missing. BANNED: looping over every row and asserting that only the row named `X` has an empty cell. GOOD: collect the names of the rows with an empty cell, then `assertEqual(["X"], names)`. - Every escaped bug becomes a test that fails without its fix. - Write no test that no real bug could fail: a constant's value, a list's length, the framework's own behaviour. - A test neither sleeps nor asserts on the wall clock, and seeds any randomness. -- 2.52.0 From d97709eccdb2cec3f11c78c7edf12b56f006a595 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Thu, 26 Nov 2026 10:22:58 +0100 Subject: [PATCH 3/4] =?UTF-8?q?Answer=20prose=20round=201:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=202=20=F0=9F=9F=A1=20(0=20misread);=20reword=20bo?= =?UTF-8?q?th=20rules,=20define=20fixup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -- 2.52.0 From 9eea738d5733fdf5f9e4064bbe811b1b8b79c95f Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Thu, 26 Nov 2026 10:23:12 +0100 Subject: [PATCH 4/4] Finish item 543 in the plan --- CHANGELOG.md | 1 + todo.md | 10 ---------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3fe7fa8d..a53cab5a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Unreleased +- Testing principles now say that a test scanning rows for an exception asserts the exception exists, and that a data importer does not drop a row its own fixups complete. - task-bench leaves out of a fix a change Haiku makes to a Rust test module that stands in the file of the code it tests, and passes over a Rust mutant whose test modules it cannot tell apart. - loop-claude starts a chunk on a fresh session where its session's transcript is empty, in place of resuming a session claude cannot find, which failed three times and waited for the human. - larv-review's prose pass takes a second round after a fix that rewrites a claim a command or a source file can check, such as generated output, a number or a licence term. diff --git a/todo.md b/todo.md index 93ca8197..e5cdabae 100644 --- a/todo.md +++ b/todo.md @@ -12,7 +12,6 @@ | ID | Release | Blocked by | Exempt | Item | L | E | I | R | S | Moves | Score | |---|---|---|---|---|---|---|---|---|---|---|---| -| 543 | 0.16.0 | | | **Add to the testing principles that a test scanning rows for an exception asserts the exception exists, and that a data importer does not drop a row its own fixups complete.** | 1 | 2 | 3 | 4 | 2 | 1.1 by 3 | 1.2 | | 527 | 0.16.0 | | owner | **Plant bugs for `task-bench` in TypeScript, from the mutants Stryker kills.** | 3 | 2 | 1 | 4 | 4 | 1.1 by 1 | 0.3 | | 528 | 0.16.0 | | owner | **Plant bugs for `task-bench` in PHP, from the mutants Infection kills.** | 3 | 2 | 1 | 4 | 4 | 1.1 by 1 | 0.3 | | 525 | 0.16.0 | | owner | **Write fejkdata's first five source-data tasks for `task-bench`, each a seeded register for a made-up country, a spec, a checker and a reference patch, in the `bench-tasks` folder its config names.** | 3 | 2 | 1 | 4 | 7 | 1.1 by 3 | 0.3 | @@ -113,15 +112,6 @@ ## Details -### 543. Add to the testing principles that a test scanning rows for an exception asserts the exception exists, and that a data importer does not drop a row its own fixups complete. - -Two findings an outside reviewer raised on a data change that our review missed: - -- A test scanned every row of a shipped table and asserted that exactly one named row held an empty cell. It passed when the table had no such row at all, since the loop never met it. A test that scans for an exception must also fail when the exception is absent. -- An importer filtered source rows on a field before applying its fixups for that field, so a fixup that blanked the field on one row could not keep the row once the source left it empty. A filter on a field reads the value after the fixups, or exempts the fixed-up rows. - -Put the first in `principles/technical-principles.md` under tests ("each test earns its keep"), and the second beside the rule on inputs that cannot disagree or in stability-reviewer's checks. Where a deterministic check can find the first, such as a mutant that deletes the exception's row, prefer that over prose. - ### 527. Plant bugs for `task-bench` in TypeScript, from the mutants Stryker kills. Stryker runs over the changed lines only today. Run it over the files that hold the seats' places, at the tree's top without git, and turn each killed mutant into the lines it changes, read from its JSON report. Tell Haiku the failure the project's test runner prints, without the test's name or file. Check the module against the tool's real output on a small project in a container, since this repo holds no TypeScript. -- 2.52.0