Work>work: selectable runs, log pre-chosen, merge tab no longer shows another task's merge

This commit is contained in:
Sam
2026-11-11 13:27:47 +11:00
parent 6aef6ce249
commit f94934569d
9 changed files with 503 additions and 4 deletions

View File

@@ -792,3 +792,93 @@ Committed as `7198c34`; the eight workspaces are rebuilt and running.
- session: [[packs/paperclip-harness/80-sessions/rich-discovery-bin-2026-11-11-01-02-31|Rich discovery: bin 2026-11-11 01:02:31]]
- context: [[packs/paperclip-harness/20-context/tmp|bin]]
- observation: [[packs/paperclip-harness/60-observations/tmp-repository-structure-and-configuration-patterns|bin repository structure and configuration patterns]]
---
## Update (2026-11-11 02:17:44)
Trigger: reviewing or merging a task's work without bouncing to the Board in paperclip-harness.
Procedure:
1. Open `Work>work` — it is self-contained. Header shows `Work · <TASK-ID> <title> · task N of M · read HH:MM:SS`; tab title shows run count (`the work · 1 run`).
2. Move between tasks: `n` (next) / `p` (previous); `o` picks from a list. Task choice here writes the same selection the Board writes, so `Reply>reply` and other panes follow.
3. Move between runs: `↑`/`↓`; `Enter` opens the selected run's log. Multiple runs occur when an agent was woken for different reasons (assignment, comment, automation, blockers resolved).
4. Merge: press `m`. A confirm dialog shows `what is merged` (source branch, e.g. AUD-170-<slug>) and `what happens` (rebase onto base → verify command if any → ocr review [critical finding refuses] → merge into main → re-check on main with rollback on failure). Press `y` to proceed.
Safe/dangerous: `n`/`p`/`o`/`↑`/`↓`/`Enter` are read-only navigation. `m` then `y` is the dangerous step (writes to `main`). Merge is never automatic.
Rollback: bin/merge re-runs checks on `main` after merging and rolls back if they fail.
Troubleshooting: seeing only one run is expected for single-run tasks; check run count in the tab title. Docs: `docs/RUNS-AND-MERGE.md`; keys listed in README.
## Detailed procedure from completed turn
Let me answer the three questions straight, because you were right that they were unclear.
## What is a run?
**One execution of one agent.** A task can have several, each with its own log, because
Paperclip wakes an agent for different reasons:
| what woke it | when |
|---|---|
| `assignment` | the task was given to an agent |
| a comment | someone replied on the task |
| `automation` | Paperclip started a corrective run, e.g. the previous run ended without setting a status |
| blockers resolved | the task was waiting on another task and it finished |
Measured here: `AUD-167` has **1** run, `AUD-164` has **2** (`assignment`, then `automation`), `AUD-166` has **2**. So the runs tab showing one run is not it hiding anything — those agents finished in a single run. A task with a slower or messier job will show several, and each opens to its own log.
## What is merge, and is it OCR?
No, merging is about **code**. An agent works in the task's own copy of the repository (a worktree) on its own branch. That branch holds commits that are not on the main line. Merging puts them there:
```
AUD-171-another-status-file-status-2 ──merge──▶ main
```
`ocr` is the reviewer that reads the change first. The order `bin/merge` follows:
1. rebase the task's branch onto `main`;
2. run the task's own verify command, if it has one;
3. **`ocr` reads the diff** — a critical finding refuses the merge;
4. merge the branch into `main`;
5. re-check on `main`, and roll back if it fails.
Merging never happens on its own now: `m` asks, and shows the branch and the base branch before anything runs.
## The Board-then-Work flow — fixed
That was cumbersome, and you should not have to do it. `Work>work` is now self-contained:
```
Work · AUD-171 Another STATUS file… task 1 of 13 read 13:16:47
╭─ the work · 1 run runs change facts review log merge ──·focus·╮
```
- **`n` / `p`** — next / previous task, with `task 3 of 13` in the header. You never leave the pane.
- **`o`** — pick a task from a list.
- **`↑` / `↓`** — choose a run; the tab title says how many there are (`1 run`).
- **`Enter`** — open that run's log.
- **`m`** — merge, after asking.
Choosing a task here writes the same choice the Board writes, so `Reply>reply` and the rest follow. The Board is still the best place to see everything at once; it is no longer the only way to move.
## Written down
`docs/RUNS-AND-MERGE.md` holds all of this, including the measured run counts, and the README lists the new keys. Committed as `6aef6ce`. The eight workspaces are running, with `Work>work` opening on runs for `AUD-171`.
## Evidence
- Confidence: 80%
- Reason: Repeatable, evidence-backed procedure with safe vs dangerous actions and rollback.; enriched with final-answer detail because persistence should be reusable
## Related learned memories <!-- same-turn-2026-11-11 02:17:44 -->
- action: [[packs/paperclip-harness/40-actions/2026-11-10-wrote-docs-ui-layout-md-and-three-live-layout-mockups|Made Work>work self-contained; documented runs + merge (commit 6aef6ce)]]
- session: [[packs/paperclip-harness/80-sessions/paperclip-harness-runs-vs-merge-semantics-work-work-navigati|Paperclip harness: runs vs merge semantics + Work>work navigation (AUD-171)]]
- observation: [[packs/paperclip-harness/60-observations/tmp-repository-structure-and-configuration-patterns|paperclip-harness: task run model and bin/merge pipeline specifics]]
- runbook: [[packs/paperclip-harness/70-runbooks/tmp-deployment-operations|navigate tasks and runs inside Work>work and merge safely (paperclip-harness)]]
- session: [[packs/paperclip-harness/80-sessions/rich-discovery-home-2026-11-11-02-17-44|Rich discovery: home 2026-11-11 02:17:44]]
- context: [[packs/paperclip-harness/20-context/home|home]]