You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Failures during add_hookspecs / historic replay leave partial state聽#761
馃 Written by Claude Opus 5.5 via Claude Code for the pluggy maintainers; I prompted it, it did the work, I read it.
add_hookspecs(): if _verify_hook raises for an already-registered impl, the spec stays installed via set_specification(). A retry then raises ValueError: Hook 'h' is already registered within namespace ..., even after unregistering the bad plugin.
register(): if a historic replay (_maybe_apply_history) raises, the plugin stays in the registry with only the hookimpls processed before the failure. The code comment there acknowledges this.
Proposal: validate first and install afterwards in add_hookspecs. For the replay case, roll back on exception.
Activity
Validate hook specifications before installing them