Skip to content

fix(core): skip plugin hook work without plugins - #781

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
Contributor

Description of changes:
When a checkpoint response changed an operation's status, on_operation_update converted every operation in the execution for the operation change hook, even when no plugin was registered. The checkpoint loop also copied the whole operation map twice for that hook, and create_checkpoint copied it to read one entry. So the cost of each step grew with the number of operations, and long sequential executions slowed down as they ran.

Without a plugin, on_operation_update now returns early, and the checkpoint loop skips the copies and the hook call. create_checkpoint reads only the entry it needs. Plugins receive the same information as before.

Issue #, if available:
Fixes #780

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@yaythomas
yaythomas deployed to ai-pr-review-runtime October 16, 2026 16:39 — with GitHub Actions Active
@yaythomas
yaythomas deployed to ai-pr-review-runtime October 16, 2026 16:40 — with GitHub Actions Active
@github-actions

This comment has been minimized.

When a checkpoint response changed an operation's status,
on_operation_update converted every operation in the execution for the
operation change hook, even when no plugin was registered. The
checkpoint loop also copied the whole operation map twice for that
hook, and create_checkpoint copied it to read one entry. So the cost of
each step grew with the number of operations, and long sequential
executions slowed down as they ran.

Without a plugin, on_operation_update now returns early, and the
checkpoint loop skips the copies and the hook call. create_checkpoint
reads only the entry it needs. Plugins receive the same information as
before.

Fixes #780
@yaythomas
yaythomas force-pushed the fix/skip-plugin-hook-without-plugins branch from 3ecf944 to 57e5bdb Compare October 16, 2026 16:42
@yaythomas
yaythomas deployed to ai-pr-review-runtime October 16, 2026 16:43 — with GitHub Actions Active
@github-actions

Copy link
Copy Markdown
Contributor

Codex AI review

No actionable findings. The added unit tests cover skipped plugin work and preserved replay detection. Tests were not executed under the read-only review constraints, so runtime and concurrency behavior remain unverified.

Reviewed commit 57e5bdb422de7a8063009ec71db3d491cb55bf4f. Workflow run

@yaythomas
yaythomas merged commit 63041ef into main Oct 16, 2026
41 checks passed
@yaythomas
yaythomas deleted the fix/skip-plugin-hook-without-plugins branch October 16, 2026 17:32

This branch was successfully deployed

1 active deployment
ai-pr-review-runtime — 57e5bdb4 Deployed Oct 16, 2026 by yaythomas via ai-pr-review / Codex review / Generate Codex review #1792
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]: Plugin hook converts every operation on every checkpoint when no plugin is registered

2 participants