You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 47bc55e
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/advanced.md
+33-1Lines changed: 33 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,7 @@ OpenCode service must be running for polling to work.
30
30
|`stateDirectory`| Shared location for queues, locks, and worktrees. Keep it consistent across components and restarts. |
31
31
|`repositories`| Repositories with existing local checkouts, default base branches, allowed authors, and checks. A natural-language request can override the base before work starts. |
32
32
|`allowedAuthors`| GitHub users authorized to request work and approve merging. Merging also requires repository write access. |
33
-
|`checks`| Arrays of executable arguments, e.g. `[["npm", "test"]]`. `[]` skips automated tests and reports that in the PR. No implicit shell. |
33
+
|`checks`| Arrays of executable arguments, e.g. `[["npm", "test"]]`. `[]` skips dispatcher test commands; the PR distinguishes this from agent-reported tests. No implicit shell. |
34
34
|`routes`| Maps full mentions to agents and models available in OpenCode. |
35
35
|`routes[tag].capabilities`| Main model capabilities: `text`, `vision`, `audio`; omitted means text only. |
36
36
|`routes[tag].mediaModel`|`{ model: { providerID, id }, capabilities: ["text", "vision"] }` for the media helper. |
@@ -232,3 +232,35 @@ See [runtime management](runtime.md#manage-tasks-from-bot) for the UI and limits
232
232
While a closure is pending, the dispatcher does not start another worker pass.
233
233
An unrelated already-running task can finish; scanning continues for other tasks.
234
234
The monitor reports task maintenance until closure completes.
235
+
236
+
237
+
## PR description recovery
238
+
239
+
Task state stores `completion` (final public text or an explicit unavailable
240
+
reason, session, round, then verified commit and checks), `initialCompletion`,
241
+
and `publishedBody` (the last acknowledged managed section). New rounds clear
242
+
only the current completion. Older verifying/publishing tasks recover missing
243
+
summaries from their saved sessions; this does not rerun the model. Missing or
244
+
empty successful reports are marked unavailable, while transient reads retry.
245
+
Already completed or closed tasks are not bulk rewritten on upgrade.
246
+
247
+
Publication reads the PR at the verified head and only replaces the managed HTML
248
+
marker region. Notes outside it are preserved. An exact known legacy body can be
249
+
replaced; unknown unmarked text is retained with the new section appended, since
250
+
it might contain manual edits. A later legacy round may not have enough saved
251
+
information to identify its old acknowledgement exactly.
252
+
253
+
An edited/removed managed section, changed PR head, closed follow-up PR, or oversized
254
+
body blocks at `publishing`. Preserve your notes outside the markers and restore
255
+
the previous managed section from `publishedBody` in the task checkpoint (or PR
256
+
edit history), then use the normal workflow retry. Do not delete the queue or
257
+
restart implementation just to retry a description update. If a PATCH succeeded
258
+
but its response was lost, matching desired content is accepted without another
259
+
write. Body and head are reread before PATCH; edits after that final read cannot
260
+
be atomically excluded by this implementation.
261
+
262
+
Each rendered report is limited to 22,000 UTF-8 bytes with an explicit truncation
263
+
notice; full saved text remains in task state and the session. Dispatcher check
264
+
text is limited to 8,000 bytes. The complete description, including retained
265
+
notes and signature, must fit within the automation limit of 60,000 bytes or
266
+
publication blocks without dropping notes. Titles are not regenerated on updates.
[pr-description.ts — extraction, rendering and reconciliation](../src/pr-description.ts).
475
506
476
507
## 7. Feedback, merge approval, and tab closure
477
508
@@ -482,7 +513,8 @@ flowchart TD
482
513
Keep --> Recovery[Session recovery and publication must finish first]
483
514
Recovery --> Done
484
515
Done -->|Yes| Round[Next worker pass starts one new round on saved branch and worktree]
485
-
Round --> Guard[Require open issue, open original PR and authorized feedback, then analyze again]
516
+
Round --> Snapshot[Retain original report and published body, reset current completion]
517
+
Snapshot --> Guard[Require open issue, open original PR and authorized feedback, then analyze again]
486
518
Idle[Worker has no eligible execution task] --> Eligible{Auto-merge enabled and done task eligible?}
487
519
Eligible -->|No| Later[Wait for a later worker pass]
488
520
Eligible -->|Yes| Since{publishedAt exists?}
@@ -549,7 +581,8 @@ or a request failure records `mergeError`; error retries also respect GitHub tim
549
581
An already-merged response can reconcile a previously lost merge response.
550
582
551
583
Follow-up rounds reset analysis, question, current session, session-stop/recovery
552
-
state, checks, and commit; they retain the branch, worktree, pinned base, and previous session reference.
584
+
state, current completion summary, checks, and commit; they retain the original
585
+
report, last published body, branch, worktree, pinned base, and previous session reference.
553
586
Preparation reuses the saved worktree path rather than deriving a new path from
554
587
the branch name. A renamed branch can therefore retain its original directory.
555
588
Preparation, verification, and push all check the managed path, exact Git root,
@@ -595,7 +628,7 @@ An error normally preserves the phase so retry continues from its checkpoint.
595
628
|`ready`| Eligible for worker selection when due. |
596
629
|`waiting`| Awaiting an issue answer; no implementation or publication while unresolved. |
597
630
|`retry_wait`| Transient failure; automatic retry after `nextAt`. |
598
-
|`blocked`| Explicit `Blocked`error or GitHub HTTP 401, 404, or 422; requires inspection/retry, except a stopped session completed manually is reconciled automatically. |
631
+
|`blocked`| Explicit `Blocked`or PR-description conflict, or GitHub HTTP 401, 404, or 422; requires inspection/retry, except a stopped session completed manually is reconciled automatically. |
599
632
|`failed`| Other errors reached `maxAttempts`; operator recovery/retry required unless the checkpoint also qualifies as a stopped-session recovery candidate. |
0 commit comments