O4: worker pool, flock locks, account slots, quota pause and requeue (closes #5)

This commit is contained in:
hermes committed 2026-11-12 23:52:16 +00:00
1 parent afafc41376
commit 47893a4993
10 files changed
+410 -43

No files matched your search

+4 -1
View File
@@ -35,10 +35,13 @@ is echoed back verbatim in later calls, so adapters stay stateless.
| `report` (source) | `{"task": Task, "run": Run}` | `{}`; called when a run ends in any state |
| `publish` (sink) | `{"task": Task, "run": Run}` | `{"url": "..."}` (url optional); only for runs that ended `done` |
`Run`: `id, status (done|failed|needs-human), reason, branch, repo, worktree, attempts, input_tokens,
`Run`: `id, status (done|failed|needs-human|requeued), reason, branch, repo, worktree, attempts, input_tokens,
output_tokens, published`. The work is on local branch `branch` in `repo`; a sink pushes it and opens a PR/MR,
posts a comment, or whatever the host needs. Host credentials live in the adapter, never in orch.
`requeued` (provider quota used up) means the task was not attempted to completion: `report` should put it back in
the queue (the `dir` source does) so a later `pull` runs it again once the account's window resets.
A failing `publish` or `report` never fails the run: the error is printed and, for publish, stored in the run's
`published` field as `publish-failed: ...`.