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
Zi identifies runtime ownership by plugin ID rather than by load instance. A
second load of the same plugin can therefore overwrite or collapse the state
needed to clean up the first load.
Current examples:
widget restoration scans later plugin loads but explicitly skips repeated
loads of the same plugin;
function diff state is reset on overwrite-load, so a function created by the
first load appears pre-existing to the second and can survive the eventual
unload; and
bindkey and widget ownership chains cannot distinguish two instances with
the same plugin ID.
The hook-registration cleanup added by #108 preserves its first snapshot
across overwrite-loads, which fixes that hook-specific contract without
claiming to solve the shared per-load identity model.
Impact
Repeated loads can leave functions behind or restore the wrong prior widget or
binding state. Multi-plugin replacement chains can likewise lose the
immediately preceding live owner.
Acceptance criteria
Represent function, widget, and bindkey ownership per load instance rather
than only by plugin ID.
Restore or remove state belonging to the correct instance when unloading.
Restore the immediately preceding live owner in multi-plugin chains.
Preserve correct behavior when the same plugin is loaded more than once.
Add focused tests for repeated same-plugin function definitions, two-plugin
widget and bindkey chains, repeated same-plugin loads, and out-of-order
unload.
Define the minimal per-load identity and ownership-chain representation before
implementation, then apply it consistently to function, widget, and bindkey
records.
Problem
Zi identifies runtime ownership by plugin ID rather than by load instance. A
second load of the same plugin can therefore overwrite or collapse the state
needed to clean up the first load.
Current examples:
loads of the same plugin;
first load appears pre-existing to the second and can survive the eventual
unload; and
the same plugin ID.
The hook-registration cleanup added by #108 preserves its first snapshot
across overwrite-loads, which fixes that hook-specific contract without
claiming to solve the shared per-load identity model.
Impact
Repeated loads can leave functions behind or restore the wrong prior widget or
binding state. Multi-plugin replacement chains can likewise lose the
immediately preceding live owner.
Acceptance criteria
than only by plugin ID.
widget and bindkey chains, repeated same-plugin loads, and out-of-order
unload.
from fix(unload): track and remove plugin-owned hook callbacks #108 compatible.
Next action
Define the minimal per-load identity and ownership-chain representation before
implementation, then apply it consistently to function, widget, and bindkey
records.