Summary
Update flow: install-of-new-version then atomic swap. New version sits next to old under plugins/{slug}/{version}/, the current symlink retargets, in-flight WASM invocations drain (up to 5s) then the old module is closed and the new one instantiated. Old versions retained for N days (default 30) for rollback then GCd. ABI breaks (abi_version change) do NOT auto-update.
Design reference
- docs/02-plugin-system.md §3.4
Acceptance criteria
Dependencies
#45 (lifecycle), #53 (migrations)
Complexity
L
Summary
Update flow: install-of-new-version then atomic swap. New version sits next to old under
plugins/{slug}/{version}/, thecurrentsymlink retargets, in-flight WASM invocations drain (up to 5s) then the old module is closed and the new one instantiated. Old versions retained forNdays (default 30) for rollback then GCd. ABI breaks (abi_versionchange) do NOT auto-update.Design reference
Acceptance criteria
Update(slug, newBundle)flow: verify + pre-compile, write toplugins/{slug}/{newVersion}/, run migrations from last-applied to new latest, atomically retargetcurrentsymlinkModule, wait up to 5s for in-flight, then force-closeModuleinstantiated, pool pointer atomically swapped, oldCompiledModuleretained (in-memory) until retention window expiresplugins/{slug}/{oldVersion}/for N days (default 30, configurable). GC sweep job removes after.abi_versionchange between old and new) refuses auto-update; admin must explicitly opt-in per-pluginDependencies
#45 (lifecycle), #53 (migrations)
Complexity
L