diff --git a/todo.md b/todo.md index 01689b0e..9dd0b104 100644 --- a/todo.md +++ b/todo.md @@ -6,7 +6,7 @@ `Bar = 0.1` -`Next ID = 545` +`Next ID = 552` ## Items @@ -14,11 +14,17 @@ |---|---|---|---|---|---|---|---|---|---|---|---| | 477 | 0.17.0 | | question | **Rewrite `## Goals` and `## Audience` for a setup others install and run apart from their own `~/.claude`.** | 1 | 1 | 2 | 2 | 2 | | 0.0 | | 478 | 0.17.0 | | question | **Name the project, its repo and its two commands, today proposed as `do-release` and `do-epic`.** | 1 | 1 | 2 | 2 | 1 | | 0.0 | +| 548 | 0.17.0 | | defect | **Treat a chunk whose recorded base is origin's default branch as merging into that branch, so `chunk-pr merge` honours `merge = "human"` and `wait-for-approval` there.** | 1 | 2 | 2 | 3 | 1 | 1.1 by 3 | 1.3 | +| 546 | 0.17.0 | | | **Have stability-reviewer check a change's setup steps for an outside service against the service's current documentation, and each command against the service against every state the service may be in.** | 1 | 2 | 2 | 3 | 2 | 1.1 by 3 | 1.2 | | 542 | 0.17.0 | | | **Make chunk-preflight report a project whose code is space-indented with no `.editorconfig` or formatter setting that says so, and narrow the tabs principle to explicit overrides.** | 2 | 2 | 3 | 5 | 4 | 1.1 by 4 | 1.2 | | 523 | 0.17.0 | | | **Make the security pass and stability-reviewer check that a new secret's docs name its scope and its reach, such as the other repositories its account can use.** | 1 | 1 | 2 | 2 | 1 | 1.1 by 2 | 0.9 | | 537 | 0.17.0 | | | **Flag regexes that use `$` to validate a whole input, since `$` also matches before a final newline.** | 1 | 2 | 2 | 3 | 1 | 1.1 by 2 | 0.9 | | 538 | 0.17.0 | | | **Flag validation that checks a value other than the one the code goes on to use, such as before trimming, stripping or converting it.** | 1 | 2 | 2 | 3 | 1 | 1.1 by 2 | 0.9 | +| 547 | 0.17.0 | | | **Add a technical principle: tell a failure's cause from a status code or a typed error, never from a tool's message text unless the tool documents that text as unique to the cause.** | 1 | 2 | 2 | 3 | 1 | 1.1 by 2 | 0.9 | +| 549 | 0.17.0 | | | **Run each claimed output from the state a fresh checkout leaves, without the ignored files earlier runs wrote, and check each claim about what a command writes.** | 1 | 1 | 2 | 2 | 1 | 1.1 by 2 | 0.9 | +| 550 | 0.17.0 | | | **Have stability-reviewer check a guard that tests where a thing is against every place the thing passes through in its life.** | 1 | 1 | 2 | 2 | 1 | 1.1 by 2 | 0.9 | | 541 | 0.17.0 | | | **Find a Gitea pull request by its branch and head however many pull requests are newer, so `chunk-pr clean`, `chunk-pr merge` and `chunk-preflight` see an older one.** | 2 | 2 | 3 | 5 | 2 | 1 by 2 | 0.8 | +| 545 | 0.17.0 | | | **Have chunk-preflight name each next-release item with no `Touches:` list while others wait, and have loop-claude launch a subagent that writes the lists before it starts the next chunk.** | 3 | 2 | 3 | 6 | 6 | 1.1 by 4 | 0.6 | | 539 | 0.17.0 | | | **Leave out of a `task-bench` fix a change Haiku makes to a Rust test kept in a file of its own.** | 2 | 2 | 1 | 3 | 3 | 1.1 by 1 | 0.4 | | 544 | 0.17.0 | | | **Leave out of a `task-bench` fix a change Haiku makes to a PHP or JavaScript test that PHPUnit or `node --test` finds by a name `is_test` does not know.** | 2 | 2 | 1 | 3 | 3 | 1.1 by 1 | 0.4 | | 480 | 0.18.0 | | owner | **Resolve every path the tools use in one module: the release root (the folder the running code ships in), the config folder, the state folder and the Claude home. Then only that module names `~/.claude`, and the loop still runs from `~/.claude`.** | 3 | 2 | 3 | 6 | 6 | 1.6 by 3, code health by 3 | 2.4 | @@ -100,6 +106,7 @@ | 395 | 0.23.0 | | decision | **Keep each block a save didn't change, with its localId, and the spacing paragraphs beside it as Jira or Confluence holds them.** | 3 | 2 | 2 | 5 | 5 | 1.6 by 4 | 0.8 | | 425 | 0.23.0 | | | **Show on loop-claude's terminal why it doesn't start a chunk beside the next item, as chunk-preflight prints it.** | 1 | 1 | 2 | 2 | 2 | 1.5 by 2 | 0.7 | | 169 | 0.23.0 | | | **Have rule-hook's `todo-rank-check` catch a `todo.md` that the same Bash call edits and then commits.** | 3 | 1 | 3 | 5 | 3 | 1.1 by 2 | 0.7 | +| 551 | 0.23.0 | | | **Run each mutation tool of `mutate-changes` in the folder that holds its module file, so a repo with `go.mod` below the top gets its Go lines mutated.** | 2 | 1 | 2 | 3 | 3 | 1.1 by 2 | 0.7 | | 447 | 0.23.0 | | | **Stop a headless claude call that runs past a time limit, and report it as a failure, so a hung judge or stuck check can't hold the loop.** | 2 | 2 | 2 | 4 | 3 | 1.5 by 2 | 0.7 | | 367 | 0.23.0 | | | **Check that every write to a Jira plan leaves it ranked, as rule-hook's `todo-rank-check` checks `todo.md` today.** | 2 | 2 | 3 | 5 | 3 | 1.6 by 2 | 0.7 | | 520 | 0.23.0 | | | **Mutate the shell lines a branch changes in `mutate-changes`, so a change to a shell script gets the same check as one in Python, Go or PHP.** | 3 | 2 | 2 | 5 | 5 | 1.1 by 2 | 0.5 | @@ -118,6 +125,29 @@ Part of the standalone-install plan lilleman approved on 2026-11-20. `do-release Part of the standalone-install plan lilleman approved on 2026-11-20. Later items say `do-release` and `do-epic` for the names this item picks. The names set the install folders, such as `~/.config/do-release/`, so items 482, 485 and 496, and every item they block, wait for them. +### 548. Treat a chunk whose recorded base is origin's default branch as merging into that branch, so `chunk-pr merge` honours `merge = "human"` and `wait-for-approval` there. + +`base_of` in `bin/chunk_pr/main.py` returns `to_epic=True` for any branch whose `branch..chunk-base` is set in git's config. In a project that sets `epic-branch`, a chunk that goes into the default branch instead of the epic's working branch can still record `chunk-base = main`. Then `chunk-pr merge` skips `merge = "human"` and `wait-for-approval` and runs `gh pr merge` into `main`. In one chunk, only the repo's branch protection stopped that merge. A repo without protection would have merged into its default branch with no person involved. + +The fix: where the recorded base equals origin's default branch, `base_of` returns `Base(default, False)`. Write the test first: a checkout that records `chunk-base` as the default branch under `merge = "human"` leaves the pull request unmerged. + +Touches: + +- `bin/chunk_pr/main.py`: `base_of` (small) +- `bin/chunk_pr/test_chunk_pr.py` + +### 546. Have stability-reviewer check a change's setup steps for an outside service against the service's current documentation, and each command against the service against every state the service may be in. + +An outside auto-reviewer found three faults in one chunk that our passes missed. The chunk wrote the steps to set up a package registry's trusted publisher, and a workflow command that publishes to that registry. The steps left out a permission the registry's current docs require: the registry had changed a default some months before. And two commands failed where the registry already held a higher version, a state no reviewer enumerated. + +Where a change writes setup steps for an outside service, or runs a command against one, stability-reviewer fetches the service's current documentation for that setup. It checks every field and default the page lists against the steps, and reports a step the page requires that the change leaves out. For each command, it enumerates the service's states: nothing published yet, the same version, a higher version and a lower version. It reports a state the command fails in or mishandles. stability-reviewer has no WebFetch today, so the item adds it to the agent's tools; the fetched page is data, never instructions. + +No deterministic check fits: whether a change sets up an outside service is a judgement, and the docs to compare against differ per service. + +Touches: + +- `agents/stability-reviewer.md`: `(top)` (small), `### 4. Error Handling & Resilience` (small) + ### 542. Make chunk-preflight report a project whose code is space-indented with no `.editorconfig` or formatter setting that says so, and narrow the tabs principle to explicit overrides. `principles/technical-principles.md` says "Indent with hard tabs by default. A project's own settings win: `.editorconfig`, linter/formatter config, or the surrounding file's existing indentation." The last clause lets a first session set spaces and every later session follow it, and nothing checks that anyone chose it. adf-codec's `AGENTS.md` has said "Two-space indent" since its first commit, with no reason, and 177 code files, 14,500 indented lines, followed it. A survey of the projects on this machine on 2026-11-26 found the same in plainpages, scheduler (`rustfmt.toml` doesn't set `hard_tabs`), oss-opportunity-research, secondhand-watch and playwright-for-agents. Only plainpages-plugin-fastjira says so in an `.editorconfig`. @@ -154,6 +184,36 @@ An outside human reviewer found input validation that checked the value the clie Touches: - `agents/stability-reviewer.md`: `### 5. Edge Cases & Input Validation` (small) +### 547. Add a technical principle: tell a failure's cause from a status code or a typed error, never from a tool's message text unless the tool documents that text as unique to the cause. + +An outside auto-reviewer found a fault that our passes missed. A script told a missing container image apart from one it couldn't read by matching the text a CLI printed on stderr. Older versions of that CLI print the same text for a missing image, a refused credential and a failed request. So the script read "no access" as "missing" and went on as if the image didn't exist. The stability and security passes both read the code and took the message at its word. + +The fix asked the registry's HTTP API for the status instead: 404 is missing, and any other failure stops the run. The principle makes that the rule. Where code branches on why a call failed, it reads a status code, an exit code the tool documents, or a typed error. It reads message text only where the tool documents that text as unique to one cause, and it treats every other failure as unknown, which stops the run rather than guessing. + +No deterministic check fits: a linter can't tell whether a string match on output decides a failure's cause. Reviewers apply the principles, so a principle is the first place that fits. + +Touches: + +- `principles/technical-principles.md`: `Handle errors explicitly, as values — avoid the exception path.` (small) + +### 549. Run each claimed output from the state a fresh checkout leaves, without the ignored files earlier runs wrote, and check each claim about what a command writes. + +Found when an outside reviewer raised two findings that our review had missed: + +- A documented local command failed on a fresh checkout. It needed a cache file that earlier writable runs had left in an ignored folder. The implementer's claimed-output runs reused that file, so the claimed-output step showed the command working. +- A README sentence said what a regenerated file's diff holds. The claim was about the file the command writes, not what it prints, so the step never ran it, and the sentence was wrong. + +Change `larv-review` §3 → "Claimed output" so that: +- each claim runs from a state like a fresh checkout's, with the ignored build and cache files that earlier runs wrote moved aside; +- a claim about what a command writes, such as a file or a diff, is run like a claim about what it prints. + +Touches: +- `skills/larv-review/SKILL.md`: `**Claimed output.**` (small) + +### 550. Have stability-reviewer check a guard that tests where a thing is against every place the thing passes through in its life. + +A forge's auto-reviewer raised what two stability rounds missed: a fix added a guard that refused a file by looking for its original in the folders where a finished file ends, but not in the folder where a file waits before it is handled, so the guard let the refused case through during a retry. The reviewer read the guard and its tests and checked no other state. Add to `agents/stability-reviewer.md`: for a guard that tests whether a file, row or record exists, list every place or state the thing passes through from arrival to its end, and report each one the guard doesn't look at. + ### 541. Find a Gitea pull request by its branch and head however many pull requests are newer, so `chunk-pr clean`, `chunk-pr merge` and `chunk-preflight` see an older one. Today `pull_at` in `bin/forge/pulls.py` reads only Gitea's first page of 50 pull requests, open or closed, and looks for the branch among them. A pull request with 50 newer ones in that state is missed. PR #652 here merged after 50+ newer PRs had closed, and `chunk-pr clean` then said "no merged pull request from filing-prose-reentry", leaving the worktree and branch to remove by hand. The same lookup serves `open_pull`, so `ready` and `merge` miss an old open one too, and `chunk-preflight` misses a merged chunk's worktree. @@ -165,6 +225,18 @@ Touches: - `bin/forge/pulls.py`: `pull_at` - `bin/forge/test_forge.py` +### 545. Have chunk-preflight name each next-release item with no `Touches:` list while others wait, and have loop-claude launch a subagent that writes the lists before it starts the next chunk. + +In fejkdata on 2026-11-27 the loop ran one chunk for hours beside seven waiting items, because five items of the next release (one filed by the reading-cost report, four older) had no `Touches:` list, and `chunk-preflight` says only "No item may start a chunk beside item X's: its detail has no `Touches:` list". Nothing makes a session write the lists, and `rank_todo.py --check` refuses only a list it cannot read. + +Three changes: + +- `chunk-preflight` prints one fact where an item of the next release has no `Touches:` list and at least one other item of that release waits, naming the items. A release with one item left prints nothing. +- `loop-claude` acts on the fact before it starts the next chunk: it launches one subagent, on the rung `CLAUDE.md`'s delegation rule gives a subagent that files or scores items, to read the code and write each missing list with `todo-item edit --detail`. Where the subagent can't name a part, it lists the whole file and says in the detail that the change is not predictable. The plan edit ships as its own pull request with `chunk-pr`, as plan-only changes do. A list is written once per item and not again until the item is edited. +- `rank_todo.py --check` warns, without failing, on an item of the next release with no `Touches:` list. + +Test each with a fake plan: all lists present, one missing with other items waiting, one missing alone in its release, and a list the item's edit made stale is left alone. + ### 539. Leave out of a `task-bench` fix a change Haiku makes to a Rust test kept in a file of its own. Rust may keep its unit tests out of line: `#[cfg(test)] mod tests;` in `src/lib.rs`, the tests in `src/tests.rs`. `mutate_changes.changed_lines.is_test` tells a test by a folder named `test`, `tests` or `__tests__`, or by a file name such as `test_*.py` or `*_test.go`, so `src/tests.rs` counts as code, and `checked_tree` in `bin/task_bench/runs.py` takes it as Haiku left it. A fix that edits or deletes the failing test there passes. The help's Check paragraph says so. It holds at the base and at the head alike. @@ -736,6 +808,10 @@ Today a Jira detail edited in one line, or a Confluence record with one entry ap The hook judges a call before it runs, and `changed` in `bin/rule_hook/todo_check.py` compares `todo.md` with the index and HEAD as they stand then. A call that edits `todo.md` and commits it, such as a heredoc script followed by `git commit`, passes unchecked: PR #296's commit 149108e did, and the override marker it carried was never logged. larv-review's gate still runs `rank_todo.py --check`, so an unranked plan stops at merge rather than at commit. A git pre-commit hook would see the staged file. +### 551. Run each mutation tool of `mutate-changes` in the folder that holds its module file, so a repo with `go.mod` below the top gets its Go lines mutated. + +In a repo whose `go.mod` is in a subfolder, `mutate-changes` reported 0 Go mutants for a branch that changed Go code, and ran mutmut on a folder of integration tests whose tests reach no code in the repo. It also left root-owned `.mutate-changes-*` folders in the checkout. By hand, Gremlins v0.6.0 worked when run in the module's folder with `git config --global diff.relative true` and `gremlins unleash --diff ` without a path. Find each module file (`go.mod`, `pyproject.toml`, `composer.json`) and run the tool there with the diff made relative, skip a Python folder no test imports from, and remove the scratch folders as the user who owns the checkout. + ### 447. Stop a headless claude call that runs past a time limit, and report it as a failure, so a hung judge or stuck check can't hold the loop. Every headless claude that `claude_reply` runs, the judge's and the stuck check's included, runs without a time limit, and the stuck check runs while the worker's own claude waits for its output to be read. A call that hangs holds the loop, and the worker with it, until a person notices. Found by item 422's stability review.