Skip to content

fix(sdk): skip plugin hook work without plugins - #796

Merged
yaythomas merged 1 commit into
mainfrom
fix/skip-plugin-hook-without-plugins
Oct 16, 2026
Merged

yaythomas merged 1 commit into
mainfrom
fix/skip-plugin-hook-without-plugins

Conversation

@yaythomas

Copy link
Copy Markdown
Collaborator

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Issue Link, if available

Fixes #795

Description

When a checkpoint response changed an operation's status, onCheckpointComplete converted every stored operation for the operation change hook, even when no plugin was registered. So the cost of each checkpoint grew with the number of operations, and long sequential executions slowed down as they ran.

onCheckpointComplete now builds the change info and calls onOperationChange only when a plugin is registered. Plugins receive the same information as before.

Demo/Screenshots

Not applicable.

Checklist

  • I have filled out every section of the PR template
  • I have thoroughly tested this change

Testing

Unit Tests

Have unit tests been written for these changes?

Yes. ExecutionManagerTest has two new tests.

  • With no plugin registered, checkpointWithoutPluginsSkipsOperationChangeInfo checks that toOperationChangeInfo is never called. It also checks that every operation is stored and that a waiting operation completes. It fails without this change.
  • With a plugin registered, checkpointWithPluginReportsEachStatusChangeOnce checks that onOperationChange fires once for each response that changes a status.

Integration Tests

Have integration tests been written for these changes?

No. The unit tests cover both paths. The existing onOperationChange tests in PluginIntegrationTest pass unchanged.

Examples

Has a new example been added for the change? (if applicable)

No. The change does not affect the public API.

When a checkpoint response changed an operation's status,
onCheckpointComplete converted every stored operation for the
operation change hook, even when no plugin was registered. So the cost
of each checkpoint grew with the number of operations, and long
sequential executions slowed down as they ran.

onCheckpointComplete now builds the change info and calls
onOperationChange only when a plugin is registered. Plugins receive
the same information as before.

Fixes #795
@yaythomas
yaythomas requested a review from a team October 16, 2026 18:43
@yaythomas
yaythomas deployed to ai-pr-review-runtime October 16, 2026 18:43 — with GitHub Actions Active
@yaythomas
yaythomas deployed to ai-pr-review-runtime October 16, 2026 18:44 — with GitHub Actions Active
@github-actions

Copy link
Copy Markdown
Contributor

Codex AI review

No actionable findings. The guard preserves checkpoint updates and registered-plugin notifications, with focused regression tests for both paths. Residual test risk: tests were inspected but not executed, as required by the review constraints.

Reviewed commit de0c4541da506fc419dacfac373b395a7f5f700c. Workflow run

@yaythomas
yaythomas merged commit 67bad28 into main Oct 16, 2026
48 checks passed
@yaythomas
yaythomas deleted the fix/skip-plugin-hook-without-plugins branch October 16, 2026 19:19

This branch was successfully deployed

1 active deployment
ai-pr-review-runtime — de0c4541 Deployed Oct 16, 2026 by yaythomas via ai-pr-review / Codex review / Generate Codex review #2322
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.

[Bug]: onCheckpointComplete converts every operation on every checkpoint when no plugin is registered

2 participants