mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-12-03 20:09:33 +01:00
fix(native): reclaim task execution before same-run recovery
Restore the original task execution binding atomically during native same-run recovery. Preserve current owners, stops, pauses, assignments, and dependency waits. Isolate candidate failures, bound deferral writes, prioritize undated retries, and allow recovery ahead of queued waiters without premature queue promotion. Add PostgreSQL attachment, ownership, contention, fairness, and queue regressions. Verification: 99 focused tests, workspace typecheck, build, full current-head CI, and Apex 5/5. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
1 parent
cd77c1c4dc
commit
307c27e3d8
5 files changed
+370
-32
No files matched your search
@@ -7,6 +7,18 @@ event needs no operator endpoint.
|
||||
|
||||
## Native PRP Run-Log Events
|
||||
|
||||
`native.recovery.execution_reclaimed` records an atomic same-run recovery claim
|
||||
that restores a released task execution binding. The claim locks the task,
|
||||
coordinator, and original run in that order. It preserves the assignee and checks
|
||||
current execution/checkout owners, other live work, dependencies, pause holds,
|
||||
and stop/successor records before restoring the binding. Attachment authorization
|
||||
keeps its existing requirement for that exact binding. Skipped retry candidates
|
||||
wait 30 seconds before recheck so they cannot fill every bounded claim batch.
|
||||
Undated retries sort first. A failed candidate cannot discard earlier committed
|
||||
claims. Queued waiters do not block the original execution owner from recovery;
|
||||
they still wait for that owner to settle before normal queue promotion.
|
||||
This is local run-log data.
|
||||
|
||||
Fresh remote Codex model substitution emits `runner.model_fallback` on the
|
||||
system stream with `warn` severity. Its payload contains `requestedModel`,
|
||||
`effectiveModel`, and `codexCliVersion`. It records a preparation choice before
|
||||
|
||||
Reference in new issue
Block a user