Skip to content

Skip ignored workflow handler success callbacks - #283

Merged
ianmacartney merged 2 commits into
mainfrom
ian/skip-workflow-success-callbacks
Sep 15, 2026
Merged

ianmacartney merged 2 commits into
mainfrom
ian/skip-workflow-success-callbacks

Conversation

@ianmacartney

@ianmacartney ianmacartney commented Sep 12, 2026 •

Copy link
Copy Markdown
Member

Workflow handler completion already returns immediately on success. Update the workpool development dependency to 0.4.12 and set onCompleteExcludeKinds: ["success"] when scheduling async start, restart, and handler resume. Keep the peer dependency at ^0.4.4: older clients ignore the option and preserve existing behavior, while 0.4.12 skips these unnecessary callbacks. Failure, cancellation, and ordinary step result handling are preserved.

Compatibility verification used the published workpool 0.4.4 JavaScript client and its component in convex-test. All six single/batch enqueue checks passed: the client omits the new option from serialized arguments, the component accepts the enqueue, and success/failure/cancellation callbacks still run. Only the development dependency and its lockfile resolution are upgraded.

Use workpool's test registration helper to include its nested batch worker, and accommodate the newly unknown success result type in the existing size check.

Validation: build and both TypeScript checks pass; 129 tests pass, including six new cases exercising callback exclusion and failure propagation for all three scheduling paths. Lint passes with three existing warnings. The change was also exercised in the isolated benchmark deployment in #284.

Stacked experiment #284 compares callback inclusion vs. exclusion on released 0.4.12, then evaluates transactional completion. Exclusion removes 600 callbacks per 100 five-step workflows (~18% fewer scheduled executions). Across three measured trials per configuration, median committed throughput changed by −20.7% at parallelism 25 and +9.6% at 100 (+6.6% including admission). Timing ranges are wide; the measured benefit is consistent callback elimination, not a universal throughput gain. See the full results.

@pkg-pr-new

pkg-pr-new Bot commented Sep 12, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@convex-dev/workflow@283

commit: 92ed0be

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No issues found across 7 files

Re-trigger cubic

@reeceyang reeceyang left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

nice!

Copy link
Copy Markdown
Member Author

@ianmacartney
ianmacartney merged commit 0fec4c2 into main Sep 15, 2026
4 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.

2 participants