feat(fs): support live embedded pack install/update lifecycle#353
Merged
Conversation
Refactor the embed registry from a flat reader map to per-pack handles keyed by pack path and indexed by owning module/version. Add RegisterPack, UnregisterPack, and UnregisterModule so a specific (module, version) pack can be staged, replaced, or torn down independently — the basis for live module install/update/uninstall. Add EntryResolver (GetFSForEntry) so the manager resolves an fs.embed entry through the pack matching the entry's module/version metadata, falling back to ID-based lookup for legacy packs. This keeps resolution deterministic while two versions of a module are registered side by side during an update.
Tie embedded .wapp pack lifecycle to module dependency expansion. The hub dependency handler now returns registry Effects from Expand: Prepare stages the resolved modules' packs into the embed registry (keeping file handles open) so fs.embed entries created in the same changeset resolve during apply; Commit drops packs made obsolete by the operation (removed modules, prior versions); Rollback unregisters the staged packs on apply failure. Boot registration now uses RegisterPack with module/version from lock load paths, so boot and live governance installs share one pack-registration API. Fixes live hub-install/update/uninstall of modules that ship an embedded filesystem, which previously failed with 'filesystem not found' because the pack reader was never registered outside the boot path.
2d510e4 to
ab51a34
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Live hub installs could add fs.embed entries before the corresponding .wapp reader was registered in the embedded filesystem registry. Updates also need deterministic version-aware resolution while old and new packs are both staged.
What
Verification