Workflow Failure Op ID Fix - #1627
Conversation
`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
|
There was a problem hiding this comment.
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
Summary
function-rejectedandstep-not-foundboth 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:error:<attempt>(no step reference available)Checklist
Related