From 504229c1bdbcc90e34a49ec3c090d1eb525c4424 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Thu, 3 Dec 2026 17:15:19 +0100 Subject: [PATCH] Make stability-reviewer trace every path, asynchronous ones included, to a callback that a change guards --- agents/stability-reviewer.md | 1 + docs/reading-cost.md | 12 ++++++++++++ todo.md | 20 ++++++++++---------- 3 files changed, 23 insertions(+), 10 deletions(-) diff --git a/agents/stability-reviewer.md b/agents/stability-reviewer.md index db0897eb..f25e190d 100644 --- a/agents/stability-reviewer.md +++ b/agents/stability-reviewer.md @@ -88,6 +88,7 @@ Catch behavior that is unclear or under-specified — "building in ambiguousness - Is mutable shared state properly protected? - Check-then-act races, including at the DB (exists-then-insert, `firstOrCreate`): is there a unique constraint that wins when two requests race? - **Does correctness depend on reading process-global mutable state set by a *prior* call** — `json_last_error()`/`json_last_error_msg()`, `errno`, `preg_last_error()`, last-insert-id, locale, default timezone? This is **blocking** (🔴): the verdict silently breaks the moment any call is reordered or inserted between the setter and the reader, and code-reading will not catch the regression. Demand a self-contained alternative (`JSON_THROW_ON_ERROR`, an explicit return value, capturing the result on the adjacent line) even when the current ordering happens to work. +- **Where the change keeps a callback, handler or hook from running in some window** (before a constructor returns, while a lock is held, after close), list every path that can reach it, not only the direct call the diff touches: background goroutines and threads, queues and retries, timers, and process-wide handlers such as a global error handler. Report each path the guard leaves open as a finding. A guard that closes the direct call while a background path of the same record still reaches the callback is not complete. - Are there potential deadlocks? - Is state mutation predictable and traceable? diff --git a/docs/reading-cost.md b/docs/reading-cost.md index 178487e8..f7a6b462 100644 --- a/docs/reading-cost.md +++ b/docs/reading-cost.md @@ -4016,3 +4016,15 @@ Read most (opens and searches): - `bin/agent_cycle/run.py` 2 - `bin/loop_claude/loop/test_usage.py` 2 - `bin/model_routing/worker_rungs.py` 2 + +## Reading cost, chunk 6036c9ce08ad, finished 2026-12-03T16:14:50Z + +74380 new input tokens before the first commit. + +Read most (opens and searches): + +- `.gitignore` 5 +- `ci.sh` 2 +- `bin/repo_checks/test_gitignore.py` 1 +- `bin/run-tests` 1 +- `settings.json` 1 diff --git a/todo.md b/todo.md index 22a8d6f5..ca4db86e 100644 --- a/todo.md +++ b/todo.md @@ -12,7 +12,6 @@ | ID | Release | Blocked by | Exempt | Item | L | E | I | R | S | Moves | Score | |---|---|---|---|---|---|---|---|---|---|---|---| -| 579 | 0.17.0 | | | **Make stability-reviewer trace every path, asynchronous ones included, to a callback that a change guards.** | 1 | 2 | 2 | 3 | 1 | 1.1 by 2 | 0.7 | | 484 | 0.18.0 | | owner | **Keep project configs and this machine's rules in `~/.config/build-release/`, and transcripts and review reports in `~/.local/state/build-release/`, each under its `XDG_*` variable where set, read no old place, and have rule-hook guard the new ones.** | 3 | 2 | 4 | 7 | 6 | 2 by 4 | 0.4 | | 575 | 0.18.0 | 484 | owner | **Rename `do-epic` to `build-epic`, with no alias, and its config folder with it.** | 2 | 2 | 2 | 4 | 4 | 2 by 2, 6 by 1 | 0.6 | | 482 | 0.18.0 | | owner | **Run the setup from a clone of a release by the path of its `bin/`, with no install step, and replace `deploy-release` with a command that moves that clone to the newest tag.** | 3 | 2 | 3 | 6 | 7 | 2 by 6 | 0.4 | @@ -21,6 +20,7 @@ | 577 | 0.18.0 | 483, 486, 575 | owner | **Test in the gate that a container holding only a stock Claude Code runs a chunk from a clone, against a mock Messages API, and that the run leaves the container's own `~/.claude` as it was.** | 3 | 1 | 2 | 4 | 6 | 3 by 9, 2 by 5 | 5.2 | | 576 | 0.18.0 | 575 | owner | **Name the project `dev-factory` in the README, the prose and the tools, and say in the changelog that the repo moved.** | 2 | 2 | 2 | 4 | 4 | 2 by 1, 6 by 1 | 0.4 | | 578 | 0.18.0 | 576, 577 | owner | **Ship one chunk of this repo, to a merged pull request, from a clone of `main` that runs in the generated home, beside the untouched `~/.claude`.** | 1 | 2 | 1 | 2 | 1 | 2 by 4 | 1.2 | +| 579 | 0.18.0 | | | **Make stability-reviewer trace every path, asynchronous ones included, to a callback that a change guards.** | 1 | 2 | 2 | 3 | 1 | 1.1 by 2 | 0.7 | | 487 | 0.20.0 | 483 | owner | **Run larv-review's passes from a program that picks them from the diff and the item, counts rounds against the cap and decides each rerun, with each reviewer returning its findings as JSON against a schema.** | 4 | 2 | 3 | 7 | 8 | 1.1 by 5, 1.4 by 5 | 0.4 | | 498 | 0.20.0 | 487 | owner | **Drive each chunk as a state machine in `build-release`, from preflight through implementing, review, the pull request and the merge to finishing its items, with the worker as one model step that ends in a result that code checks.** | 4 | 2 | 3 | 7 | 8 | 1.1 by 4, 1.4 by 4 | 0.3 | | 488 | 0.20.0 | 498 | owner | **Cut the larv-review skill, `CLAUDE.md` and rule-hook down to what `build-release` doesn't own: the judgement the model makes and the safety guards.** | 2 | 2 | 3 | 5 | 5 | 1.4 by 4, code health by 2 | 2.3 | @@ -106,15 +106,6 @@ ## Details -### 579. Make stability-reviewer trace every path, asynchronous ones included, to a callback that a change guards. - -A forge auto-reviewer found, on a library, a guard the stability pass had read as complete: the code kept a user callback from running before the constructor returned by leaving it out of one handler, while a background export of the same record still reached the callback through a global error handler. The stability reviewer checked the direct call and not the asynchronous one. - -Add to the concurrency section: where a change keeps a callback, handler or hook from running in some window, the reviewer lists every path that can reach it, including background goroutines, threads, queues and process-wide handlers, and reports each path the guard leaves open. - -Touches: -- `agents/stability-reviewer.md`: `### 6. Concurrency & State Management` (small) - ### 484. Keep project configs and this machine's rules in `~/.config/build-release/`, and transcripts and review reports in `~/.local/state/build-release/`, each under its `XDG_*` variable where set, read no old place, and have rule-hook guard the new ones. Part of the standalone-install plan lilleman approved on 2026-11-20, as reshaped on 2026-12-03 when 0.18.0 was planned. Today they live in `~/.claude-projects/`, `~/.claude/*-transcripts`, `~/.claude/loop-claude-models.json` and `~/.local/state/larv-review`. `rules/goals-and-audience.md` loads by the glob `**/.claude-projects/*/goals.md`, which moves with the folder. The release ships no migrate command and reads no old place: the only two machines move once, after the cut, by a throwaway script that is never committed. From the first release that reads project configs from `~/.config/build-release/`, rule-hook must read each `env-file` from those configs and refuse a read of it, as it does today from the old folder. @@ -421,6 +412,15 @@ Touches: - `README.md` +### 579. Make stability-reviewer trace every path, asynchronous ones included, to a callback that a change guards. + +A forge auto-reviewer found, on a library, a guard the stability pass had read as complete: the code kept a user callback from running before the constructor returned by leaving it out of one handler, while a background export of the same record still reached the callback through a global error handler. The stability reviewer checked the direct call and not the asynchronous one. + +Add to the concurrency section: where a change keeps a callback, handler or hook from running in some window, the reviewer lists every path that can reach it, including background goroutines, threads, queues and process-wide handlers, and reports each path the guard leaves open. + +Touches: +- `agents/stability-reviewer.md`: `### 6. Concurrency & State Management` (small) + ### 487. Run larv-review's passes from a program that picks them from the diff and the item, counts rounds against the cap and decides each rerun, with each reviewer returning its findings as JSON against a schema. Part of the standalone-install plan lilleman approved on 2026-11-20. It applies the decision `loop: a step whose result a program can check …` in `docs/decisions.md`. The reviewer briefs stay prose. Start here, since larv-review holds the most sequencing rules.