Record the human's answers to the rebuild's principles audit #166

Merged
lilleman merged 2 commits from user-answers-audit into rebuild 2026-09-30 23:36:54 +02:00
3 changed files with 14 additions and 6 deletions
+2 -1
View File
@@ -6,7 +6,7 @@ Decisions live in `docs/decisions.md`:
- larv-review: a project under the comprehension floor is fixed at the capping dimension
- loop-claude: a judge decides interrupts, not the worker's self-report
- loop-claude: one session per project, at a fixed id
- loop-claude: one session per project, at a fixed id from its full path, and a second loop refuses to start
- loop-claude: the trust file is rewritten before an interrupt
- loop-claude: every worktree of the checkout is trusted before an interrupt
- bin/: the Python floor is README's Install prerequisite
@@ -30,3 +30,4 @@ Decisions live in `docs/decisions.md`:
- rebuild: rebuild's larv-review reviews a chunk into `rebuild`
- review: an ask no user answers leaves the PR unmerged
- review: the architecture pass audits every principle and goal over the whole project, and a release's last chunk fires it
- loop-claude: an unattended worker bypasses permissions inside its sandbox
+8 -4
View File
@@ -8,17 +8,17 @@
2026-09-21, lilleman. Serves goal 4. Asked to name the goal behind each choice, the worker cites a real goal for a choice that goal does not settle, and under-reports its own decisions; the judge's bar is whether the README discriminates between the alternatives. Valid while the worker's self-report stays unreliable.
## loop-claude: one session per project, at a fixed id
## loop-claude: one session per project, at a fixed id from its full path, and a second loop refuses to start
2026-09-21, lilleman; the rename and mirrored-path costs accepted 2026-09-25 by larv-review. Serves goal 4. One fixed id per project keeps the session picker at one entry per project and makes any transcript under that id loop-claude's own to delete. The id derives from the session name, so moving the checkout or changing that name orphans open sessions: they stay in the picker until the human deletes them, migration code not being worth a one-human audience. A checkout outside `~/code` mirroring a path inside it would share its id. Valid while claude takes `--session-id` and resumes by it, and no checkout outside `~/code` mirrors a path inside it.
2026-09-21, lilleman; revised 2026-09-30 by lilleman. Serves goal 4. One fixed id per project keeps the session picker at one entry per project and makes any transcript under that id loop-claude's own to delete. The id derives from the checkout's full path, so no two checkouts share one, and `loop-claude` refuses to start while another session on that id is active. Moving the checkout orphans its open sessions, archive folder and models entry: sessions stay in the picker until the human deletes them, migration code not being worth a one-human audience. Until `todo.md`'s "Key a project on its checkout's full path" lands, the id is the checkout's path relative to `~/code`, or to `/` outside it, and a second loop is not refused, so a checkout outside `~/code` mirroring a path inside it shares its id. Valid while claude takes `--session-id` and resumes by it.
## loop-claude: the trust file is rewritten before an interrupt
2026-09-21, lilleman; the lost-write risk accepted 2026-09-24 by larv-review. Serves goal 4. A write by another claude inside `trust`'s read-modify-write window is lost. Valid while no flag skips the dialog.
2026-09-21, lilleman; the lost-write risk accepted 2026-09-24 by larv-review. Serves goal 4. A write by another claude inside `trust`'s read-modify-write window is lost. 2026-09-30, lilleman: Claude Code owns and writes that file, so `loop-claude` is to move out of it, bringing each case that must stay to the human. Stands until `todo.md`'s "Move what `loop-claude` writes out of `~/.claude.json`" ends it.
## loop-claude: every worktree of the checkout is trusted before an interrupt
2026-09-24, lilleman. Serves goal 4. `claude --resume` re-enters the worktree the worker last entered, recorded in the transcript's `worktree-state` entry, and Claude Code asks trust per path, so trusting the checkout alone still lands the human in the dialog; trusting every worktree `git worktree list` names spares reading which one from the transcript. Valid while resume re-enters a recorded worktree and trust is kept per path.
2026-09-24, lilleman. Serves goal 4. `claude --resume` re-enters the worktree the worker last entered, recorded in the transcript's `worktree-state` entry, and Claude Code asks trust per path, so trusting the checkout alone still lands the human in the dialog; trusting every worktree `git worktree list` names spares reading which one from the transcript. Stands until `todo.md`'s "Move what `loop-claude` writes out of `~/.claude.json`" ends it. Valid while resume re-enters a recorded worktree and trust is kept per path.
## bin/: the Python floor is README's Install prerequisite
@@ -103,3 +103,7 @@
## review: the architecture pass audits every principle and goal over the whole project, and a release's last chunk fires it
2026-09-30, lilleman. Serves goal 4: `@larvit/log`'s chunks each passed their per-diff reviewers, and a whole-project audit that day still found its functional core and state machines not followed and two semver breaks planned; what grows over many chunks shows in no diff. Valid while the other passes review a diff.
## loop-claude: an unattended worker bypasses permissions inside its sandbox
2026-09-30, lilleman. Applies "Always grant explicit access to data": the sandbox `loop-claude` runs in is where access is granted, so the worker and the interrupt run with `bypassPermissions`. The worker may read `~/.claude/.credentials.json`: it holds Claude Code's own credentials, which claude reads to run anyway. Valid while `loop-claude` runs only inside a sandbox; `todo.md`'s "Name the sandbox `loop-claude` runs in" makes that checkable.
+4 -1
View File
@@ -31,6 +31,9 @@ The rebuild lifts every dimension, one chunk per item, until the last item opens
- **Test `run_cycle`, `judge_through_interrupts`, `retried`, `archive`, `trust`, `interrupt`, the models file and the worker's arguments.** Only the pure helpers are tested today.
- **Give a project's loop state named states and one transition function.** Fresh, resuming, awaiting the human and finished come today from whether a transcript exists, two verdict booleans and an open `while True` in `steps.py`.
- **Make a `Verdict` with both `interrupt` and `finished`, or a question without an interrupt, unrepresentable.** `steps.py:49` ignores `finished` when `interrupt` is set.
- **Grant an unattended worker named permissions in place of `bypassPermissions`.** `worker.py:37` and `interrupt.py:23` let it read and write anything the user can, `~/.claude/.credentials.json` included.
- **Return a `Stop` when `git` or `os.execv` fails.** `checkout.py:7,15` and `reload.py:52` end in a traceback.
- **Narrow `.gitignore`'s `!bin/*` and `skills/*/**` to the files they mean.** A stray log of `loop-claude` output in `bin/` would be committed with transcript text in it.
- **Archive the transcript as each cycle ends, so a failed exit or Ctrl-C loses nothing.** Today only an interrupt or a finish archives, against goal 2.
- **Key a project on its checkout's full path — its session, archive folder and models entry — and refuse to start while another session on that id is active.** `checkout.py:22` drops the leading `/`, so `~/code/a` and `/a` share a session, an archive folder and a models entry, and one loop can resume or delete the other's session.
- **Move what `loop-claude` writes out of `~/.claude.json`, and bring each case that must stay to the human.** Claude Code owns and writes that file, and `trust`'s read-modify-write loses a write landing in its window.
- **Name the sandbox `loop-claude` runs in under README → Install.** The decision letting the worker bypass permissions rests on it, and nothing says what it is.