Medi v0.0.4 Released
We’re excited to announce Medi v0.0.4. This release focuses on reliability, observability, and documentation for the host runtime, with deterministic tests and clearer diagnostics that help both developers and clinicians.
Highlights
- Comprehensive runtime error/diagnostics system
RuntimeError,MemoryErrorKind,SchedulerErrorKind, andRuntimeDiagnostic.- Context-aware reporting via
set_error_reporter_with_contextand themedi_runtime_report!macro that captures file/line/column/module/op. -
Multi-listener support with
add_error_context_listenerfor tests, metrics, and tooling. -
Context tags for channels and GC
- Channels (std mpsc):
channel.send,channel.recv,channel.try_recv(only on non-empty failures). - Crossbeam:
xchan.send,xchan.try_send(only on non-full failures),xchan.recv,xchan.try_recv(non-empty failures). -
GC:
gc.lockemitted when GC mutex is poisoned. -
Real-time memory (rt_zones) visibility
rt_region.alloc_*_overflowfor region overflows.-
fixed_pool.alloc_exhausted,fixed_pool.invalid_free,fixed_pool.double_freefor pool edges. -
Deterministic scheduler tests
- Replaced timing-based assertions with barrier/ack-based tests using crossbeam.
-
Serialized scheduler tests with a global test mutex to prevent cross-talk when running in parallel.
-
Better scheduler responsiveness
- Unpark all workers after enqueue and after task panics.
-
Reduced lock hold time on
stealersin worker threads. -
Documentation
- New
compiler/medic_runtime/README.mdcovering error types, recovery policies, RT memory behavior, common op tags, and examples.
Performance notes
- Diagnostics path validated via
reporter_invocation_under_1mstest (10k events well under a 2s cap). - Real-time memory latency and IoT-like tests stay within budget; constant-time behaviors maintained.
Full Changelog
See the CHANGELOG v0.0.4 for complete details.
Upgrade guidance
- No breaking API changes in this release.
- For custom error pipelines, prefer
set_error_reporter_with_contextand consideradd_error_context_listenerfor additional observers. - For testing scheduler behavior, follow the new ack-based pattern to avoid timing flakes.