Repository navigation
test(library): deterministic mode replays a byte-identical trace over 10,000 ticks - #11
Closed
Immanuel-Fowler wants to merge 1 commit into
Closed
Immanuel-Fowler wants to merge 1 commit into
Immanuel-Fowler wants to merge 1 commit into
Conversation
… refuses what it excludes One scripted sequence of 10,000 ticks and events — host-fired events, events fired by handlers, handlers that sleep on host time across ticks, and instance state — is replayed on fresh instances, on a current-thread and a multithreaded runtime, through tick_blocking and tick_sync, and every run must produce the same host-call trace byte for byte. A second test builds the four documented exclusions, a spawned worker, a serverlet, a landline and a sleep outside an event handler, and asserts that each fails with the deterministic-mode message, as an error from ready or tick on the coordinator's task and as a panic on the caller's thread under tick_sync. The library guide said the exclusions "panic". They do, but what the host sees is an error without the reason; the guide now says exactly that, and the notes record the gap. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This was referenced Sep 21, 2026
Closed
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.
Stacked on #10 (
feat/tick-cost-benchmark); merge that first.What
Two tests in
tests/library_tests.rs:engine_deterministic_trace_is_byte_identical_over_ten_thousand_ticks. One scripted sequence of 10,000 ticks and events (host-fired events on every third and eleventh tick, a handler that triggers another event every seventh tick, handlers thatsleepon host time across ticks, instance state, a varyingdt) is replayed on fresh instances, on a current-thread and a multithreaded runtime, throughtick_blockingandtick_sync. Every run must produce the same host-call trace byte for byte, and the trace is checked to actually contain what it should: one record per tick, thousands of sleeps that started and finished on host time, handler-fired events.engine_deterministic_mode_refuses_what_it_excludes. Builds the four documented exclusions (a spawned worker, a serverlet, a landline, asleepoutside an event handler) and asserts each fails with the deterministic-mode message: asreadyreturning "library startup task failed" ortickreturning "tick task failed" on the coordinator's task, and as a panic on the calling thread undertick_sync.Docs
docs/library-mode.mdsaid the exclusions "panic". They do, but the host observes an error without the reason; the guide now says exactly what surfaces where, andLIMITATIONS-notes.mdrecords that the reason only reaches the panic hook.Changelog entry under
[Unreleased]. No version bump.🤖 Generated with Claude Code