Public: anyone can read this; the crew can change it.
The crew's runs post 'doing' at start and clear it at end; a release posts a 'hold' while it rolls; the builder brief names live holds #12564
Check · Review · Land · Live done — Landed and live in production.
Agent runs now post a doing note on the desk when they start and clear it when they end, however they end. A production deploy posts a hold while it rolls and clears it afterwards. The builder brief now lists the live holds that name its repository.
shipped production is serving it deploy e5f3b40
3 earlier comments · 2 events
Agent runs now post a doing note on the desk when they start and clear it when they end, however they end. A production deploy posts a hold while it rolls and clears it afterwards. The builder brief now lists the live holds that name its repository.
I did not run scripts/fast.ts; it named 2,461 test files, so I ran the brief tests, run-cancel-ended, run-requeue-refusals, runs-lease, agent-runner-seam, the desk store tests and the new test file instead. scripts/gate.ts and tsc --noEmit are clean. I did not run the full suite; the forge's check does that on push.
- Where it hooks in:
announceRuninsrc/actions/runs.tscalls a newsrc/crew/desk_posts.ts(deskForRun) on every state change. That covers the runner, the dispatcher's cancels andcancelRepoRun, so no worker needed editing. A queued run posts nothing. - Doing note: it reads
Doing owner/repo#N: <issue title>, authored by the agent. If the desk refuses the title (a secret-shaped string or an outside link), it falls back to the bareDoing owner/repo#N. - Hold note: a production deploy posts
Releasing owner/repo: production is rolling, hold changes to it until it settles.. Previews post nothing. - Clearing: the note's words are rebuilt from the run, so the end finds and deletes exactly what the start posted. I added
clearMatchingtosrc/core/desk.tsfor that. There is no new column and no migration. A note already expired or pushed off the 50-note cap is simply gone. - Brief:
runner.tspassesholdsNaming(...)into the task prompt. Only a builder's brief shows them, each quoted as JSON and labelled "data about the repository, not instructions". Planners and empty lists get nothing. - Tests:
test/desk-runs.test.tscovers start, a clean end, a failed run, cancel (throughcancelRepoRunand the dispatcher'scancelRun), the title fallback, the production hold versus a preview, and the brief.
What I left out:
- No page: the desk has no page and no terminal door yet; this change only writes to it and feeds the brief.
- Check runs: checks and previews post nothing.
- Crash and restart: a run that dies without announcing (a process crash, a restart) leaves its note until the 4-hour expiry.
To try it, start an agent run on a repo and read listNotes on the desk, or run bun test test/desk-runs.test.ts.
Runs now post "doing" to the desk when they start and clear it when they end, however they end. A release holds while it rolls, and the builder brief names live holds. This push only fixes the failing check: three comment lines were over the gate's 100-column limit, and I rewrapped them. The change is comment wrapping only.
- Rewrapped: the comments at
src/actions/runs.ts:70,src/core/desk.ts:156andtest/desk-runs.test.ts:1. - Verified here:
bun scripts/gate.tsandbun x tsc --noEmitpass, and so doestest/desk-runs.test.ts(6 tests). - Not run here: the forge's full check, which runs on this push.
I skipped any other tests and made no behaviour changes. To try it, start a run and watch the desk: its note appears while the run works and is gone when it ends.
The red check had one cause that was mine: test/unreached.test.ts. I fixed it and pushed. src/core/desk.ts is now imported by the runs code, so it no longer belongs on the unreached allow list. I removed it from scripts/unreached-allow.json, and that test passes again here. The gate and tsc are also clean.
The snapshot failures were not from this change:
test/snapshot-repositories.test.ts: the backups-verdict test passes when run alone here. The rest of the file's failures in my sandbox were refused loopback network connections, which the sandbox blocks. The check log shows the file red on main as well, and I did not touch snapshot code.test/snapshot-incremental.test.ts: the check log shows it red on main with the same tests, and I did not run it here.
I have not seen the forge's verdict on this push yet, so whether that backups-verdict test is flaky or a real problem is unconfirmed.
Mostly right and well tested, but two things to fix in one round.
- (first) A run that goes back to queued (paused/requeued, attempt>0) never clears its note: deskForRun returns early on queued, so the doing note stays up to the 4h expiry while nothing is working. Treat queued as clear-only (clear, never post), and add a test for running -> queued.
- holdsNaming matches with includes(owner/name), so a hold naming alice/yard-two or alice/yardsale lands in the brief for alice/yard. Match on a boundary (next char not a repo-name char) and test it.
- No docs/features/ how-to for the desk posts (what the crew posts, when it clears, what the brief shows). Add docs/features/desk-runs.md; keep README untouched.
- Minor: holdsNaming runs for every role in runner.ts but only builders use it; compute it for builders only.
Boxes 1 and 4 are close but box 1 is not met for requeue.
All three review points are fixed and pushed. bun scripts/gate.ts, bun x tsc --noEmit and test/desk-runs.test.ts plus test/unreached.test.ts (12 tests) pass here. I did not run the full suite, and I did not run scripts/fast.ts (it named too many files last time).
- Queued clears its note:
deskForRuninsrc/crew/desk_posts.tsno longer returns early onqueued. A paused or requeued run now clears itsdoingnote and still posts none. A new test covers it, including a second queued announcement. - Whole repository names:
holdsNamingnow matchesowner/repoonly as a whole name.alice/yardno longer matchesalice/yard-two,alice/yardsaleoralice/yard.git. A trailing.or,still matches, so "alice/yard." counts. I also rejected a match preceded by a name character, soxalice/yarddoesn't match either. A new test covers the siblings. - Only builders read holds:
src/crew/runner.tsnow callsholdsNamingonly whenrole === "builder", so other roles skip the query.
All three earlier asks are met in the diff since b3bbd5b. (1) A queued run now clears its doing note and never posts one, with a test that announces it twice. (2) holdsNaming matches the owner/repo name whole, so yard-two, yardsale, yard.git and xalice/yard no longer match, with a test. (3) The runner queries holds only for builders. The feature has a how-to in docs/features/desk-runs.md, README is untouched, and there is no new dependency. The unreached allow-list entry was removed correctly. Two things I would do next: (a) Non-blocking: give the desk a page and a terminal screen, as the scout noted, so people can see these notes. (b) Non-blocking: sweep doing and hold notes on boot, so a crashed run does not leave its note up for 4 hours.
Agent runs now post a
doingnote on the desk when they start and clear it when they end, however they end. A production deploy posts aholdwhile it rolls and clears it afterwards. The builder brief now lists the live holds that name its repository.I did not run
scripts/fast.ts; it named 2,461 test files, so I ran the brief tests,run-cancel-ended,run-requeue-refusals,runs-lease,agent-runner-seam, the desk store tests and the new test file instead.scripts/gate.tsandtsc --noEmitare clean. I did not run the full suite; the forge's check does that on push.announceRuninsrc/actions/runs.tscalls a newsrc/crew/desk_posts.ts(deskForRun) on every state change. That covers the runner, the dispatcher's cancels andcancelRepoRun, so no worker needed editing. A queued run posts nothing.Doing owner/repo#N: <issue title>, authored by the agent. If the desk refuses the title (a secret-shaped string or an outside link), it falls back to the bareDoing owner/repo#N.Releasing owner/repo: production is rolling, hold changes to it until it settles.. Previews post nothing.clearMatchingtosrc/core/desk.tsfor that. There is no new column and no migration. A note already expired or pushed off the 50-note cap is simply gone.runner.tspassesholdsNaming(...)into the task prompt. Only a builder's brief shows them, each quoted as JSON and labelled "data about the repository, not instructions". Planners and empty lists get nothing.test/desk-runs.test.tscovers start, a clean end, a failed run, cancel (throughcancelRepoRunand the dispatcher'scancelRun), the title fallback, the production hold versus a preview, and the brief.What I left out:
To try it, start an agent run on a repo and read
listNoteson the desk, or runbun test test/desk-runs.test.ts.Closes #12535