Skip to content

Commit 81f1806

Browse files
Codename-11claude
andcommitted
docs: DEVLOG + CHANGELOG + engagement-modes for reviewStatusId
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
1 parent da018b4 commit 81f1806

3 files changed

Lines changed: 62 additions & 0 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ date, grouped by `Added` / `Changed` / `Fixed` / `Removed`.
1111

1212
## [Unreleased]
1313

14+
### Added
15+
16+
- **A finished agent run can auto-move the issue to review.** Settings → Workspace has a new **Review status** option (under "Auto-transition on completion"): pick an In Review-category status, and whenever an agent finishes Execute work successfully, the issue moves there automatically — no more agents leaving completed work sitting untouched in whatever status it started in. Off by default. It only ever lands on your chosen review status, never Done — marking something Done stays your call (or an explicit instruction elsewhere). Research/Review/Discuss dispatches are unaffected, since those never move the issue.
17+
1418
### Changed
1519

1620
- **The dashboard cockpit now adapts to your screen width.** The two-column layout only splits into a work column + rail once there's genuinely room for it, so a laptop-width window doesn't squeeze your issue cards uncomfortably narrow — it stays single-column a little longer instead. The rail's widgets also use the space better on medium-width screens instead of stacking one-per-row.

‎DEVLOG.md‎

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,58 @@
22

33
> Append-only session log. Read at session start. Update at session end.
44

5+
## 2026-07-07 — Auto-transition to review on EXECUTE completion (`reviewStatusId`)
6+
7+
Follow-up to today's "does a successful run properly resolve the issue" gap
8+
(found in the Cockpit/false-STALLED session earlier today). Bailey's policy:
9+
an agent should be inclined to move work to In Review when it believes it's
10+
done, never straight to Done — Done stays a human call (or an explicit
11+
instruction) unless confirmed.
12+
13+
- **Schema** (migration `0092`): `Workspace.reviewStatusId String?` +
14+
`reviewStatus` relation, mirroring the existing `startedStatusId` /
15+
`maybeAutoTransitionOnAssign` pattern exactly (same shape, same validation
16+
style, same opt-in-null-disables semantics).
17+
- **`maybeAutoTransitionOnComplete()`** (`src/server/audit.ts`, new, exported
18+
— sits right beside `maybeAutoTransitionOnAssign`): EXECUTE-only; skips if
19+
the workspace has no `reviewStatusId`, the target isn't an IN_REVIEW-
20+
category status, or the issue is already IN_REVIEW/DONE/CANCELED. Unlike
21+
the assign-time version, BACKLOG/TODO/IN_PROGRESS are **not** skipped —
22+
completing work should surface for review regardless of prior state
23+
(including issues that were never auto-started at all).
24+
- **Hooked into `runs.complete` directly** (`mcp.ts`), not the generic
25+
`recordChange`/`AGENT_RUN_COMPLETED` audit fan-out — verified live data
26+
shows `AGENT_RUN_COMPLETED` fires for abandons/stops too (e.g. "Stopped by
27+
operator to restart as RESEARCH"), so gating on that event kind alone would
28+
have wrongly auto-transitioned stopped runs. `runs.complete`'s own handler
29+
already has `run.issueId` + `run.engagementMode` in scope, so this needed
30+
zero extra plumbing.
31+
- **Settings UI**: new "Auto-transition on completion" section on
32+
Settings → Workspace, right after the existing "Auto-transition on
33+
assignment" one. Used the themed `Combobox` (not a native `<select>`, even
34+
though its neighbor still is — one of the pre-existing ~58-site backlog;
35+
didn't touch it, but wrote the new field correctly from the start).
36+
- **Tests**: 2 new cases in `mcp.test.ts`'s `runs.complete` describe block
37+
(EXECUTE transitions; RESEARCH does not, even with `reviewStatusId` set).
38+
The default test fixture doesn't seed an IN_REVIEW-category status, so
39+
both create one ad-hoc, matching an existing code comment in this file
40+
that already called that gap out.
41+
- **Docs**: `docs/agents/engagement-modes.md`'s "What each mode changes"
42+
list gains a sibling bullet next to the `startedStatusId` one.
43+
44+
**Big unblock, unrelated to the feature itself:** finally root-caused why
45+
every worktree this session could typecheck/lint/build but never actually
46+
*run* its test suite (`Cannot find module 'server-only'`, seen 3x already
47+
today). `pnpm-workspace.yaml` is gitignored and a fresh worktree checkout
48+
never has it — without it, `pnpm install` silently skips linking a chunk of
49+
real dependencies (not just `server-only`; eslint/vitest/prisma/typescript/
50+
tailwindcss/tsx were missing too) while still reporting success. Copying the
51+
file in from the main checkout, then `pnpm install` + `pnpm exec prisma
52+
generate` + exporting `AUTH_SECRET` alongside `DATABASE_URL`/`REDIS_URL`, gets
53+
a genuinely clean `pnpm test` run — 1067/1068 passing (1 pre-existing skip),
54+
confirmed zero regressions from this change specifically by running the full
55+
suite, not just the new tests. Documented in memory for future sessions.
56+
557
## 2026-07-07 — Cockpit responsive breakpoints + false-STALLED root-cause fix
658

759
Two pieces, following up the same-day Cockpit ship.

‎docs/agents/engagement-modes.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,12 @@ Mode is what stops the silent "always execute" assumptions:
143143

144144
- **Auto-transition on assign** (`startedStatusId`) fires **only for Execute**.
145145
Research / Review / Discuss leave issue status alone.
146+
- **Auto-transition on complete** (`reviewStatusId`, Settings → Workspace)
147+
fires **only for Execute**, on a genuinely successful `runs.complete` (not
148+
on abandons/stops). A finished Execute run is a "ready for human review"
149+
signal, not a "mark done" signal — it lands on the workspace's configured
150+
IN_REVIEW status, never further. Done stays a human (or explicitly
151+
instructed) action.
146152
- **SLA / watchdog** applies the "must move the issue" expectation **only to
147153
Execute**. A Research run is "done" when it posts findings, so it's never
148154
falsely marked stalled for not moving the issue.

0 commit comments

Comments
 (0)