Skip to content

Workflow Failure Op ID Fix - #1627

Open
Linell wants to merge 2 commits into
feat/custom-workflow-sdkfrom
feat/custom-workflow-sdk.linell
Open

Workflow Failure Op ID Fix#1627
Linell wants to merge 2 commits into
feat/custom-workflow-sdkfrom
feat/custom-workflow-sdk.linell

Conversation

@Linell

@Linell Linell commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Summary

function-rejected and step-not-found both emitted ops with the hardcoded id "error", so repeated failures produced duplicate ids, which broke orchestrators that derive unique identifiers from op ids (e.g. Temporal ActivityIds). This PR switches their ids to be:

  • function-rejected: error:<attempt> (no step reference available)
  • step-not-found: the requested step's id

Checklist

  • Added a docs PR that references this PR
  • Added unit/integration tests
  • Added changesets if applicable

Related

  • INN-

Linell added 2 commits July 13, 2026 15:24
`function-rejected` and `step-not-found` both emitted ops with the
hardcoded id "error", so repeated failures produced duplicate ids —
breaking orchestrators that derive unique identifiers from op ids
(e.g. Temporal ActivityIds).

- function-rejected: `error:<attempt>` (no step reference available)
- step-not-found: the requested step's id
@Linell
Linell requested a review from tonyhb July 13, 2026 22:44
@changeset-bot

changeset-bot Bot commented Jul 13, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 88fc059

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@mendral-app mendral-app 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.

LGTM

Clean, well-scoped fix. Both ID strategies are sound: error:${input.attempt} guarantees uniqueness across retries (attempt is a required number), and result.step.id is inherently unique per step target. The test verifies the uniqueness invariant directly. The typo fix on line 54 is a freebie bonus.

CI Failure: The pnpm security audit job fails due to a known critical vulnerability in protobufjs — not caused by this PR.

What this PR does

Fixes duplicate op IDs in the workflow package's failure paths. function-rejected now uses error:<attempt> and step-not-found uses the requested step's ID, preventing collisions that broke orchestrators requiring unique op IDs. Also fixes a minor syntax typo in a type assertion and updates DOCS.md accordingly.

Tag @mendral-app with feedback or questions. View session

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants