@feigi/fleet-ctl 3.71.6 → 3.71.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feigi/fleet-ctl",
3
- "version": "3.71.6",
3
+ "version": "3.71.8",
4
4
  "description": "Agent fleet: run-team controller, merge bot, PR reviewer, and the ticket pipeline they share",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -1343,7 +1343,8 @@ owes beyond its call:
1343
1343
  once the run is draining with no open PR and no live implementer.
1344
1344
  3. `~/.fleet/bin/fleet-run closeout.mjs finish --reason "<reason>"` — scrapes
1345
1345
  the run's member facts, checks the tier-outcomes rows, refreshes the
1346
- metrics, commits the three metrics files and opens their PR, then records
1346
+ metrics, commits the three metrics files and opens their PR, sets the
1347
+ phase-0 receipt aside as `.fleet/phase0.previous.json`, then records
1347
1348
  `fleet-heartbeat.mjs --stop` last, because every reader takes a recorded
1348
1349
  stop as the end of the run. A `NEED tier-outcomes append <pr>` is a PR
1349
1350
  the ledger marks reviewed with no verdict row: append it with the verdict
@@ -2345,7 +2346,7 @@ A member that bails demotes nothing itself; demotion by cause is yours
2345
2346
 
2346
2347
  ## Fix the tooling mid-run
2347
2348
 
2348
- A tooling fix is done when it is re-pinned, written onto the ledger, reported to the maintainer in one line and landed as a PR through the run's own merge queue.
2349
+ Re-pin the fix, write it onto the ledger, report it to the maintainer in one line, then land it as a PR through the run's own merge queue.
2349
2350
 
2350
2351
  Two members failing the same way is the instruction, not the agents. Fix the file
2351
2352
  during the run — deferring loses the evidence that found it.
@@ -1,6 +1,6 @@
1
1
  # Close-out: what each metrics step does and why
2
2
 
3
- `closeout.mjs finish` runs the scrape, the tier-outcomes check, the metrics refresh and the commit of the metrics files, and SKILL.md's **End of run** says how to drive it. This file is how each of those works, for the controller to read when a step refuses. The verdict rules — what `closed_own_ticket` and `minted_false_claim` mean, and that a value not in hand is left blank — stay in SKILL.md under **Guard: accumulate per PR**, because the controller still rules them.
3
+ `closeout.mjs finish` runs the scrape, the tier-outcomes check, the metrics refresh, the commit of the metrics files, and the phase-0 receipt move, and SKILL.md's **End of run** says how to drive it. This file is how each of those works, for the controller to read when a step refuses. The verdict rules — what `closed_own_ticket` and `minted_false_claim` mean, and that a value not in hand is left blank — stay in SKILL.md under **Guard: accumulate per PR**, because the controller still rules them.
4
4
 
5
5
  ## Scrape the member facts and check the tier rows
6
6
 
@@ -93,3 +93,13 @@ fold-in queues for review next run, however it is named, so the files reach
93
93
  a data row loses it: `member-outcomes.tsv` is regenerated from harness
94
94
  transcripts the fleet does not own, so re-running the scrape later is worth
95
95
  only what the harness still holds.
96
+
97
+ ## Move the phase-0 receipt
98
+
99
+ **Set aside the phase-0 receipt after the commit — before the heartbeat.** The receipt `.fleet/phase0.json` records each phase-0 step's result and the In-flight bound the tick reads; `closeout.mjs finish` moves it to `.fleet/phase0.previous.json` so the next run can find it under the name `phase0.mjs` reserves for a previous run's receipt, and that run's rotation restores and archives it with the ledger. A missing `.fleet/phase0.json` counts as nothing to move and is `ok`.
100
+
101
+ The step can refuse in each of these ways:
102
+
103
+ - The receipt could not be linked to the destination: `cannot move <from> to <to>: <error>`. Nothing was moved. **Fix the cause the error names, then run finish again.**
104
+ - `.fleet/phase0.previous.json` already holds a receipt from a different run. **File it by hand as `.fleet/phase0.<UTC stamp>.json`, then run finish again.** That is the name `ledger.mjs rotate` archives a receipt under; a receipt moved to any other name is one nothing files with its ledger. This happens when a previous run's close-out moved its receipt there but the next run never rotated — a controller crash between the move and rotation, or a stalled or deleted run before rotation — or when a run's rotation refused, or found that archive name taken, and put the receipt it restored back there.
105
+ - The receipt was moved to the destination but the original copy could not be removed. **Run finish again:** it finds both names are one file and retries the removal. A rare race: the link succeeded but the unlink failed on a stray filesystem error or permission issue. If the removal keeps failing, delete the `.fleet/phase0.json` file by hand so the next run does not try to move it again, and run finish again — with nothing left to move, the step is `ok` and the heartbeat stop runs.
@@ -249,6 +249,7 @@ record could not be written. Run the rotation before this run's own first
249
249
  tick, beat or ledger write, each of which writes a mark the fallback reads. Older
250
250
  archives, hand-named ones included, are left alone.
251
251
 
252
+ Before the rotation, `phase0.mjs` puts the held-aside receipt (`phase0.previous.json`) back at `phase0.json`, which `ledger.mjs rotate` then files as `phase0.<UTC stamp>.json`.
252
253
  `ledger.mjs rotate` archives the run's two receipts with the ledger, under the ledger archive's own stamp: `.fleet/phase0.<UTC stamp>.json` and `.fleet/closeout.<UTC stamp>.json` beside `.fleet/ledger.<UTC stamp>.md`.
253
254
 
254
255
  ## Reclaim scratch