diff --git a/docs/reading-cost.md b/docs/reading-cost.md index b3ba5b08..8ecf4cff 100644 --- a/docs/reading-cost.md +++ b/docs/reading-cost.md @@ -3874,3 +3874,14 @@ Read most (opens and searches): - `docs/decisions.md` 18 - `todo.md` 12 - `README.md` 4 + +## Reading cost, chunk 4740420b79e6, finished 2026-12-01T16:03:35Z + +61467 new input tokens before the first commit. + +Read most (opens and searches): + +- `bin/loop_claude/test_black_box.py` 3 +- `README.md` 2 +- `bin/agent_cycle/retry.py` 1 +- `bin/claude_code/entries.py` 1 diff --git a/principles/technical-principles.md b/principles/technical-principles.md index 6053f99e..b4f7f273 100644 --- a/principles/technical-principles.md +++ b/principles/technical-principles.md @@ -62,6 +62,7 @@ - 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. + - A test that reads state another goroutine, process or queue sets waits on a signal that the code under test or its fake sends, such as a channel or a callback, with a timeout that only fails the test. Reading the state straight after the call races with the other side, and a sleeping poll breaks the rule above. BANNED: `assert len(server.connections) == 3` right after the client calls. GOOD: the fake sends on a channel per connection, and the test receives three times, with a timeout. - For pure logic over many inputs, prefer a property test: a round trip, an invariant. - Changing tests and changing other code are two separate processes — be very careful about doing both at once. - Use properly randomised UUID v7s — never `aaaa-0000`-style placeholders.