feat(loops): enforce durable dispatch leases and retry backoff#100
Merged
Conversation
Persist typed run and trace ownership on lease rows, enforce one active run per repository issue, and add migration replay coverage. Co-authored-by: Codex (GPT-5) <codex@openai.com>
Admit development runs through durable capacity guards, drain queued work, release leases on terminal outcomes, and promote bounded stage or linked-run retries with trace-aligned telemetry. Co-authored-by: Codex (GPT-5) <codex@openai.com>
Document queued deferral, durable lease ownership, linked retry semantics, observability boundaries, and the deliberate development versus research lifecycle split. Co-authored-by: Codex (GPT-5) <codex@openai.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
ncolesummers
marked this pull request as ready for review
July 27, 2026 01:37
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Why
The manifest already declared concurrency and retry policy, but persistent development-run creation did not enforce either contract. Concurrent deliveries could therefore exceed the configured cap, overlap work for one issue, or lose retry intent across process restarts.
This change moves admission, lease ownership, queue ordering, finalization, and retry eligibility into database-backed transactions so restart behavior follows durable state rather than in-memory or step-status inference.
Operator and developer impact
Review focus
Validation
bun run validatebun run buildgit diff --checkNo rendered UI changed, so Issue #96-specific browser screenshots were not applicable.
Known verification boundaries
FOR UPDATEscheduling; ADR 0017 records that native-Postgres concurrency coverage is still needed.Closes #96
Co-authored with OpenAI Codex (GPT-5).