Skip to content

Replace workflow advance with step-tagged submit_output - #731

Merged
TheGreatAxios merged 3 commits into
mainfrom
cl-7266-replace-advance_workflow-with-idempotent-step-tagged
Aug 31, 2026
Merged

Replace workflow advance with step-tagged submit_output#731
TheGreatAxios merged 3 commits into
mainfrom
cl-7266-replace-advance_workflow-with-idempotent-step-tagged

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Collaborator

Summary

  • Completing a workflow step requires the current step id on submit_output, compared atomically so duplicate and stale calls acknowledge without advancing.
  • Past step ids report as complete; unknown or future ids report as not current instead of already finished.

Verification

  • Typecheck and build passed; targeted tests passed.
  • Full bun run test was blocked by host git hooks rejecting fixture authors (CL-7267 is the helper for that).

Fixes CL-7266

@linear-code

linear-code Bot commented Aug 31, 2026

Copy link
Copy Markdown

CL-7266

Untagged completion could skip ahead on retry. Completing a step now
requires the current step id on submit_output, compared atomically so
duplicate and stale calls acknowledge without advancing.
submit_output treated every non-current id as already complete, so a
future step looked finished. Report past ids as complete and unknown
or future ids as not current.
The handler reconstructed the cursor before the director mutated on
tool.done, so parallel submit_output could both claim an advance.
complete() now returns already-complete vs not-current and the handler
reports that result. autoAdvance is removed from the plugin contract
because the coordinator no longer reads it.
@TheGreatAxios
TheGreatAxios force-pushed the cl-7266-replace-advance_workflow-with-idempotent-step-tagged branch from 2592ac5 to 1042db1 Compare August 31, 2026 15:40
@TheGreatAxios
TheGreatAxios merged commit eca5320 into main Aug 31, 2026
5 checks passed
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