Repository navigation
feat(gust): fused gust:os component — one component, five capabilities (gale#224), and what composing revealed - #235
Merged
Conversation
…e (gale#224) One wasm component exporting all five gust:os capabilities (time, log, spawn, exec, timer) whose only residual imports are gust:hal/mmio and the app-supplied gust:os/taskdisp. 16905 B, validates, gated by build-fused-gustos.sh. wac plug does not apply: the five providers are a flat antichain (no provider consumes another's export), so every plug ordering exits "the socket component had no matching imports for the plugs that were provided". The operation needed is a union merge with import forwarding — wac compose over a WAC script. build-gustos-components.sh now builds all five providers, and its per-component gate is widened from "imports only gust:hal/*" to "imports only gust:hal/* or gust:os/*" — exec-provider and spawn-provider legitimately import the trusted gust:os/taskdisp dispatch, which the APPLICATION supplies, so it is expected to survive composition. Negative-tested: env, wasi:*, and heap imports still fail. Not lowered to native, not run anywhere, and the three embedded executor copies remain three separate Tasks tables in three separate linear memories — the composite is structurally fused but semantically triplicated. FUSED-GUSTOS.md records all of this explicitly. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011QG86sovTbfnPNY9SfhSmo
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Closes the structural half of gale#224 — and surfaces an architecture defect that native linking had been hiding.
The artifact
One component, five
gust:osexports, residual imports exactly the hardware seam plus the app-supplied task poll:16 905 B of wasm.
wasm-tools validatepasses; noenv, WASI, heap or scheduler symbol survives in any core import.The finding: structurally fused, semantically triplicated
exec-provider,spawn-providerandtimer-providereach#[path]-include the sameplain/src/executor.rs, each with its ownstatic mut TASKS. Composed, that is three separate component instances with three separate linear memories — the composite declares 5:So a handle from
spawn.start()is meaningless totimer.sleep()orexec.state(). This is not one scheduler. The composite satisfies gale#224's stated invariant while not yet being a coherent OS, and saying only the first half would be an overclaim.This is worth stating positively too: the duplication was invisible while everything was linked into one native image. Composing the OS as components made it structurally explicit — 5 memories, 3 schedulers, handles that don't travel. Composition worked as a diagnostic.
The fix is an architecture change —
spawnandtimerimportingexecinstead of embedding it — which would also givewac pluga real edge to connect. Deliberately not done here; no provider logic or WIT was changed.wac plugis structurally inapplicable; this useswac composeThe five providers form a flat antichain: each exports a capability, none consumes another's. There is no edge for
plug. Every ordering fails withthe socket component had no matching imports for the plugs that were provided. The correct operation is a union merge with import forwarding —wac composeover a WAC script — which worked first try. (The plan doc said "wac plug"; the artifact disagreed, and the artifact wins.)Gates are not no-ops — negative-tested
The per-provider gate was widened (a provider may import
gust:hal/*andgust:os/*, nothing else) and still rejects real leaks —env,wasi:io/poll,gale:heap/alloc. The fused gate is deliberately stricter: it allowsgust:os/taskdispexactly, notgust:os/*. Run against a deliberately partial 2-provider composite it fails on all four expected counts. Deny-list sweep catchesenv,wasi:io/poll,malloc,__heap_base,poll_taskwhile correctly passinggust:hal/mmioand the WIT-typedpoll-task.Minor: a WIT world wider than reality
world timer-providerdeclaresimport taskdisp, but the built component imports onlygust:hal/mmio— the timer path never reachespoll_task, so it is dropped at link. Reported, not changed.Explicitly NOT claimed
Not lowered to native — no
.o, no code size, no SRAM, no cycles; 16 905 B is a wasm number. Not executed anywhere: no hardware, no Renode, no qemu, no wasm runtime. Zerogust:oscalls have run through this composite. Composing components proves nothing about their contents, and no new verification claim is made.Tools: wasm-tools 1.245.1, wac 0.10.1.
Part of the v0.6.0-rc Research Day cut (M1).
🤖 Generated with Claude Code
https://claude.ai/code/session_011QG86sovTbfnPNY9SfhSmo