@awebai/oats 0.40.2 → 0.41.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/docs/servers.md CHANGED
@@ -277,7 +277,10 @@ with `--server`; the remote default applies. `session attach --print` shows
277
277
  the ssh command without running it. A server without the `session` commands
278
278
  (before 0.22.2) is refused with the tmux command to attach there directly,
279
279
  naming the session and window its roster records for the instance (else
280
- `pi-agents`, that kernel's default).
280
+ `pi-agents`, that kernel's default), and the tmux socket when the roster
281
+ records one. The remote command is one quoted word either way: `ssh -t
282
+ <host> 'tmux attach -t <target>'`, or `ssh -t <host> 'tmux -S <socket>
283
+ attach -t <target>'`.
281
284
 
282
285
  ## The roster and harvest
283
286
 
@@ -443,6 +443,18 @@ cannot run, retire refuses with
443
443
  `E_RUNTIME_ENDPOINT_UNKNOWN`, even with `--force`: stop that session yourself,
444
444
  then retire again. `oats retire <instance> --plan` says which case applies.
445
445
 
446
+ With a receipt, if the recorded window is still running, or its tmux server
447
+ cannot be read, retire refuses with `E_RUNTIME_QUIESCE_FAILED` and keeps the
448
+ home. When the recorded server cannot be reached because its socket file is
449
+ missing (after a reboot), retire proceeds only when no process on this host
450
+ works in the home (any process whose working directory is in the home, not
451
+ only the harness); a tmux server that lost its socket file still runs, and
452
+ recreates the socket when its process is sent `SIGUSR1`. That check needs
453
+ `lsof`: on a host without it, a retire whose recorded socket file is missing
454
+ is refused, and the message says that `lsof` is missing; install it, then
455
+ retire. A scan that does not complete (a timeout, for example) refuses the
456
+ same way, also for a home without its receipt.
457
+
446
458
  `oats retire <instance> --self` lets an instance retire itself when the human
447
459
  or briefing says it is done. A live harness cannot give a stable final
448
460
  inspection of its own work, so the calling process inspects, runs, and removes
@@ -461,17 +473,31 @@ When a retire hook reports incomplete cleanup, the home is quarantined before
461
473
  any worktree step: the worktree, its git admin entry and the branch stay
462
474
  exactly as they were, so the retry can reach the hook and the work it needs.
463
475
  The retry does the worktree step only once nothing else is outstanding:
464
- retain by default, remove with `--discard-worktree` or `--delete-branch`.
476
+ retain by default, remove with `--discard-worktree`.
465
477
  `--force` removes the home regardless, so it does the worktree step first. A
466
478
  work directory whose git admin entry is gone is never removed: the hooks still
467
479
  run, the home is kept, and `--force` refuses it until you move the directory
468
480
  out or delete it by hand.
469
481
 
470
- Retire never deletes a branch unless you pass `--delete-branch`, and then
471
- only the verified branch: not on a quarantine, its retry or `--force`. A
472
- spawn that fails deletes the branch it created only while the branch's tip
473
- is still where the spawn created it. If something was committed there, the
474
- branch is kept and the failure says so.
482
+ Retire never deletes a branch: not a plain retire, `--discard-worktree`, a
483
+ quarantine, its retry or `--force`. `--delete-branch` is refused with
484
+ `E_BAD_ARGS` before anything happens. The branch stays in the repository:
485
+ inspect it there, and delete it with Git if it is no longer wanted. A spawn
486
+ that fails deletes the branch it created only while the branch's tip is
487
+ still where the spawn created it. If something was committed there, the
488
+ branch is kept and the failure says so; the quarantine's retry stays
489
+ incomplete until the branch is deleted with Git.
490
+
491
+ Before it removes a worktree (`--discard-worktree`, or a failed spawn's
492
+ quarantine that owes it), a retire preserves a commit that only the worktree
493
+ reaches (HEAD detached at a commit no ref of the repository reaches) in a
494
+ recovery, and reads HEAD again immediately before the removal: if HEAD moved
495
+ since the retire's last inspection, the worktree is not removed and the
496
+ retire stops with `E_WORK_PRESERVATION_FAILED`; the home and the worktree are
497
+ kept, and so is any recovery the retire wrote. A worktree whose branch has no
498
+ commit yet cannot be read that way: a retire that would remove it, or that
499
+ has work of it to copy, refuses with `E_WORK_INSPECTION_FAILED` and removes
500
+ nothing.
475
501
 
476
502
  ## Work modes
477
503