Go module with the task tree screen; worktrees on and measured; Go installed

This commit is contained in:
Sam
2026-11-10 11:20:21 +11:00
parent a60a4a3067
commit 713774485a
10 changed files with 868 additions and 23 deletions

View File

@@ -59,32 +59,49 @@ A wake can still be refused without any error reaching us. Read
and a plain-English diagnosis. Refusal reasons seen in the documentation: the agent is
paused, its budget is exhausted, its cooldown has not elapsed, or its run slot is full.
## Isolated workspaces are switched off on this instance
## Isolated workspaces: switched on 2026-11-10, and measured working
The project was created asking for a git worktree per task (`executionWorkspacePolicy`
with `workspaceStrategy.type: "git_worktree"`). **No worktree was made.** The run worked
directly in `/tmp/pc-sandbox-2026-11-10` and committed onto `main`. The task's
`executionWorkspaceId` and `currentExecutionWorkspace` both read `null`.
The instance first had them off. With the flags off, the project's request for a git
worktree per task was silently ignored: `AUD-159` worked in `/tmp/pc-sandbox-2026-11-10`
on `main`, and the task's `executionWorkspaceId` read `null`.
`GET /api/instance/settings/experimental` returns:
Then, with the person's approval, two experimental settings were switched on:
```
"enableIsolatedWorkspaces": false,
"enableIsolatedWorkspacesByDefault": false,
"enableWorktreeRunExecution": false,
PATCH /api/instance/settings/experimental
{"enableIsolatedWorkspaces": true, "enableWorktreeRunExecution": true}
→ 200
```
With `enableIsolatedWorkspaces` false, Paperclip discards a task's workspace settings
before the run is dispatched, so the mode falls back to the shared project folder. The
worktree code is present in the server (`git worktree add` in
dist/services/workspace-runtime.js). Switching it on is an instance-wide experimental
setting and a decision for the person, not a setting for one project.
`enableIsolatedWorkspacesByDefault` was deliberately **left off**. That flag would give
every project without a policy of its own a worktree, which would change the other nine
projects on this instance. Only projects that ask for one now get one.
The next task (`AUD-160`) made a real worktree, and Paperclip posted a "Workspace Ready"
comment on the task naming it:
```
strategy git_worktree
branch AUD-160-milestone-1-t2-read-hello-txt
cwd /tmp/pc-sandbox-2026-11-10/.paperclip/worktrees/AUD-160-milestone-1-t2-read-hello-txt
baseRef main
deliveryState merged_by_ancestry (no commit was needed; the branch equals main)
```
`git worktree list` in the sandbox repository shows that path on that branch. So the
worktree is Paperclip's job after all, once the instance allows it, and the terminal
program never needs to run `git worktree` itself.
## Toolchain
- **Go is not installed on this machine.** `go version` → not found. The terminal program
needs it. Under Nix, add `go` to `/etc/nixos/configuration.nix` and rebuild; do not
install it by hand.
- **Go is installed** (2026-11-10), by `nix profile install nixpkgs#go` → `go1.26.5` at
`/home/sam/.nix-profile/bin/go`. That is the quick path: it works now, and it is not part
of the system closure.
- The durable path is also prepared: `go` and `gopls` were added to
`environment.systemPackages` in `/etc/nixos/configuration.nix`. `nix flake check` passes
and the dry-run build evaluates. **The rebuild has not been run**, because `sudo` needs a
password here. One command finishes it: `sudo nixos-rebuild switch --flake /etc/nixos#nixos-desktop`.
Until then the profile copy is what runs.
## The new repository

View File

@@ -220,3 +220,57 @@ step. That is a decision to put to the person, not a bug to work around.
`AUD-160` stayed `todo`, unassigned, blocked by a task that is now `done`. Nothing woke,
because no agent is assigned to it. Whether the `issue_blockers_resolved` wake fires for an
assigned dependent task is still unmeasured.
---
# Worktrees switched on, measured, 2026-11-10
The first worktree attempt proved the flags, not the strategy: with
`enableIsolatedWorkspaces: false` the project's `git_worktree` policy was discarded before
dispatch. That is recorded above and is worth keeping, because it is what an operator will
see on any fresh instance.
After switching on `enableIsolatedWorkspaces` and `enableWorktreeRunExecution` (and leaving
`enableIsolatedWorkspacesByDefault` off, so the other projects are untouched), the same
project produced a real worktree on the next task:
| Fact | Value |
|---|---|
| Task | `AUD-160`, run `11a94551-dd12-4b13-92fe-835ea63d7753` |
| Workspace id | `7900dbf1-692c-4217-aebb-5d539c30aa98` |
| Mode / strategy | `isolated_workspace` / `git_worktree` |
| Branch | `AUD-160-milestone-1-t2-read-hello-txt` |
| Path | `/tmp/pc-sandbox-2026-11-10/.paperclip/worktrees/AUD-160-milestone-1-t2-read-hello-txt` |
| Base | `main` at `b093301` |
| Delivery state | `merged_by_ancestry` (the task made no commit) |
Paperclip wrote its own comment on the task, titled **Workspace Ready**, naming the
strategy, the branch and the working directory. `git worktree list` shows the new path, and
`git branch` shows the new branch. The file `hello.txt` from the first task was present in
the worktree, so the branch really was cut from the finished work.
Two consequences worth remembering:
- **Name the branch with a template.** The default is `{{issue.identifier}}-{{slug}}`;
usable placeholders include `{{issue.identifier}}`, `{{slug}}`, and the project and agent.
Without a template every worktree of the same task would land on the same name.
- **`merged_by_ancestry` is not a merge.** A task that changes nothing leaves its branch at
the base commit, and Paperclip marks it delivered because the branch adds nothing. A task
that does commit will stay `unmerged` until something merges it. That is the state the
review gate will read.
## Budgets as they stand
Read from `GET /api/companies/{companyId}/agents`:
| Agent | Monthly budget (cents) | Spent (cents) |
|---|---|---|
| Builder | 5000 | 2 |
| Chief of Staff | 5000 | 0 |
| System | 3000 | 0 |
| researcher | 2000 | 0 |
| Documenter | 2000 | 0 |
| Hub | 0 | 1 |
The company's `budgetMonthlyCents` is 0. There is no currency field anywhere in the payload:
Paperclip counts cents and does not name a currency, so "5000" is a number, not "$50 AUD".