Skip to content

automations: add dispatch claims and leases - #28612

Closed
eternal-openai wants to merge 1 commit into
codex/automations-03-state-crudfrom
codex/automations-04-state-claims
Closed

eternal-openai wants to merge 1 commit into
codex/automations-03-state-crudfrom
codex/automations-04-state-claims

Conversation

@eternal-openai

@eternal-openai eternal-openai commented Jun 16, 2026 •

Copy link
Copy Markdown
Contributor

Stack

  1. #28609 automations: add service groundwork and overview
  2. #28610 automations: add durable state store
  3. #28611 automations: add state CRUD and scheduling
  4. This PR: automations: add dispatch claims and leases
  5. #28613 automations: add app-server protocol
  6. #28614 automations: add app-server CRUD handlers
  7. #28615 automations: add agent automation_update tool
  8. #28616 automations: dispatch runNow requests
  9. #28617 automations: add background worker loop
  10. #28618 automations: dispatch scheduled heartbeats
  11. #28619 automations: add dispatch integration coverage
  12. #28620 automations: defer heartbeats for cooldown

Why

Multiple app-server processes can share the same CODEX_HOME, so due automation dispatch must be coordinated by durable ownership instead of process-local timers. The state layer should own this atomicity so app-server workers do not hand-roll SQL transitions.

What Changed

  • Adds claim, lease, ownership token, retry, and dispatch progress transitions for automation runs.
  • Advances scheduled next_run_at at claim time so retries continue the same firing rather than reopening the same schedule window.
  • Adds manual runNow claim support for paused automations without changing their paused state.
  • Adds tests for due claims, lease ownership, retry exhaustion, deferred scheduled runs, and paused runNow.

Verification

  • codex-state dispatch claim and retry tests passed in the focused non-app-server run.

@eternal-openai
eternal-openai force-pushed the codex/automations-03-state-crud branch from a3961a6 to 7dee7b6 Compare June 17, 2026 00:14
@eternal-openai
eternal-openai force-pushed the codex/automations-04-state-claims branch from ce29bcc to 47d3ad7 Compare June 17, 2026 00:14
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Closing this pull request because it has had no updates for more than 14 days. If you plan to continue working on it, feel free to reopen or open a new PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant