feat: add ww perform update, fix daemon crash-loop#410
Merged
Conversation
The kernel was hard-requiring 'http-client' from the membrane graft, but the daemon doesn't pass --http-dial. Session.http_client is now Option<...>, and make_host_handler returns an error when the cap is requested but unavailable. The graft loop gracefully skips http-client if the Session has None instead of panicking.
Extract perform_update() from perform_install(). The update command refreshes WASM images (CID comparison), republishes stdlib, regenerates daemon config + service file, restarts the daemon if images changed, and re-wires MCP. install now detects ~/.ww and delegates to update if already bootstrapped. upgrade calls update after binary replacement. Also fixes: daemon image layers no longer include MCP (its bin/main.wasm was clobbering the kernel entry point).
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.
Summary
Install/update/upgrade refactor:
ww perform installconflated first-time bootstrap with refreshing local state, causing stale WASM images to persist across upgrades.ww perform update(new command) — refreshes WASM images (CID comparison), republishes stdlib to IPFS, regenerates daemon config + service file, restarts daemon if images changed, re-wires Claude Code MCP. Safe to run repeatedly.ww perform installrefactored — detects existing~/.wwand delegates toperform_update. Cold-start bootstrap only runs on first install.ww perform upgradewired — automatically runsperform_updateafter binary replacement. No manual restart needed.Daemon crash-loop fix: The daemon was crash-looping because the MCP cell's
bin/main.wasmwas mounted as a root layer, clobbering the kernel entry point. Removed MCP from daemon image layers.Kernel http-client fix: The kernel hard-required
http-clientfrom the membrane graft, but the daemon doesn't pass--http-dial. Made the capability optional.Test Coverage
Option<http_client>paths)Pre-Landing Review
No issues found. Adversarial review identified 4 fixable issues (all addressed):
expect()panic with gracefulcontinueon optional http-client in graft loopperform_updateso first install publishes correctlyany_images_changedto avoid unnecessary service disruptionTest plan
cargo checkpassescargo test --libpasses (47 tests)ww perform uninstall→ clean slateww perform install→ cold start, daemon healthyww perform install(re-run) → delegates to update, images unchangedww perform update→ same behavior, daemon not restarted (nothing changed)