office: full --help, and --host copies the commands to the other machine and works from any folder on it

This commit is contained in:
Sam
2026-11-12 16:26:34 +11:00
parent 6c6bacc647
commit 3043e9dec1
7 changed files with 757 additions and 10 deletions

View File

@@ -0,0 +1,127 @@
---
type: session
id: session.paperclip-harness.rich-discovery-session-2026-11-12-04-50-42
title: Rich discovery: --session 2026-11-12 04:50:42
status: active
source_of_truth: false
freshness: current
last_reviewed: 2026-11-12
tags:
- pack/paperclip-harness
- agent-memory/session
- autolearn
- rich-discovery
- repo/session
---
# Rich discovery: --session 2026-11-12 04:50:42
Sanitized rich discovery snapshot captured automatically from the completed turn.
## Source paths observed
- `.paperclip/worktrees/AUD-173-add-a-line-to-readme`
- `run/current-system/sw/bin/bash`
- `.../packs/paperclip-harness/20-context/home.md`
- `.../20-context/paperclip-harness.md`
- `.../70-runbooks/tmp-deployment-operations.md`
- `bin/lib/__pycache__/tuios.cpython-314.pyc`
- `gitea.lab.audasmedia.com.au/sam/paperclip-harness.git`
- `home/sam/paseo/projects/pape`
- `run/current-system/sw/bin/zsh`
- `home/sam/paseo/projects/paperclip-harness/bin/harness`
- `.local/share/paperclip-harness/wrappers/pi-paperclip.sh`
- `.pi/agent/models.json`
- `.pi/agent/settings.json`
- `.pi/agent/models-store.json`
- `omni/deepseek/deepseek-v4-flash`
- `omni/deepseek/deepseek-v4-pro`
- `omni/oc/deepseek-v4-flash-free`
## Final answer snapshot
Both clean tests are finished. Four defects came out, all four are fixed and verified on screen.
## Test 1 — `test-alpha`: passed
Folder → `office --new` → eight panes → task **AUD-172** created from `New task>new` → agent ran → `Work>change` showed the diff → `v` review → `m` then `y` merge.
```
36acb8d Merge AUD-172: Add a STATUS.md with one line
5eebc45 Add STATUS.md with status line
$ cat STATUS.md
alpha is running.
```
## Test 2 — `harness-repo`: passed
`office . --project harness-repo --session harness-repo` adopted the project without rewriting `.harness/`, task **AUD-173** was created, the agent appended one line to `README.md` and changed nothing else, and I did **not** merge. Cancelled with `c` then `y`: task `cancelled`, and `main` is untouched — `README.md` still has no "tested by the harness" line, last commit still `b81cb91`.
## The four defects, and what each one was
**1. Pi 1.5.0 broke every agent run.** This is the one that matters for what you were told about 1.5.
It is not the names. It is **which stream the list goes to**. Pi 1.5.0 prints `--list-models` on **stdout**; Pi 0.8x printed it on **stderr**. Paperclip's adapter reads stderr first, on purpose:
```js
// Pi outputs model list to stderr, but fall back to stdout for older versions
const output = result.stderr || result.stdout;
```
Pi 1.5.0 also puts five extension warnings on stderr, so the adapter parsed those, found no `provider model` rows, and refused every run with `Pi returned no models` — three runs died in 4–5 seconds with `errorCode: adapter_failed` and zero log bytes before I found it.
Fixed with a shim, `~/.local/share/paperclip-harness/wrappers/pi-paperclip.sh`, that puts the table back on stderr for that one flag and passes everything else through; Builder's `adapterConfig.command` points at it. The next run succeeded in 69 seconds.
**2. Panes restored after a reboot were "adopted" while running nothing.** TUIOS brings a session back with a fresh shell in each pane and keeps the pane names, so `board` matched them by name and reported `adopted`. A page that looks built and does nothing is the worst kind of wrong. Now `open_pane` reads `/proc/<pid>/cmdline` and adopts a pane only when the harness is what is running in it; otherwise it closes the pane and opens a fresh one. `shell` is exempt — it is a shell either way.
**3. `r` on `Board>board` refreshed the task list but not the chosen task.** So "last run running" stayed on screen long after the run finished. It now reloads both. Verified: `last run succeeded · on_demand · 15:32`.
**4. `office .` was refused** as if no folder had been given, because of the guard I added earlier. `.` is a real folder; only a missing argument is an error.
## Your question about model names — where they actually live
Measured on `.13`:
| File | What it holds |
|---|---|
| `~/.agents/models.json`, symlinked as `~/.pi/agent/models.json` | provider `omni` with **476 explicit names**, plus `openrouter` overrides |
| `~/.pi/agent/settings.json` | five providers: `omni`, `deepseek`, `openrouter`, `opencode-go`, `google` |
| `~/.pi/agent/models-store.json` | **discovered** catalogues per provider, with `etag` and `checkedAt` — e.g. `deepseek` → 2 models |
| a project's `.pi/` | no model names at all; in an agent workspace only `.pi/tasks` |
So names are global, not per project — an agent workspace cannot hold a stale copy. The new names are there and resolve: `omni/deepseek/deepseek-v4-flash`, `omni/deepseek/deepseek-v4-pro`, `omni/ds/…`, `omni/oc/deepseek-v4-flash-free`, `omni/opencode-go/…`, plus `deepseek deepseek-flash` and `deepseek deepseek-v4-pro` on the direct provider.
**omniroute** is the source of the 476 `omni` names, so a name missing from the router's `/v1/models` will not appear in Pi — and because `models-store.json` caches with an etag, a stale entry can hide a newly added name until the catalogue is refreshed. **headroom** keeps a separate LiteLLM registry and still has no entries for the router's ids, which is why it answers `502`; that is unrelated to Pi's storage, but it will need the same names when it is fixed.
That does not mean 1.5 did not fix your deepseek recognition — the names are recognised now. What 1.5 changed on this machine was the stream, and that is what broke Paperclip.
## Two open items, written into `docs/NEXT.md`
- **Cost is always zero for `pi_local` runs.** `cost-summary` says `costCents: 0`, `outputTokens: 0` over four real runs, and the run's `usageJson` is `null`. The adapter is not capturing Pi's token usage, so `Project>costs` and the cost line on `Board>the chosen task` are honest but useless, and the cost limit in your operating rules cannot bite.
- **`ocr` reviews code, not Markdown.** A documentation-only diff gives `status: skipped`, zero files selected. `bin/merge` handles that correctly ("nothing to review, recorded, not hidden"), but `Work>review` should say why instead of "nothing reviewable in the change (0 files)" while `Work>change` lists one file.
## Committed and pushed
`paperclip-harness` → `6c6bacc`, on Gitea. `.paperclip/` and `__pycache__/` are now ignored, which they were not.
Both sessions (`test-alpha`, `harness-repo`) run the fixed binary — I checked every pane's process, all eight in each are the harness.
The one thing I would do next, if you agree, is the cost capture: it is the only part of your operating rules that cannot be enforced today.
## Evidence
- Confidence: 86%
- Reason: Preserve full sanitized discovery detail from a rich investigation turn
## Related
- [[packs/paperclip-harness/00-system/pi-agent/memory-manifest|Memory Manifest]]
## Related learned memories <!-- same-turn-2026-11-12 04:50:42 -->
- context: [[packs/paperclip-harness/20-context/paperclip-harness|paperclip-harness]]
- observation: [[packs/paperclip-harness/60-observations/tmp-repository-structure-and-configuration-patterns|Pi 1.5.0 moves --list-models to stdout]]
- action: [[packs/paperclip-harness/40-actions/2026-11-10-wrote-docs-ui-layout-md-and-three-live-layout-mockups|Fixed four harness defects, verified clean tests, pushed 6c6bacc]]
- session: [[packs/paperclip-harness/80-sessions/rich-discovery-session-2026-11-12-04-50-42|Rich discovery: --session 2026-11-12 04:50:42]]
- context: [[packs/paperclip-harness/20-context/omni|--session]]