Skip to content

Add durable event automation admission and recovery - #2606

Merged
jonathanKingston merged 1 commit into
mainfrom
codex/automation-event-inbox
Sep 9, 2026
Merged

Add durable event automation admission and recovery#2606
jonathanKingston merged 1 commit into
mainfrom
codex/automation-event-inbox

Conversation

@jonathanKingston

@jonathanKingston jonathanKingston commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

Implements the first internal slice of the event-driven automation proposal: repeated deliveries and interrupted preparation retain one durable run/thread identity. This is an injected admission/recovery boundary; no event source or model execution is enabled in the app yet.

  • Persist bounded, hashed source evidence and matching outcomes before acknowledging admission. Bind events to the saved automation revision, project/repository and authenticated adapter connection; reject instruction-bearing payload fields and filter automation-originated events.
  • Claim a stable run identity and enqueue it idempotently through the existing supervisor, including recovery from lost acknowledgements and lookup in archived task history. Existing but corrupt identity records fail closed.
  • Recheck eligibility at enqueue and preparation, preserve fenced history across disablement/deletion, and cancel only pending draft preparation. Reported failures are not automatically retried.

The host contract and storage details are documented in docs/plans/event-automation-inbox.md. Slice A keeps the capped 64 KiB redacted evidence inline with its receipt for atomic persistence. Real CI polling, saved-definition/editor controls, coalescing, cost/worktree enforcement and normal app-open turn dispatch remain slice B.

Acceptance criteria from the proposal:

  • Duplicate delivery, including after restart, produces one run identity.
  • Crashes between inbox write, claim, enqueue, and thread creation recover that run.
  • Invalid source, target, payload bounds, and definition revision cannot dispatch.
  • Disablement/deletion fences pending work while preserving historical records.

Validation: pnpm run check passed all static gates and 8,783 tests before the final rebase. After rebasing onto main (including the merged automation modal/proposal), pnpm run typecheck and the complete pnpm test suite passed again: 8,813 tests, zero failures. The rebase was conflict-free and changed none of the inbox/supervisor files or dependencies. Durable filesystem tests use the real supervisor/task store and inject interruption after inbox writes, enqueue, and durable thread preparation. Dedicated tests also cover concurrent lifecycle fencing, archived identity, corruption and conflicting evidence. No visible app changes; no visual eval is needed.

github-actions Bot added a commit that referenced this pull request Sep 9, 2026
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

🖥️ PR preview

@jonathanKingston
jonathanKingston marked this pull request as ready for review September 9, 2026 02:24
@copse-release-bot

Copy link
Copy Markdown
Contributor

Reference screenshots ready for review

Review GitHub’s image diffs in screenshot PR #2616.
Merge it (or enable auto-merge) to apply the accepted PNGs to codex/automation-event-inbox.

Rendered for d103fa68d2a5 by CI run 34303100123; the immutable artifact is reference-screenshot-candidates-34303100123.

If this source branch moves, a later successful render closes the stale review PR and replaces this link.

@jonathanKingston
jonathanKingston merged commit 76212fb into main Sep 9, 2026
24 of 35 checks passed
@jonathanKingston
jonathanKingston deleted the codex/automation-event-inbox branch September 9, 2026 02:46
github-actions Bot added a commit that referenced this pull request Sep 9, 2026
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