@feigi/fleet-ctl 3.57.0 → 3.58.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/agents/fleet-fix-applier.agent.md +1 -1
- package/package.json +1 -1
- package/scripts/dispatch-prompt.mjs +1 -1
- package/scripts/ledger-grammar.mjs +44 -7
- package/scripts/ledger.mjs +85 -14
- package/skills/run-team/SKILL.md +112 -492
- package/skills/run-team/briefs/fix-applier.md +14 -0
- package/skills/run-team/references/close-out.md +95 -0
- package/skills/run-team/references/phase-0.md +397 -0
package/skills/run-team/SKILL.md
CHANGED
|
@@ -251,374 +251,47 @@ refreshes the Shortlist itself, and every admission is a **Pull** — one ticket
|
|
|
251
251
|
into one free implementer slot, the moment it frees (phase 1). Nothing in this
|
|
252
252
|
phase, or in any later one, asks the maintainer which tickets to take.
|
|
253
253
|
|
|
254
|
-
0. **Once per run, before anything else.**
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
`
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
writes `member-write-guard` cannot see — an `eval` cell, a `bash` that
|
|
296
|
-
`cd`s or `git -C`s into this checkout. `.fleet/`, `.worktrees/` and
|
|
297
|
-
`.agent-brain/` are gitignored and never trip it. Nor does this run's own
|
|
298
|
-
bookkeeping: `docs/metrics/tier-outcomes.tsv`,
|
|
299
|
-
`docs/metrics/member-outcomes.tsv` and `docs/metrics/ticket-features.tsv`,
|
|
300
|
-
which you write mid-run, are left out by name — anything else under
|
|
301
|
-
`docs/metrics/` still trips it. **The same
|
|
302
|
-
command is the clear, and it overwrites; it never compares.** On `MAIN-CHECKOUT-DIRTY`
|
|
303
|
-
the maintainer resolves the stray paths FIRST — inspect, keep or remove
|
|
304
|
-
them — and only then re-runs `--record`; re-recording over unresolved paths
|
|
305
|
-
certifies them. **Never re-record over `MAIN-CHECKOUT-UNKNOWN`**: that
|
|
306
|
-
walks the run from "could not look" to "certified clean" in one step, so
|
|
307
|
-
`--record` itself refuses over a baseline it cannot read, over one a newer
|
|
308
|
-
plugin wrote, and on any git read that fails. The exceptions are an
|
|
309
|
-
older-version baseline and a baseline whose commit is missing from the
|
|
310
|
-
repository; Phase 3's tick lines say how each is cleared.
|
|
311
|
-
`main-checkout.mjs --check` prints the same answer
|
|
312
|
-
without a tick.
|
|
313
|
-
|
|
314
|
-
**Run the pre-flight, once the pin and the baseline are recorded.**
|
|
315
|
-
`~/.fleet/bin/fleet-run preflight.mjs` checks what this machine and this
|
|
316
|
-
repository must give the fleet — the binaries, `gh` auth, `origin/main`,
|
|
317
|
-
`.worktrees/` and `.fleet/` ignored, the three labels, merge commits on, a
|
|
318
|
-
ruleset, the Resolver — and prints one `ok`, `WARN` or `FAIL` line per
|
|
319
|
-
check, each naming its check. **Exit 1 stops the run:** no shortlist, no
|
|
320
|
-
dispatch. Report every `FAIL` line to the maintainer by its check's name;
|
|
321
|
-
the run starts again once they are fixed. Exit 2 means it could not run at
|
|
322
|
-
all, or every check passed and the marker could not be written, and stops
|
|
323
|
-
the run the same way. `WARN ci-workflow` stops nothing:
|
|
324
|
-
a repo with no workflow named CI still runs, its workflow named per call
|
|
325
|
-
with `--workflow` or declared absent with `--declare-no-ci`. A pass writes
|
|
326
|
-
`.fleet/preflight.json`, keyed to a hash of the check set, and every later
|
|
327
|
-
run prints `PREFLIGHT SKIPPED` without a single `gh` call until a check is
|
|
328
|
-
added or changed.
|
|
329
|
-
|
|
330
|
-
**Check the merge gate against its spec, once the fast-forward has put the
|
|
331
|
-
ratified spec in front of you.** Where the workspace checks a ruleset spec
|
|
332
|
-
in, `.github/scripts/apply-ruleset.sh --check` compares it to the live gate
|
|
333
|
-
without writing anything (no spec checked in → nothing to run, skip it).
|
|
334
|
-
Three statuses and they are not interchangeable: **0** the gate is what the
|
|
335
|
-
tree says it is; **3** it is not — including the gate having been deleted
|
|
336
|
-
or renamed — and the diff it prints says how; **2** the question could not
|
|
337
|
-
be answered at all: no spec, no `gh`, a listing or read that failed
|
|
338
|
-
outright, or a read that succeeded but withheld `bypass_actors` because
|
|
339
|
-
the session lacks repository admin.
|
|
340
|
-
|
|
341
|
-
**3 does not stop the run and is not yours to fix** — reconciling is a
|
|
342
|
-
write to the gate protecting this repo, so it needs the maintainer.
|
|
343
|
-
Surface the diff and carry on. What it changes is what you may then claim:
|
|
344
|
-
every statement this run makes about which checks must pass before a merge
|
|
345
|
-
is sourced from the checked-in spec and is true of the live gate only
|
|
346
|
-
while this check is green, so a 3 means saying "the gate requires X"
|
|
347
|
-
without naming the drift is a false claim, and a 2 means you never learned
|
|
348
|
-
either way. Measured 2026-09-23: four contexts the spec required were
|
|
349
|
-
enforced by nothing live, and the gap sat
|
|
350
|
-
there unnoticed because the only thing that ever read the live gate was a
|
|
351
|
-
person choosing to.
|
|
352
|
-
|
|
353
|
-
**Drain the pending ticket-features rows and refresh the cost guard, after
|
|
354
|
-
the fast-forward and before the first Pull is routed.**
|
|
355
|
-
`~/.fleet/bin/fleet-run metrics-refresh.mjs` moves
|
|
356
|
-
`.fleet/ticket-features.pending.tsv` into `docs/metrics/ticket-features.tsv`,
|
|
357
|
-
deduped on `session`+`agent` — this recovers the rows of a run that crashed
|
|
358
|
-
before its close-out — and then runs `pr-cost.mjs --guard`, rewriting
|
|
359
|
-
`.fleet/cost-guard.json`, which the router reads and fails closed without
|
|
360
|
-
(no file: the default cell only). The guard has to be fresh before the
|
|
361
|
-
first Pull is routed, so the verdict reflects any rows just recovered. Exit
|
|
362
|
-
0: both ran. The guard's own exit 3 (a cell tripped) and 4 (no verdict yet)
|
|
363
|
-
are verdicts the router and `fleet-tick.mjs` read, never failures; the
|
|
364
|
-
script absorbs them. A workspace that lacks one of the three metrics TSVs
|
|
365
|
-
has no corpus to guard yet — its first run: the script prints a line naming
|
|
366
|
-
the missing file, skips the guard and exits 0. Exit 1 or 2 stops the run
|
|
367
|
-
before its first Pull: report the line the script printed on stderr, fix
|
|
368
|
-
the cause and run it again — each duty is safe to repeat.
|
|
369
|
-
|
|
370
|
-
**Launch the cockpit.** On every phase-0 pass, not just the first:
|
|
371
|
-
`node ~/.fleet/bin/fleet-run board.mjs serve --open &` in the
|
|
372
|
-
background. It is a read-only mirror of `.fleet/ledger.md` + `gh` — you never
|
|
373
|
-
feed or update it, and it survives your own compaction. The launch is
|
|
374
|
-
idempotent per workspace when the running cockpit answers the identity
|
|
375
|
-
handshake: an already-served workspace's launch finds the running server
|
|
376
|
-
over HTTP, prints its URL, and exits 0 without starting a second one —
|
|
377
|
-
nothing to skip. It opens nothing either: `--open` opens a tab
|
|
378
|
-
only from the launch that binds a port and starts the server, so a
|
|
379
|
-
re-shortlist leaves the board tab you already have alone. A second fleet
|
|
380
|
-
on another workspace collides with none of that: its own launch derives
|
|
381
|
-
that workspace's own port and binds it when free, or scans to the next
|
|
382
|
-
free port in its range when the derived one is already held by something
|
|
383
|
-
else — either way it gets its own board, just not always on the port its
|
|
384
|
-
hash predicts.
|
|
385
|
-
|
|
386
|
-
The spend panel reads this workspace's own `~/.omp/agent/sessions` tree,
|
|
387
|
-
and is pinned to whichever session first writes a transcript on this
|
|
388
|
-
cockpit's own watch: it will not follow a workspace that
|
|
389
|
-
already had another session's transcripts sitting there at launch. If the
|
|
390
|
-
panel is reading someone else's numbers, relaunch with `--spend-dir <path>`
|
|
391
|
-
naming this run's own session directory to override the heuristic outright —
|
|
392
|
-
`~/.omp/agent/sessions/<encoded-cwd>/<ISO>_<uuid>` (the directory, never
|
|
393
|
-
the `.jsonl` file of the same name beside it).
|
|
394
|
-
|
|
395
|
-
**Rotate the ledger before the fold-in below and before shortlisting —
|
|
396
|
-
every run, whatever way the previous one ended.** One ledger per run:
|
|
397
|
-
`~/.fleet/bin/fleet-run ledger.mjs rotate` moves the previous run's
|
|
398
|
-
`.fleet/ledger.md` byte-for-byte to `.fleet/ledger.<UTC
|
|
399
|
-
YYYY-MM-DDTHHMMSSZ>.md` and leaves none behind. What it carries forward
|
|
400
|
-
turns on the verdict it reaches below. After `dead` or `none` nothing is
|
|
401
|
-
carried — no row, exclusion, `## Filed` or `## Ruled` entry — so this
|
|
402
|
-
run's first write starts the empty skeleton, and an unchecked `impl-` row
|
|
403
|
-
a prior run left behind can no longer hold this run's tick: a dead
|
|
404
|
-
controller took its in-process members with it. After `ancestor` — this
|
|
405
|
-
session's own earlier run, whose members run inside the same omp process
|
|
406
|
-
and may still be live — it writes a new ledger holding every row of a
|
|
407
|
-
stream (one PR's rows) in which a row carries an unsettled member token
|
|
408
|
-
or an open `review=` launch, whole and with every other token on it, plus
|
|
409
|
-
every unsettled `## Dispatched` entry and the settled entry of each
|
|
410
|
-
member a carried row names; exclusions, `## Filed`, `## Ruled` and the
|
|
411
|
-
drain marker are never carried. Every other settled name — in
|
|
412
|
-
`## Dispatched` or on any row, and including a name whose outcome is
|
|
413
|
-
outside its family's vocabulary, whose line is skipped below — and every
|
|
414
|
-
reviewer runner a row launched goes into the new ledger's `## Retired` as
|
|
415
|
-
a bare name, with whatever the archive's own `## Retired` held: omp answers a second `task` under a name
|
|
416
|
-
this process has used with `<name>-2` while `hub send <name>` keeps
|
|
417
|
-
reaching the first, so a settled name stays taken for the session, not
|
|
418
|
-
the run. `dispatch` refuses a retired name and names the replacement — one
|
|
419
|
-
retry letter past the highest the session has used on that number,
|
|
420
|
-
`impl-42-b` for a ticket this session's earlier run worked as `impl-42` —
|
|
421
|
-
`review` refuses a retired runner name and names the next free reviewer
|
|
422
|
-
name, and `dispatch merge-bot` numbers past retired bots. The tick never
|
|
423
|
-
reads `## Retired`: a ticket an earlier run worked is not claimed by it
|
|
424
|
-
and can be shortlisted again.
|
|
425
|
-
A line it cannot parse is skipped with a warning naming it, and the
|
|
426
|
-
rotation still succeeds; a member name on a skipped line that carries an
|
|
427
|
-
outcome is retired all the same, and a bare member token on a skipped row
|
|
428
|
-
retires nothing. It prints `{rotated, archive, carried: {rows,
|
|
429
|
-
dispatched}, retired, skipped}`. The carried tokens keep the tick from
|
|
430
|
-
dispatching onto those members' work, keep their names taken, and give
|
|
431
|
-
their late results a token to settle; the stranded-claim step below
|
|
432
|
-
reconciles them.
|
|
433
|
-
What an unclean end left in
|
|
434
|
-
flight comes back through the ordinary per-run path: open PRs through the
|
|
435
|
-
fold-in below, `behind-pr:`/`behind-issue:` exclusions through phase 1's
|
|
436
|
-
collision and sequence checks, and a claim a dead run left without a PR
|
|
437
|
-
through the stranded-claim step below — resumed by a new member under a
|
|
438
|
-
new name when its worktree is in this checkout, reported to the
|
|
439
|
-
maintainer otherwise. An exclusion that expires with the run that wrote
|
|
440
|
-
it (`deferred-to-session-end` and its like) must be restated if it still
|
|
441
|
-
holds. **The guard is the
|
|
442
|
-
controller record**, `controller` in `.fleet/heartbeat.json`: the omp
|
|
443
|
-
process the previous run's rotation found above itself, and that
|
|
444
|
-
process's start time. Rotate judges it once, before anything moves. A
|
|
445
|
-
recorded controller that is still alive, still the same process (its
|
|
446
|
-
start time matches), and not an ancestor of this run refuses — exit 2,
|
|
447
|
-
nothing moved — **whatever its heartbeat mark says**, because a
|
|
448
|
-
controller can stop beating and keep dispatching. A dead one, a pid
|
|
449
|
-
reused by another process, or this session's own earlier run lets it
|
|
450
|
-
rotate. With no record the heartbeat mark decides, as the only guard
|
|
451
|
-
there is: still beating or acting — a beat inside its window, or with no
|
|
452
|
-
beat at all a tick or ledger write inside its window — refuses, naming
|
|
453
|
-
the latest beat, tick or ledger write and when it would count as stalled;
|
|
454
|
-
a stalled mark, a recorded `--stop`, or no mark at all lets it rotate —
|
|
455
|
-
and that fallback proves "not beating", never "dead", and
|
|
456
|
-
guards a ledger only: with none to move the mark is not consulted. With no
|
|
457
|
-
ledger the record is still judged, so a live recorded controller refuses
|
|
458
|
-
even then. It also refuses, nothing moved, when the stamped archive name
|
|
459
|
-
already exists, when the process table cannot be read, or when
|
|
460
|
-
`.fleet/heartbeat.json` exists but cannot be used — unreadable, not JSON,
|
|
461
|
-
not a JSON object, or holding a `controller` that cannot be judged — a
|
|
462
|
-
record nobody could judge is never taken for no record. On that refusal
|
|
463
|
-
phase 0 stops and the refusal goes to the maintainer verbatim: the
|
|
464
|
-
controller never edits or removes `.fleet/heartbeat.json`, because
|
|
465
|
-
removing it inside a live omp session makes this rotate judge `none` and
|
|
466
|
-
forfeits the carry — the live members and the retired names — so this
|
|
467
|
-
run could dispatch onto their work and reuse their names. Every writer
|
|
468
|
-
(`fleet-tick.mjs`, `fleet-heartbeat.mjs`, the ledger's write subcommands)
|
|
469
|
-
leaves such a file as it is. Its last act, ledger or none, is
|
|
470
|
-
to replace the record with this run's own — the nearest `omp` process
|
|
471
|
-
above it, its start time, as `prior` the verdict it reached on the
|
|
472
|
-
record it found (`dead`, `ancestor` or `none`), and as `at` when it wrote
|
|
473
|
-
it — or to remove the key when
|
|
474
|
-
no `omp` process is above it. The same write stamps `acted`, the time of
|
|
475
|
-
this run's latest ledger write, which every write subcommand stamps from
|
|
476
|
-
then on. That write can fail, and then exit 2 follows
|
|
477
|
-
a move: `rotated <file> -> <archive>` on stderr, then the refusal that the
|
|
478
|
-
record could not be written. Run the rotation before this run's own first
|
|
479
|
-
tick, beat or ledger write, each of which writes a mark the fallback reads. Older
|
|
480
|
-
archives, hand-named ones included, are left alone.
|
|
481
|
-
|
|
482
|
-
**Reclaim scratch straight after the rotation — every run.**
|
|
483
|
-
`~/.fleet/bin/fleet-run reclaim-scratch.mjs --root <scratch>
|
|
484
|
-
--after-rotate --apply`, `<scratch>` the path `scratch-root.mjs` prints,
|
|
485
|
-
so a run that merges nothing still reclaims the previous run's leftovers
|
|
486
|
-
(**Reclaim scratch after each merge pass** says what it removes).
|
|
487
|
-
`--after-rotate` goes on this call always and on no other: rotate leaves
|
|
488
|
-
no ledger behind when it carried nothing, and the flag reads that absence
|
|
489
|
-
as "no live token" — rotate's own verdict — where without it the script
|
|
490
|
-
refuses. A ledger rotate did write is read as usual. Record nothing on the
|
|
491
|
-
ledger and act on nothing in its receipt.
|
|
492
|
-
|
|
493
|
-
**Derive the Recipe — the Recipe derivation step — before the fold-in below
|
|
494
|
-
and before the first claim.** Every claim runs this repository's Install
|
|
495
|
-
step and bakes its Test entrypoint into the member's runner, and every
|
|
496
|
-
review reads the Test entrypoint, all out of the **Recipe cache**
|
|
497
|
-
(`.fleet/recipe.json` beside the common git dir); no script infers either
|
|
498
|
-
command. Check it first: `~/.fleet/bin/fleet-run derive-testcmd.sh .
|
|
499
|
-
install` and `~/.fleet/bin/fleet-run derive-testcmd.sh . test --at
|
|
500
|
-
origin/main`. **Both exit
|
|
501
|
-
0 → the cache is present and valid: use it as it stands and derive
|
|
502
|
-
nothing.** Either exits 1 (a refusal about the cache) → derive it; a refusal
|
|
503
|
-
naming `--at` says `origin/main` does not resolve, which is no cache fault —
|
|
504
|
-
fetch it and check again, since deriving would not help. Either
|
|
505
|
-
exits 3 → the reader could not run a tool it needs, so the cache's state is
|
|
506
|
-
unknown: fix that environment fault and check again; deriving would not
|
|
507
|
-
help. This step is yours: one derivation
|
|
508
|
-
per run start at most, never one per member, and a member never derives.
|
|
509
|
-
Dispatch a `task` member named `derive-recipe`, agent
|
|
510
|
-
`fleet-recipe-deriver`, and wait for its report — nothing in this run can
|
|
511
|
-
claim before it lands:
|
|
512
|
-
|
|
513
|
-
> Derive, prove and cache the Recipe of the repository at `<repo>`. Your
|
|
514
|
-
> scratch directory is `<scratch>/derive-recipe/`; write nowhere else.
|
|
515
|
-
> Follow your definition's procedure exactly, and end with its report line.
|
|
516
|
-
|
|
517
|
-
`<repo>` is this main checkout's absolute path and `<scratch>` is the
|
|
518
|
-
absolute path `scratch-root.mjs` prints (**The scratch root is computed**
|
|
519
|
-
above), written into the prompt before you send it. The member reads the repository,
|
|
520
|
-
proposes both commands and proves them with `recipe-prove.mjs` in a
|
|
521
|
-
throwaway worktree of `origin/main`: the Install step must leave the tree
|
|
522
|
-
clean, and the Test entrypoint must be shown to run real tests — the
|
|
523
|
-
runner's own non-zero count, or a deliberate mutation of one test that
|
|
524
|
-
turns the run red. Only a proof writes the cache, with `derivedAt` (the
|
|
525
|
-
`origin/main` commit it ran against) and the proof itself. **`RECIPE
|
|
526
|
-
PROVEN`** → re-run both reads above (`derive-testcmd.sh . install` and
|
|
527
|
-
`derive-testcmd.sh . test --at origin/main`); their output is the
|
|
528
|
-
Recipe this run uses. **`RECIPE NOT PROVEN`** → stall, below.
|
|
529
|
-
|
|
530
|
-
**Mid-run, a cache that stops running is re-derived once, then the run
|
|
531
|
-
stalls.** A claim or a review that refuses because the Recipe cache is
|
|
532
|
-
invalid — a command that no longer runs, or an Install step that changed
|
|
533
|
-
the tree — is the one mid-run trigger: dispatch `derive-recipe` again
|
|
534
|
-
exactly as above, then retry what refused. The Install step's refusals
|
|
535
|
-
fire after the claim has labelled the ticket and created its worktree, so
|
|
536
|
-
release that claim with `release-ticket.sh` first (**Release the claims
|
|
537
|
-
that never became PRs**). A red suite never triggers it: a failing test is
|
|
538
|
-
a finding, not a stale Recipe. **Stall:** `RECIPE NOT PROVEN` from any
|
|
539
|
-
derivation, or a second invalid-cache refusal after this run's one
|
|
540
|
-
re-derivation, halts the run — no Pull, no claim, no review dispatch — and
|
|
541
|
-
you report `STALL — Recipe not proven: <cause>` to the maintainer with the
|
|
542
|
-
deriver's reason verbatim. A repository the fleet cannot run needs human
|
|
543
|
-
hands, the `ready-for-human` cause: a toolchain this machine lacks, a
|
|
544
|
-
suite that runs no tests the proof can see, or an Install step, Test
|
|
545
|
-
entrypoint or mutation that hangs until the proof's own bound refuses it as
|
|
546
|
-
timed out. It is never a loop: no third derivation, and never a cache
|
|
547
|
-
written by hand.
|
|
548
|
-
|
|
549
|
-
**Fold in every PR a prior run left open, before shortlisting.** However it
|
|
550
|
-
is named and whatever it carries — ticket work whose review was deferred, or
|
|
551
|
-
that run's own metrics — it is reviewable work no member otherwise picks up,
|
|
552
|
-
because the Shortlist holds ISSUES and nothing looks at inherited PRs. Queue
|
|
553
|
-
each for review exactly as ticket work: same review workflow, same
|
|
554
|
-
fix-applier, same finisher. **Skip a PR a row rotate carried already
|
|
555
|
-
holds** — its `#<pr>` key, or the PR of its `impl-<N>=PR#<pr>` token: that
|
|
556
|
-
row already queues it, and a `ledger.mjs row` write replaces the whole
|
|
557
|
-
line, wiping the live tokens carried on it. Measured 2026-09-03 — a prior
|
|
558
|
-
run's ticket PR arrived this way and its review found a defect its own PR
|
|
559
|
-
body called
|
|
560
|
-
unreviewed, and a metrics PR's review then caught two metrics rows the
|
|
561
|
-
controller had missed in its own close-out, so no PR is exempt from being
|
|
562
|
-
wrong. Reviewing them next run is also what stops one pinning
|
|
563
|
-
`fleet-tick`'s backlog forever: unreviewable AND uncounted is the state
|
|
564
|
-
that strands it.
|
|
565
|
-
|
|
566
|
-
**Resume the claims a dead run left without a PR — after the fold-in,
|
|
567
|
-
before shortlisting.** A claim's label and worktree exist before its first
|
|
568
|
-
push, and rotation after a dead run carries no row forward, the candidate
|
|
569
|
-
scan excludes `in-progress`, and the in-flight check reads the worktree as
|
|
570
|
-
taken — so a
|
|
571
|
-
claim the previous run left without a PR is held by nobody until this step
|
|
572
|
-
names it. `~/.fleet/bin/fleet-run stranded.mjs` lists and classifies; you
|
|
573
|
-
dispatch. It reads the `prior` rotate just recorded, never the record
|
|
574
|
-
itself, which names this run's own live controller, and prints
|
|
575
|
-
`{prior, claims: [{n, t, action, worktree, branch, why}], carried: [{name,
|
|
576
|
-
token, row}]}`:
|
|
577
|
-
|
|
578
|
-
- `prior: dead` — every open `in-progress` issue with no open PR (one with
|
|
579
|
-
an open PR is the fold-in's): `resume` when exactly one worktree for it
|
|
580
|
-
sits under this checkout's `.worktrees/`, `report` otherwise.
|
|
581
|
-
- `prior: ancestor` — this session's own earlier run: no claim is listed.
|
|
582
|
-
`carried` lists every live token rotate carried — its member or runner
|
|
583
|
-
`name` (a `review=wf:` launch's runId), the `token` as the ledger holds
|
|
584
|
-
it, and the `row` carrying it, null for a member only `## Dispatched`
|
|
585
|
-
names. Reconcile them before shortlisting: read `proc://` once, find
|
|
586
|
-
each `name` among this session's jobs, and act on its state.
|
|
587
|
-
`running` → keep the token. `completed` or `failed` → record its
|
|
588
|
-
result from `agent://<id>` as the **Record, then tick** table records
|
|
589
|
-
that member's report; an output you cannot read is a death the
|
|
590
|
-
Member-killed row confirms. `cancelled` → record it dead. Absent, or a
|
|
591
|
-
state you cannot read → keep the token live and let the Member-killed
|
|
592
|
-
row clear it: a token nothing confirms dead counts as live. Recording a
|
|
593
|
-
death has two forms, here and on the Member-killed row alike. An
|
|
594
|
-
`impl-`, `fix-pr-`, `finisher-pr-` or `merge-bot-` member is settled:
|
|
595
|
-
`ledger.mjs settle <name> killed`. A reviewer is no member `settle`
|
|
596
|
-
takes — `settle review-pr-<n> killed` exits 2 — so its launch is
|
|
597
|
-
settled `=failed` where it stands: a `ledger.mjs review <pr>
|
|
598
|
-
review=member:<name>=failed` call that turns `review=member:<name>` on
|
|
599
|
-
the PR's row into `review=member:<name>=failed`
|
|
600
|
-
(`wf:` launches alike), after which the tick owes the PR
|
|
601
|
-
a review again under the next free reviewer name.
|
|
602
|
-
- `prior: none` — no record proves the previous run dead (no record yet, or
|
|
603
|
-
no `omp` process found above the rotation): every claim is `report`, and
|
|
604
|
-
nothing is resumed.
|
|
605
|
-
|
|
606
|
-
A `resume` follows the Member-killed row across the run boundary: a new
|
|
607
|
-
member under a new name — `impl-<N>-b`, or one letter past the highest
|
|
608
|
-
`impl-<N>-<x>` in the archive that rotate printed the path of — on the same
|
|
609
|
-
ticket, in the printed worktree and branch, its prompt the phase 2 prompt
|
|
610
|
-
off a fresh read of the issue plus what it inherits (`git -C <worktree> log
|
|
611
|
-
--oneline origin/main..HEAD`, `git -C <worktree> status --short`, and the
|
|
612
|
-
files under `<scratch>/impl-<N>/`). Record it the ordinary way —
|
|
613
|
-
`ledger.mjs row <N>
|
|
614
|
-
"impl-<N>-b"`, then `ledger.mjs dispatch <N> impl-<N>-b`, then the `task`
|
|
615
|
-
call naming the `agent` it printed, then the tier check — and never
|
|
616
|
-
`claim-ticket.sh`: the claim already stands. A `report` goes to the
|
|
617
|
-
maintainer as `#<N> — <why>` and nothing else: no dispatch, no label change,
|
|
618
|
-
no release. Exit 2 is a list that did not answer — a `gh` or `git`
|
|
619
|
-
failure, a list at its cap, a worktree whose presence cannot be told, or,
|
|
620
|
-
after `ancestor`, a ledger that cannot be read — and is never nothing
|
|
621
|
-
stranded.
|
|
254
|
+
0. **Once per run, before anything else.** Run `~/.fleet/bin/fleet-run
|
|
255
|
+
phase0.mjs --session <session-dir>` from this main checkout, `<session-dir>`
|
|
256
|
+
being this run's own session directory. Add `--implementer-cap <n>` and
|
|
257
|
+
`--reviewer-cap <n>` for the caps `$ARGUMENTS` gave, `--plugin-checkout
|
|
258
|
+
<dir>` when this workspace tracks no `plugin/…` of its own, `--spend-dir
|
|
259
|
+
<dir>` to name the directory the cockpit's spend panel reads, and
|
|
260
|
+
`--workflow <name>` or `--declare-no-ci` when the repository has no workflow
|
|
261
|
+
named CI. It runs the start sequence in its fixed order — branch,
|
|
262
|
+
fast-forward, pin, baseline, preflight, ruleset, tier-roles, metrics,
|
|
263
|
+
cockpit, rotate, reclaim, recipe, fold-in, stranded, shortlist — prints one
|
|
264
|
+
`phase0: <step>: <status>` line per step with the `NEED` lines last, and
|
|
265
|
+
records each step in `.fleet/phase0.json`, which the tick reads: it prints
|
|
266
|
+
`PHASE0-INCOMPLETE` and holds every dispatching row until the receipt is whole.
|
|
267
|
+
Dispatch nothing before it exits 0. Exit 3 is a step that failed: its line
|
|
268
|
+
carries the refusal, so fix the cause and run it again. Exit 4 is a step
|
|
269
|
+
that needs you: act on each `NEED` line below, then run it again. Once
|
|
270
|
+
`rotate` has run, a re-run skips every `ok` step and resumes where the last
|
|
271
|
+
one stopped; before it, a re-run runs every step again.
|
|
272
|
+
|
|
273
|
+
- `NEED derive-recipe` — the Recipe cache holds nothing valid. Dispatch a
|
|
274
|
+
`task` member named `derive-recipe`, agent `fleet-recipe-deriver`, its
|
|
275
|
+
prompt the brief `~/.fleet/bin/fleet-run dispatch-prompt.mjs render
|
|
276
|
+
recipe-deriver --member derive-recipe --repo <repo> --scratch <scratch>`
|
|
277
|
+
prints (`<repo>` this main checkout's absolute path, `<scratch>` what
|
|
278
|
+
`scratch-root.mjs` prints), and wait for its report. `RECIPE PROVEN` →
|
|
279
|
+
run `phase0.mjs` again. `RECIPE NOT PROVEN` → stall: report `STALL —
|
|
280
|
+
Recipe not proven: <cause>` to the maintainer with the deriver's reason
|
|
281
|
+
verbatim, and claim, Pull and review nothing.
|
|
282
|
+
- `NEED resume #<n> <worktree> <branch>` — a dead run's claim with no PR.
|
|
283
|
+
Dispatch a stranded `impl-<n>-b` the ordinary way (record it with
|
|
284
|
+
`ledger.mjs row`, render its brief, `ledger.mjs dispatch`, the `task`
|
|
285
|
+
call, the tier check), in that worktree and branch, and never with
|
|
286
|
+
`claim-ticket.sh`: the claim stands. A re-run finds the need met once its
|
|
287
|
+
row is written. A `report #<n> — <why>` line is the maintainer's and
|
|
288
|
+
nothing else, and a `carried` line is a live token to reconcile first.
|
|
289
|
+
- `NEED review PR#<pr> (closes no issue)` — an open PR a prior run left
|
|
290
|
+
that no row can queue. Advice, never an exit status: hand-dispatch its
|
|
291
|
+
review exactly as ticket work, or leave it.
|
|
292
|
+
|
|
293
|
+
A `drift` or `unanswered` ruleset step is advice too: surface the diff and
|
|
294
|
+
go on. See references/phase-0.md.
|
|
622
295
|
|
|
623
296
|
1. **Build the Shortlist** — `~/.fleet/bin/fleet-run shortlist.mjs`, then read
|
|
624
297
|
`.fleet/shortlist.json`. The script runs the cheap filters and nothing else
|
|
@@ -1157,12 +830,16 @@ a worktree, a branch and an `in-progress` label with no member behind them,
|
|
|
1157
830
|
released by the end-of-run sweep rather than by a member that did the work.
|
|
1158
831
|
|
|
1159
832
|
**Record the dispatch before you make it.** `ledger.mjs row` wrote the row at
|
|
1160
|
-
the Pull's step 7; `~/.fleet/bin/fleet-run
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
833
|
+
the Pull's step 7; `~/.fleet/bin/fleet-run dispatch-prompt.mjs render
|
|
834
|
+
implementer --member impl-<N> …` then renders its brief, and
|
|
835
|
+
`~/.fleet/bin/fleet-run ledger.mjs dispatch <N> impl-<N>`
|
|
836
|
+
marks `impl-<N>` live on it and in `## Dispatched`, and the call follows.
|
|
837
|
+
Its JSON carries `agent`, the definition that call names, and `brief.path`,
|
|
838
|
+
the rendered brief whose content is that call's prompt — read both off that
|
|
839
|
+
output, never recall them. Live implementers are the `impl-` tokens with no
|
|
1164
840
|
`=<outcome>` — the tick reads that count off the ledger, and nobody states
|
|
1165
|
-
it. `dispatch` refuses
|
|
841
|
+
it. `dispatch` refuses a member with no brief rendered for its role, naming
|
|
842
|
+
the `render` command to run first, and refuses once the
|
|
1166
843
|
run is draining: drain stops supply. It also refuses a row whose `tier=`
|
|
1167
844
|
names no single definition — two different values, or one that is not a
|
|
1168
845
|
definition suffix — or names one with no `agents/<definition>.agent.md`,
|
|
@@ -1501,90 +1178,9 @@ in-between width cannot be told apart from a shifted one. The `note` field is
|
|
|
1501
1178
|
free text and sits before those four, so the script refuses a tab or newline in
|
|
1502
1179
|
it: one tab would shift all four for that row alone.
|
|
1503
1180
|
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
```bash
|
|
1508
|
-
PROJECT_DIR="$(node -e 'import("./scripts/member-record.mjs").then(m => console.log(m.encodeProjectDir(process.cwd())))')"
|
|
1509
|
-
for d in "$HOME/.omp/agent/sessions/$PROJECT_DIR"/*/; do
|
|
1510
|
-
node scripts/member-outcomes.mjs "$d"
|
|
1511
|
-
done
|
|
1512
|
-
```
|
|
1513
|
-
|
|
1514
|
-
`encodeProjectDir` (defined in `scripts/member-record.mjs`) encodes the cwd
|
|
1515
|
-
exactly as omp names its session directories — see its comment for the rule — and hand-guessing that path is why
|
|
1516
|
-
the fleet's own panel once rendered nothing here. The trailing `/` on the glob matters:
|
|
1517
|
-
the same encoded-cwd directory also holds this cwd's own top-level session
|
|
1518
|
-
transcripts as loose FILES sibling to the per-session directories, and a
|
|
1519
|
-
glob without it would try to scrape one of those as if it were a session.
|
|
1520
|
-
|
|
1521
|
-
**Do not narrow this to "this run's session" with `findSubagentsDir`.** That helper
|
|
1522
|
-
answers a different question — the session with the NEWEST transcript for this cwd,
|
|
1523
|
-
which is not the same as the one you are in. Any other session sharing this cwd —
|
|
1524
|
-
a second terminal, a second controller run — can hold a newer transcript than
|
|
1525
|
-
yours at the moment you reach this step, and a second session dispatching
|
|
1526
|
-
anything while you reach it wins the tie: the run then re-scrapes a stranger's
|
|
1527
|
-
members, prints a plausible row count and exits 0 while its own facts are
|
|
1528
|
-
never recorded. Looping every session dir costs a few seconds, cannot pick
|
|
1529
|
-
wrong, and is idempotent by construction.
|
|
1530
|
-
|
|
1531
|
-
The scraper takes the session directory itself and refuses a path it cannot
|
|
1532
|
-
read — a missing, unreadable or non-directory path all exit 2 — so a wrong
|
|
1533
|
-
path fails loudly instead of writing nothing and exiting 0. It reports the
|
|
1534
|
-
run's own YIELD, `scraped N of M members (D dropped)`, alongside the file's
|
|
1535
|
-
total: read the yield, because the total is the whole corpus and looks
|
|
1536
|
-
healthy even when every member of this session dropped.
|
|
1537
|
-
|
|
1538
|
-
It derives every row from the member transcripts omp already wrote — both the
|
|
1539
|
-
flat ones and a member's own nested fan-out one level down — so a
|
|
1540
|
-
second run over the same session changes nothing and a re-run after a member is
|
|
1541
|
-
re-dispatched picks the new transcript up. **Never hand-edit
|
|
1542
|
-
`docs/metrics/member-outcomes.tsv`** — it is regenerated wholesale whenever the
|
|
1543
|
-
role classifier changes, and a hand-entered value would not survive that. The
|
|
1544
|
-
verdict for a PR goes to `tier-outcomes.tsv` through `tier-outcomes.mjs
|
|
1545
|
-
append`, as above. Once both files hold this run's rows, and before either is
|
|
1546
|
-
committed, run `~/.fleet/bin/fleet-run tier-outcomes.mjs check --live`. Exit 1
|
|
1547
|
-
names each row whose `tier` disagrees with the one implementer the member facts
|
|
1548
|
-
say ran for its ticket: correct that row's `tier` to the short name it prints,
|
|
1549
|
-
or blank it and say why in `note`. Exit 1 also names the PRs of the case where
|
|
1550
|
-
the latest `run_date`'s filled rows have no implementer row in the member file
|
|
1551
|
-
and none could be compared, so nothing from that run was checked: append the
|
|
1552
|
-
run's member rows if they are missing, or blank each named row's `tier` and say
|
|
1553
|
-
why in `note`.
|
|
1554
|
-
Each WARNING names a PR this run's ledger marks `reviewed=` that has no row yet
|
|
1555
|
-
— append it before committing if it is an implementer PR.
|
|
1556
|
-
|
|
1557
|
-
**Drain the pending ticket-features rows and refresh the cost guard, after
|
|
1558
|
-
the member-outcomes scrape and every `tier-outcomes.mjs append`, before the
|
|
1559
|
-
metrics files are committed.** `~/.fleet/bin/fleet-run metrics-refresh.mjs`
|
|
1560
|
-
moves `.fleet/ticket-features.pending.tsv` — the row the router script
|
|
1561
|
-
appended for each Pull at dispatch — into `docs/metrics/ticket-features.tsv`,
|
|
1562
|
-
deduped on `session`+`agent`, so this run's own rows are in the file that gets
|
|
1563
|
-
committed; that file is a run artifact too and is committed with the other
|
|
1564
|
-
two. It then runs `pr-cost.mjs --guard`, which rewrites
|
|
1565
|
-
`.fleet/cost-guard.json` from all three files. Exit 0: both ran. The guard's
|
|
1566
|
-
own exit 3 (a cell tripped) and 4 (no verdict yet, baseline too thin) are
|
|
1567
|
-
verdicts the router and `fleet-tick.mjs` read, never failures; the script
|
|
1568
|
-
absorbs them. Exit 1 names the duty that failed on stderr and the duty after it
|
|
1569
|
-
did not run; exit 2 is a usage error. At close-out a failure is reported to the
|
|
1570
|
-
maintainer and does not stop the commit — the pending file stays in `.fleet/`
|
|
1571
|
-
and the next run's phase-0 pass drains it — but never commit the metrics files
|
|
1572
|
-
with a drain that failed claiming the corpus is complete.
|
|
1573
|
-
|
|
1574
|
-
The metrics files are the run's own artifacts and none commits itself. Carry
|
|
1575
|
-
them to main the same way the run carries any other controller-authored change;
|
|
1576
|
-
leaving a regenerated 5,000-row corpus uncommitted in the checkout is how it gets
|
|
1577
|
-
discarded by the next `git checkout` with nothing to show it ever ran.
|
|
1578
|
-
|
|
1579
|
-
**Commit the metrics files and open a PR — at end of run.** The branch name is
|
|
1580
|
-
the repository's choice. Make the commit on a branch in the main checkout,
|
|
1581
|
-
switch back to `main` before the next tick, and never `--record` while on that
|
|
1582
|
-
branch; the round trip reads clean. A PR still open when the run ends is one phase 0's
|
|
1583
|
-
fold-in queues for review next run, however it is named, so the files reach
|
|
1584
|
-
`main` through the same review as ticket work rather than being lost. Stranding
|
|
1585
|
-
a data row loses it: `member-outcomes.tsv` is regenerated from harness
|
|
1586
|
-
transcripts the fleet does not own, so re-running the scrape later is worth
|
|
1587
|
-
only what the harness still holds.
|
|
1181
|
+
The member-facts scrape, the drain of the pending ticket-features rows and the
|
|
1182
|
+
commit of the metrics files are steps of `closeout.mjs finish`, which **End of
|
|
1183
|
+
run** (Phase 3) drives. See references/close-out.md.
|
|
1588
1184
|
|
|
1589
1185
|
**Why not decide inside one run.** A run holds 2-3 implementer PRs, and ticket
|
|
1590
1186
|
difficulty swamps the tier effect — a gojq parity harness and a two-statement
|
|
@@ -1797,25 +1393,32 @@ owes beyond its row:
|
|
|
1797
1393
|
on a conflict needs no record from you — the bot already appended
|
|
1798
1394
|
`conflict-hold:#<pr>` to that PR's row, and the tick turns it into `DISPATCH
|
|
1799
1395
|
fix-pr PR#<pr>` (**Reviewers**).
|
|
1800
|
-
- **The run ends, or the maintainer says drain** → `
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
the
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
`
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1396
|
+
- **The run ends, or the maintainer says drain** → `closeout.mjs begin` first
|
|
1397
|
+
(below): it drains and releases every claim that never became a PR. Nothing
|
|
1398
|
+
else in the loop fires for those claims. The marker is on disk, so the tick
|
|
1399
|
+
holds the implementer row at `HOLD (draining)` from then on — for a
|
|
1400
|
+
replacement controller too — and keeps the review, fix-applier and merge rows
|
|
1401
|
+
firing until the open PRs merge. The drain starts the end of the run; it does
|
|
1402
|
+
not end it. **End of run**, in this order:
|
|
1403
|
+
1. `~/.fleet/bin/fleet-run closeout.mjs begin --reason "<reason>"` — drains
|
|
1404
|
+
(`ledger.mjs drain`), then releases every claim that never became a PR and
|
|
1405
|
+
settles each `impl-<N>=released` (**Release the claims that never became
|
|
1406
|
+
PRs**). A claim it refuses prints `NEED hand-release #<N> <blocker>`: that
|
|
1407
|
+
refusal is the finding, so run `worktree-audit.sh` and decide by hand.
|
|
1408
|
+
`begin` selects a claim with no PR and a live or `bailed` implementer token
|
|
1409
|
+
on every run, so a claim you keep leaves `begin` at exit 4 on every run:
|
|
1410
|
+
release the rest by hand and run `begin` again.
|
|
1411
|
+
2. Act on the review, fix-applier and merge rows until the tick prints
|
|
1412
|
+
`ACTION: run over → fleet-heartbeat.mjs --stop "<reason>"`, which it does
|
|
1413
|
+
once the run is draining with no open PR and no live implementer.
|
|
1414
|
+
3. `~/.fleet/bin/fleet-run closeout.mjs finish --reason "<reason>"` — scrapes
|
|
1415
|
+
the run's member facts, checks the tier-outcomes rows, refreshes the
|
|
1416
|
+
metrics, commits the three metrics files and opens their PR, then records
|
|
1417
|
+
`fleet-heartbeat.mjs --stop` last, because every reader takes a recorded
|
|
1418
|
+
stop as the end of the run. A `NEED tier-outcomes append <pr>` is a PR
|
|
1419
|
+
the ledger marks reviewed with no verdict row: append it with the verdict
|
|
1420
|
+
you rule (**Guard: accumulate per PR**) and run `finish` again. A step it
|
|
1421
|
+
fails is explained in references/close-out.md. Exit 0 is the run closed.
|
|
1819
1422
|
- **Monitor: CI run completes** → bind it (`ci-state.mjs --pr <N>`) and **record
|
|
1820
1423
|
it as `ci=<run-id>:<attempt>:<conclusion>`, not just "CI green"** — in the
|
|
1821
1424
|
ticket's ledger row, which outlives your context: `ledger.mjs token <key>
|
|
@@ -1935,8 +1538,10 @@ depth** guard table applied in code. Act on each line as it reads:
|
|
|
1935
1538
|
list shows PR M without `ready-to-merge`, and no `label-off=` (**Run ledger**)
|
|
1936
1539
|
accounts for the removal. Apply the finisher gate (**Reviewers**: the
|
|
1937
1540
|
`check` job green on the current head), then dispatch the next-suffix
|
|
1938
|
-
finisher at that head
|
|
1939
|
-
|
|
1541
|
+
finisher at that head, one letter past the highest the PR has used: render
|
|
1542
|
+
its brief with `dispatch-prompt.mjs render finisher --kind repair --member
|
|
1543
|
+
finisher-pr-<M>-<x> …`, then `ledger.mjs dispatch <M> finisher-pr-<M>-<x>`.
|
|
1544
|
+
Never add the label yourself. A head
|
|
1940
1545
|
that moved is caught by the new finisher's duty 1 `past-pin` halt and the
|
|
1941
1546
|
re-review path that follows it. Finishers take no reviewer slot, so this
|
|
1942
1547
|
prints whatever the reviewer cap reads.
|
|
@@ -1994,8 +1599,8 @@ depth** guard table applied in code. Act on each line as it reads:
|
|
|
1994
1599
|
paths yourself, and never re-baseline over paths nobody has resolved. The
|
|
1995
1600
|
changes of yours that trip it are a mid-run tooling fix edited in this
|
|
1996
1601
|
checkout and the close-out commit's round trip through a branch; **Fix the
|
|
1997
|
-
tooling mid-run** and
|
|
1998
|
-
|
|
1602
|
+
tooling mid-run** and the commit section of references/close-out.md say how
|
|
1603
|
+
each is cleared.
|
|
1999
1604
|
- `MAIN-CHECKOUT-UNKNOWN …` with `HOLD (main checkout unknown)` — the tick
|
|
2000
1605
|
could not look: a git or hash read failed (`could not look:`), or the
|
|
2001
1606
|
baseline exists but cannot be read (`baseline unreadable:`). Never clean,
|
|
@@ -2601,8 +2206,9 @@ no review fix-applier
|
|
|
2601
2206
|
has landed `applied:`/`no-op` on since, with no fix-applier live on it — one
|
|
2602
2207
|
named member per PR, `fix-pr-<pr#>` (the next suffix when that name is already
|
|
2603
2208
|
on record), never the PR's
|
|
2604
|
-
implementer,
|
|
2605
|
-
|
|
2209
|
+
implementer, its brief rendered with `dispatch-prompt.mjs render fix-applier
|
|
2210
|
+
--kind review --member fix-pr-<pr#> …` and then recorded with `ledger.mjs
|
|
2211
|
+
dispatch <pr#> fix-pr-<pr#>` before the call. Its prompt carries the PR number, the worktree abs path, the PR's branch,
|
|
2606
2212
|
the same `testCmd` you passed the review, and the **path** `<scratch>/pr<pr>/<run>/review.json`,
|
|
2607
2213
|
`<run>` off the PR's latest `reviewed=` — never the findings. Every `<scratch>`
|
|
2608
2214
|
in that prompt is the absolute path `scratch-root.mjs` printed, the
|
|
@@ -2619,7 +2225,9 @@ unresolved `conflict-hold:#<M>`, the merge bot's (`run-merge-bot.md` step 1's
|
|
|
2619
2225
|
fallback) or one you recorded off the tick's `CONFLICT` line —
|
|
2620
2226
|
is the same slot with a different job, and no review file to hand
|
|
2621
2227
|
over. Name it `fix-pr-<M>`, or the next suffix (`-b`, `-c` …) when that name is
|
|
2622
|
-
already on record — `dispatch` refuses a reused one —
|
|
2228
|
+
already on record — `dispatch` refuses a reused one — render its brief with
|
|
2229
|
+
`dispatch-prompt.mjs render fix-applier --kind conflict --member <name> …`,
|
|
2230
|
+
and dispatch it with the
|
|
2623
2231
|
`agent` that `ledger.mjs dispatch` printed, in the PR's existing worktree.
|
|
2624
2232
|
`dispatch` prints this member's definition, `fleet-fix-applier` whatever the
|
|
2625
2233
|
row's `tier=` — read it off that output, never recall it. Its prompt takes the prompt below's
|
|
@@ -2661,7 +2269,8 @@ edges are the only route there, so do not wait for an event. Edit one of these
|
|
|
2661
2269
|
bullets without the others and what strands is exactly the red-only PR.
|
|
2662
2270
|
|
|
2663
2271
|
Name it `fix-pr-<M>`, or the next free suffix (`-b`, `-c` …) — `dispatch`
|
|
2664
|
-
refuses a reused name —
|
|
2272
|
+
refuses a reused name — render its brief with `dispatch-prompt.mjs render
|
|
2273
|
+
fix-applier --kind red-check --member <name> …`, record it with `ledger.mjs dispatch <pr#> <name>`
|
|
2665
2274
|
before the call, and dispatch it with the `agent` that command printed
|
|
2666
2275
|
(`fleet-fix-applier`, as for a review fix-applier), in the PR's
|
|
2667
2276
|
existing worktree. Its prompt takes the prompt below's worktree, branch and
|
|
@@ -2680,7 +2289,7 @@ reach green" covers.
|
|
|
2680
2289
|
**A `DISPATCH fix-pr PR#<M>` on a dispositions mismatch** — the PR's row carries
|
|
2681
2290
|
`dispositions-mismatch=<member>:<run>` for its latest review's run, and no later
|
|
2682
2291
|
fix-applier has landed — is one automatic retry, a review fix-applier named the
|
|
2683
|
-
next suffix (`fix-pr-<M>-b`) and dispatched like the first
|
|
2292
|
+
next suffix (`fix-pr-<M>-b`) and dispatched like the first, its brief rendered with `--kind dispositions-retry`. Its prompt is the
|
|
2684
2293
|
first one's, with three paths and a list copied in: the review file
|
|
2685
2294
|
`<scratch>/pr<M>/<run>/review.json`, the mismatched member's record `<scratch>/dispositions-<member>.json`
|
|
2686
2295
|
it starts from, its own record `<scratch>/dispositions-<its own name>.json` it writes, and the check's violation list **verbatim** — the lines
|
|
@@ -3155,7 +2764,9 @@ infer, see the five-condition note in the fix-applier block above) — or
|
|
|
3155
2764
|
`ci-state.mjs` reads `verdict: "no-ci"`, see below — **and once the PR's review
|
|
3156
2765
|
has returned and its fix-applier, if one was dispatched, has sent its report,
|
|
3157
2766
|
which the CI-completes edge above states in full** — dispatch a
|
|
3158
|
-
**finisher** — a fresh small agent, not the fix-applier resumed.
|
|
2767
|
+
**finisher** — a fresh small agent, not the fix-applier resumed. Render its brief
|
|
2768
|
+
with `dispatch-prompt.mjs render finisher --kind fresh --member finisher-pr-<pr#> …`
|
|
2769
|
+
(`--kind repair` once an earlier finisher reported `labelled` without the label landing), record it with
|
|
3159
2770
|
`ledger.mjs dispatch <pr#> finisher-pr-<pr#>` before the call, then **dispatch
|
|
3160
2771
|
it with the `agent` that command printed and omit `model` on the call** — the
|
|
3161
2772
|
tier lives in that definition's frontmatter, `agents/fleet-finisher.agent.md`,
|
|
@@ -3580,8 +3191,11 @@ REVIEW-column open PR without the label, whose latest finisher attempt settled
|
|
|
3580
3191
|
so, `finisher:failed` or `finisher:killed` at severity 4 — one token per
|
|
3581
3192
|
outcome, neither the implementer's bare `killed` flag nor `unlabelled`. You
|
|
3582
3193
|
resolve it by hand: investigate why the finisher died, or dispatch the
|
|
3583
|
-
next-suffix finisher after the finisher gate
|
|
3584
|
-
finisher-pr-<M>-<x
|
|
3194
|
+
next-suffix finisher after the finisher gate: render its brief with
|
|
3195
|
+
`dispatch-prompt.mjs render finisher --kind fresh --member finisher-pr-<M>-<x>
|
|
3196
|
+
…` (`--kind repair` once an earlier finisher reported `labelled` without the
|
|
3197
|
+
label landing), then `ledger.mjs dispatch <M> finisher-pr-<M>-<x>`. The flag
|
|
3198
|
+
clears when a later attempt settles — `labelled`
|
|
3585
3199
|
(then `unlabelled` takes over while the label is still off), `halted:<cause>`,
|
|
3586
3200
|
or a live `-b` — or when the PR carries `ready-to-merge`, merges or closes.
|
|
3587
3201
|
You never add the label yourself, and the tick does not retry.
|
|
@@ -3650,7 +3264,10 @@ merge-bot` names it before the dispatch call — `n` is 1 + the highest
|
|
|
3650
3264
|
`merge-bot-<n>` the session holds, in the ledger's `## Dispatched` list, on a
|
|
3651
3265
|
row or in `## Retired`, so it restarts at 1 only when none was carried or
|
|
3652
3266
|
retired (a `dead` or `none` rotate, or a fresh start), a replacement for a
|
|
3653
|
-
dead bot takes the next `n`, and nobody counts.
|
|
3267
|
+
dead bot takes the next `n`, and nobody counts. With no brief rendered for
|
|
3268
|
+
that name it refuses, naming the bot and the `dispatch-prompt.mjs render
|
|
3269
|
+
merge-bot --member merge-bot-<n> …` to run — render it, then run `ledger.mjs
|
|
3270
|
+
dispatch merge-bot` again. Dispatch
|
|
3654
3271
|
it on the tick's `DISPATCH merge-bot`: the first `ready-to-merge` label is
|
|
3655
3272
|
enough, and it never waits for the finisher's report. Tell it to read
|
|
3656
3273
|
`$(~/.fleet/bin/fleet-run --root)/commands/run-merge-bot.md` and run **one**
|
|
@@ -4336,13 +3953,16 @@ it settles** — the grammar is `ledger-grammar.mjs`'s, and the tick derives eve
|
|
|
4336
3953
|
live count from it, so nobody states one. Write neither by hand:
|
|
4337
3954
|
|
|
4338
3955
|
- **`ledger.mjs dispatch <ticket|pr> <member>`** — before the dispatch call,
|
|
4339
|
-
marks the member live on its row and appends it to `## Dispatched
|
|
3956
|
+
marks the member live on its row and appends it to `## Dispatched` with
|
|
3957
|
+
`brief=<first 8 hex of its brief's sha256>`. `dispatch
|
|
4340
3958
|
merge-bot` names the next bot itself. It prints `{member, agent, ticket,
|
|
4341
|
-
line, created, total}
|
|
3959
|
+
line, created, total, brief}`, `brief` the `{path, sha256}` of the rendered
|
|
3960
|
+
brief the `task` call is handed; `agent` is the definition the `task` call names — an
|
|
4342
3961
|
implementer's comes off its row's `tier=` (phase 2's tier check states the
|
|
4343
3962
|
mapping), a finisher's and a merge bot's are their own definitions, and a
|
|
4344
3963
|
fix-applier's is `fleet-fix-applier` for every kind of work. It
|
|
4345
|
-
refuses a
|
|
3964
|
+
refuses a member whose `briefs/<member>.json` beside the ledger is missing,
|
|
3965
|
+
names another role or carries no sha256, a brief file beside it that is missing or does not hash to that sha256, a name this session already used — on the ledger or in its
|
|
4346
3966
|
`## Retired` — and names the replacement (`-b`, `-c` …), a
|
|
4347
3967
|
second live member on one ticket or PR, any implementer once the run is
|
|
4348
3968
|
draining, an implementer whose row's `tier=` names no single definition
|