Skip to content

fix(gust): restore gust:os syscall-seam dissolve path (time-provider resolution() drift from #202) - #213

Merged
avrabe merged 1 commit into
mainfrom
feat/gust-v0.5.0-syscall-seam
Jul 23, 2026
Merged

avrabe merged 1 commit into
mainfrom
feat/gust-v0.5.0-syscall-seam

Conversation

@avrabe

@avrabe avrabe commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Workstream B of the v0.5.0 release — restores the gust:os syscall-seam dissolve path and confirms it works end-to-end on the now-fixed toolchain.

The bug (silently shipped)

PR #202 (gust:os timer-sleep) added resolution: func() -> u64 to the time interface in wit-os/gust-os.wit, but never updated the time-provider crate's impl Guest for P. That's a missing trait item (E0046): cargo build for time-provider was broken — and with it both the tl-node and ts-node dissolves (both import time). It shipped unnoticed because #202's own demonstrator drives the executor natively and never exercises the time-provider dissolve path.

Fix

time-provider/src/lib.rs: add fn resolution() -> u64 { RESOLUTION_HZ } (RESOLUTION_HZ = 1_000_000), documented as a placeholder — TIM2_CNT here is a mocked free-running counter with no real PSC/ARR clock-tree config crossing this seam, so there is no genuine Hz to report yet. Regenerated the affected dissolved cores (os-tl-cm3.o, os-ts-cm3.o) with the current toolchain.

Verified (the decisive test — the seam was blocked for months on meld#326 + synth#757, both now fixed)

On synth 0.49.0 / loom 1.2.0 / meld 0.41.3:

  • build-os-tl.sh → os-tl-cm3.o text 2206 / bss 3096 (5354 B / 8192 budget)
  • gust_os_tl_probe (qemu) → OK: log=="gust:os up\n", run()=0xA — the buffer-carrying log.line capability crosses the fused-memory boundary uncorrupted.
  • gust_os_ts_probe (spawn) → OK: poll==1.

Follow-ups (not in this PR)

  • Kani harness over the tl/ts-node seam FSM (currently qemu-liveness probed, not formally verified at the seam boundary).
  • rivet VER-OS-SYSCALL-001 evidence link + a Renode content-gate for the seam.
  • Decide whether resolution() becomes a real silicon-derived value once a configured-PSC timer is wired into the seam.

🤖 Generated with Claude Code

…all seam (REQ-OS-SYSCALL-001)

PR #202 (gust:os timer-sleep) added `resolution: func() -> u64` to the
`time` interface in wit-os/gust-os.wit but never updated the `time-provider`
crate's `impl Guest for P`, so it silently broke `cargo build` for
time-provider (E0046, missing trait item) — and with it BOTH tl-node
(build-os-tl.sh) and ts-node (build-os-ts.sh), since both import `time`.
This regression shipped on main because gust_timer_probe (#202's own demo)
drives the executor natively and never exercises the time-provider dissolve
path, so nothing caught it.

Adds resolution() returning a documented placeholder tick rate (1 MHz) —
TIM2_CNT here is a raw mocked counter with no real PSC/ARR clock-tree config
crossing this seam, so there is no genuine Hz to report yet.

With the fix, re-verified end to end on the CURRENTLY INSTALLED toolchain
(synth 0.49.0, loom 1.2.0, meld 0.41.3 — all post meld#326/synth#757 fixes):
  - build-os-tl.sh: os-tl-cm3.o text=2206 data=52 bss=3096 (5354B/8192)
  - gust_os_tl_probe (qemu): "gust-os-tl-probe OK: log==\"gust:os up\\n\",
    run()=0xA" — buffer-carrying log.line crosses the fused-memory boundary
    UNCORRUPTED, exit 0.
  - build-os-ts.sh: os-ts-cm3.o text=1612 data=40 bss=2584 (4236B/8192)
  - gust_os_ts_probe (qemu): "gust-os-ts-probe OK: poll==1", exit 0.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011QG86sovTbfnPNY9SfhSmo
@avrabe

avrabe commented Jul 23, 2026

Copy link
Copy Markdown
Contributor Author

Re-triggering CI: the self-hosted runner went idle and #213's jobs (queued since 06:10) were zombied — reopening to spawn fresh runs against the live runner.

@avrabe avrabe closed this Jul 23, 2026
@avrabe avrabe reopened this Jul 23, 2026
@codecov

codecov Bot commented Jul 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@avrabe
avrabe merged commit 72c40fc into main Jul 23, 2026
63 of 121 checks passed
@avrabe
avrabe deleted the feat/gust-v0.5.0-syscall-seam branch July 23, 2026 10:15
avrabe added a commit that referenced this pull request Jul 23, 2026
…32 (gale#214) (#220)

Closes the process gap that let #202 ship green: it added time.resolution() to
the gust:os WIT without the time-provider Guest impl (E0046), silently breaking
the gust_os_tl/ts dissolve until #213 caught it by hand. No workflow built the
provider crates, so the compile error never fired in CI.

This gate builds every gust:os provider/app crate for wasm32 (the dissolve
target) — a WIT method that outruns its Guest impl now fails RED. Cargo-only;
the wit-bindgen-generated Guest trait makes the compile the oracle. Red-tested:
injecting a method into the time interface without the impl reproduces
E0046 'not all trait items implemented'; the gate on main is green (8/8 crates).

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant