From 7c4301fcb93df0f4ad1876fc6e717c37a0965f93 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 27 Nov 2026 20:13:17 +0100 Subject: [PATCH] File the principle that a function keeps a copy of its input and a limit counts every entry --- todo.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/todo.md b/todo.md index 86e69293..cfba5def 100644 --- a/todo.md +++ b/todo.md @@ -6,7 +6,7 @@ `Bar = 0.1` -`Next ID = 553` +`Next ID = 554` ## Items @@ -15,6 +15,7 @@ | 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 | | 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 | +| 553 | 0.17.0 | | | **Add to the technical principles that a function keeps a copy of what its caller passes, and that a limit counts every entry the code retains, empty ones too.** | 1 | 1 | 2 | 2 | 1 | 1.1 by 2 | 0.9 | | 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 | | 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 | @@ -119,6 +120,19 @@ Part of the standalone-install plan lilleman approved on 2026-11-20. Later items An outside reviewer found it on a client project's PR that added a secret: a Gitea token documented as able to run Actions on one repository, "and nothing wider". The token reaches every repository its owning account can, so the docs had to require a dedicated account with access to that repository only. Neither `/security-review` nor stability-reviewer raised it. Where a change adds a secret or a token, ask each to check that the doc beside it states what the credential can reach, not only what the change uses it for. +### 553. Add to the technical principles that a function keeps a copy of what its caller passes, and that a limit counts every entry the code retains, empty ones too. + +An outside reviewer (CodeRabbit) found two faults on a client project's PR that neither stability-reviewer's two rounds nor the tests raised. + +1. A function that keeps a caller's bytes made its copy with `Uint8Array.slice()`. On a Node `Buffer`, `slice()` shares the storage, so changing the Buffer after the call changed later results. The same PR had earlier kept a caller's array by reference. Where a function keeps an argument, it keeps a copy that the caller's later change cannot reach: `[...array]`, `new Uint8Array(bytes)`, never `slice` or `subarray` of a typed array. +2. A limit on a returned table counted bytes, so a record of a thousand null or empty columns, repeated a million times, added a billion entries that counted zero, and the program ran out of memory before it returned the limit error. A limit counts what the code allocates, every entry and every cell, not only the bytes of what it prints. + +Add both to `technical-principles.md` as one bullet each, with a BANNED and a GOOD example, in the section that holds the input rules. Check `stability-reviewer`'s agent text names the principles file's input rules, so a reviewer reads them. + +Touches: + +- `principles/technical-principles.md` + ### 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.