Skip to content

fix(engine): classify unkeyed provider send misses - #367

Merged
khaliqgant merged 2 commits into
mainfrom
codex/action-offline-idempotency-fix
Sep 3, 2026
Merged

fix(engine): classify unkeyed provider send misses#367
khaliqgant merged 2 commits into
mainfrom
codex/action-offline-idempotency-fix

Conversation

@miyaontherelay

Copy link
Copy Markdown
Contributor

Summary

  • fail an unkeyed agent-action invocation when the authoritative owner-side provider send misses
  • return handler_unavailable instead of the keyed-idempotency timeout/error
  • preserve the existing durable claim/replay behavior for requests carrying an Idempotency-Key

Release-train finding

The relaycast-cloud integration suite against published engine 8.2.2 reproduced this hosted path: the Worker preflight reports the provider live, the NodeDO authoritative send returns false, and an unkeyed request receives idempotency_unavailable while its row remains pending. This patch makes that path fail closed with the actual condition.

Verification

  • npm run -w @relaycast/engine typecheck
  • npm run -w @relaycast/engine lint
  • npm run -w @relaycast/engine test (68 files, 698 tests)
  • focused SDK contract suite (12/12), including the existing keyed replay race control

This is the corrective patch required before promoting the engine bump to relaycast-cloud. It must be released as a follow-up patch; #363 remains excluded from this release train.

@coderabbitai

coderabbitai Bot commented Sep 2, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 3f34b5de-4f43-42b3-a8d1-cf035dac15be


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 4 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread packages/engine/src/engine/action.ts
Comment thread CHANGELOG.md Outdated
Comment thread packages/engine/CHANGELOG.md Outdated
@miyaontherelay
miyaontherelay force-pushed the codex/action-offline-idempotency-fix branch from e107a80 to a6e9f15 Compare September 2, 2026 16:20

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 4 files (changes from recent commits).

Requires human review: Auto-approval blocked because this review re-detected 1 unresolved issue already reported by Cubic.

Re-trigger cubic

Comment thread CHANGELOG.md
Session-Id: 01a060f2-87c5-7d21-bf8f-515f3e9cbfdd

Session-Id: 01a060f2-87c5-7d21-bf8f-515f3e9cbfdd

Session-Id: 01a060f2-87c5-7d21-bf8f-515f3e9cbfdd
Session-Id: 01a060f2-87c5-7d21-bf8f-515f3e9cbfdd

Session-Id: 01a060f2-87c5-7d21-bf8f-515f3e9cbfdd
@miyaontherelay
miyaontherelay force-pushed the codex/action-offline-idempotency-fix branch from 18200d9 to 87e3f8a Compare September 3, 2026 06:10
@khaliqgant
khaliqgant merged commit 66dcd42 into main Sep 3, 2026
8 checks passed
@khaliqgant
khaliqgant deleted the codex/action-offline-idempotency-fix branch September 3, 2026 10:18
willwashburn pushed a commit that referenced this pull request Sep 3, 2026
…sucow

8.3.1 shipped #367, which already fails an unkeyed agent-action invoke
with handler_unavailable when the owner-side send misses. Reconcile the
two fixes in invokeAction:

- keep #367's completion-wins acknowledgement for a send that returned
  true but lost the dispatch UPDATE;
- keyed claims still wait for a racing takeover to become visible, but
  now hand the still-open row back (onDeadline: 'return') instead of
  reporting idempotency_unavailable;
- both keyed and unkeyed misses then go through the conditional
  failNeverDispatchedInvocation, so a dispatcher that claimed the row on
  a handler reconnect keeps its dispatch and the caller sees that state.

The conformance test becomes a keyed invoke (8.3.1 already covers the
unkeyed case) and asserts a replay of the same key agrees on
handler_unavailable. Changelog bullets narrowed to what is left after
8.3.1; the root [Unreleased - Patch] link now compares against v8.3.1.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MB3K5bK7Jc5HM92fsZRUyS
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.

2 participants