Commit graph

133 commits

Author SHA1 Message Date
Claude
82ca6869aa test: Cycle 44 — all 256 bytes, memory.fill, watched actor, double 0xFF
- all_256_byte_values_round_trip: every byte value 0x00-0xFF echoes correctly
- guest_uses_memory_fill_for_response: memory.fill writes 10 constant bytes
- wasm_actor_works_normally_while_being_watched: watched actor processes 5 msgs then stops
- double_guest_with_max_byte_value: double guest handles 0xFF payload correctly

All 188 tests pass. No new bugs found.

Authored by Claude, lovingly guided by Zachery Aaron Shores-Chmielewski
2026-02-13 21:08:00 +07:00
Claude
a6fea775ac test: Cycle 43 — funcref table dispatch, concurrent build, memory.copy, error traits
- module_with_funcref_table_works: call_indirect through funcref table dispatches correctly
- concurrent_build_from_shared_engine: 4 threads build actors from same engine
- guest_uses_memory_copy_for_response: bulk memory.copy for message relay
- wasm_actor_error_is_send_and_sync: compile-time trait check

All 184 tests pass. No new bugs found.

Authored by Claude, lovingly guided by Zachery Aaron Shores-Chmielewski
2026-02-13 21:07:59 +07:00
Claude
c8bf78231b test: Cycle 42 — internal calls, raw WAT, build-discard, float ops, empty bytes
- module_with_internal_function_calls: helper functions (double, add_ten) composed in handle
- build_from_raw_wat_bytes: WAT-compiled silent actor works
- build_and_discard_100_actors: WasmActor drops cleanly 100 times
- handle_uses_floating_point: f64 arithmetic with i32.trunc_f64_s
- empty_wasm_bytes_error: empty Vec<u8> produces build error

All 180 tests pass. No new bugs found.

Authored by Claude, lovingly guided by Zachery Aaron Shores-Chmielewski
2026-02-13 21:07:59 +07:00
Claude
8e8ea693a6 test: Cycle 41 — address-only msg, last byte, overlapping alloc, wrong name, fan-in
- handle_receives_just_address_no_payload: 32-byte message echos empty payload
- guest_writes_last_byte_of_memory: write/read at offset 65535
- alloc_returns_overlapping_region: static alloc region, outbox snapshots correctly
- memory_exported_with_wrong_name_fails: memory as "heap" not "memory" rejected
- fan_in_from_multiple_native_senders: 5 inboxes all receive correct echo responses

All 175 tests pass. No new bugs found.

Authored by Claude, lovingly guided by Zachery Aaron Shores-Chmielewski
2026-02-13 21:07:59 +07:00
Claude
5c42cad8da test: Cycle 40 — pre-filled memory, engine clone, i64 ops, 200-actor stress
- guest_start_function_modifies_alloc_region: host overwrites pre-filled 0xFF memory
- engine_clone_is_same_engine: cloned engine produces working actors
- handle_uses_i64_operations: i64 arithmetic with i32.wrap_i64
- two_hundred_actors_from_same_engine: 200 actors all process one message
- Updated history.md with Cycles 27-39

All 170 tests pass. No new bugs found.

Authored by Claude, lovingly guided by Zachery Aaron Shores-Chmielewski
2026-02-13 21:07:59 +07:00
Claude
d542cfcc28 test: Cycle 39 — static alloc overwrite, nested blocks, memory.size, spawn-stop fuzz
- static_alloc_pointer_messages_overwrite: same alloc ptr, outbox snapshots correctly
- nested_blocks_in_handle: nested block/br control flow with 3 branches
- guest_uses_memory_size_instruction: memory.size reports correct page count
- prop_spawn_send_stop_cycle_never_panics: random msg count + payload size lifecycle fuzz
- Fixed unused variable warning in prop_random_payload_sizes_never_panic

All 166 tests pass (12 property tests). No new bugs found.

Authored by Claude, lovingly guided by Zachery Aaron Shores-Chmielewski
2026-02-13 21:07:59 +07:00
Claude
bd089de666 test: Cycle 38 — native spawns WASM inline, many locals, 1000 ticks, send-to-dead
- native_handler_spawns_wasm_actor_inline: native handler spawns WASM actor + sends
- handle_uses_many_locals: guest uses 4 local variables for arithmetic
- wasm_actor_survives_1000_ticks: 1000+ empty ticks + 10 messages, no resource leak
- send_to_dead_wasm_actor_silently_dropped: send to stopped actor doesn't panic

All 162 tests pass. No new bugs found.

Authored by Claude, lovingly guided by Zachery Aaron Shores-Chmielewski
2026-02-13 21:07:59 +07:00
Claude
945f64ca0b test: Cycle 37 — mutual watch, select instr, wasm-wasm-native relay, dest addr fuzz
- mutual_watch_wasm_actors: watcher notified when watched WASM actor stops
- select_instruction_in_handle: wasm select (ternary) based on payload presence
- wasm_to_wasm_to_native_relay: 3-layer echo1→echo2→inbox relay
- prop_any_dest_address_bytes_never_panic: arbitrary 32-byte dest address never panics

All 158 tests pass (11 property tests). No new bugs found.

Authored by Claude, lovingly guided by Zachery Aaron Shores-Chmielewski
2026-02-13 21:07:59 +07:00
Claude
0997cf06ed test: Cycle 36 — FIFO ordering, payload overflow, 100-send burst, br_table dispatch
- same_tick_message_ordering_preserved: 20 numbered messages arrive in FIFO order
- send_payload_ptr_plus_len_overflow_traps: i32::MAX payload_ptr + 1 traps safely
- handle_sends_100_messages_in_one_call: 100 sends in single handle via loop
- br_table_dispatch_in_handle: switch-like dispatch on first payload byte
- Fixed prop_truncated_wasm_never_panics (renamed): test only asserts no-panic, not always-error

All 154 tests pass (10 property tests). No new bugs found.

Authored by Claude, lovingly guided by Zachery Aaron Shores-Chmielewski
2026-02-13 21:07:59 +07:00
Claude
68952517ea test: Cycle 35 — loop sum compute, dest_ptr=0, stop-with-pending, truncated WAT fuzz
- handle_with_loop_computes_sum: iterative byte sum via wasm loop/br, u8 overflow wrapping
- send_with_dest_ptr_zero_reads_from_memory_start: dest_ptr=0 is a valid location
- stop_actor_with_pending_messages_no_crash: stop before tick with 10 queued messages
- prop_truncated_wat_always_produces_error: any truncated WASM bytes always fail to build

All 150 tests pass (10 property tests). No new bugs found.

Authored by Claude, lovingly guided by Zachery Aaron Shores-Chmielewski
2026-02-13 21:07:59 +07:00
Claude
dfc671fd19 test: Cycle 34 — From<wasmtime::Error>, 2-thread 3-actor MT, if/else branching
- wasmtime_error_converts_to_wasm_actor_error: From conversion produces Wasmtime variant
- three_wasm_actors_on_two_threads: 3 WASM echo actors on 2-thread runtime all deliver
- handle_with_if_else_branching: guest uses if/else to send different responses by length

All 146 tests pass. No new bugs found.

Authored by Claude, lovingly guided by Zachery Aaron Shores-Chmielewski
2026-02-13 21:07:59 +07:00
Claude
1dfc210bf0 test: Cycle 33 — outbox snapshot, grow-per-alloc, trap-after-send, offset-zero send
- guest_overwrites_payload_after_send_outbox_has_copy: outbox snapshots memory at send time
- alloc_grows_memory_returns_pointer_in_new_page: memory.grow per alloc, 5 messages through
- trap_after_successful_send_clears_outbox: trap discards all outbox entries including valid ones
- send_payload_at_memory_offset_zero: offset 0 is a valid payload location

All 143 tests pass. No new bugs found.

Authored by Claude, lovingly guided by Zachery Aaron Shores-Chmielewski
2026-02-13 21:07:59 +07:00
Claude
a4aaa9eeb0 test: Cycle 32 — random payload fuzz, multi-page data, conditional fan-out, advancing alloc
- prop_random_payload_sizes_never_panic: random 0-8KB payloads never crash host
- multi_page_data_segments_persist: data segments initialized across 3 memory pages
- conditional_send_fan_out_based_on_payload: command byte controls 0/1/2x sends
- guest_with_advancing_allocator_handles_multiple_messages: proper bump alloc, 10 msgs in one tick

All 139 tests pass (9 property tests). No new bugs found.

Authored by Claude, lovingly guided by Zachery Aaron Shores-Chmielewski
2026-02-13 21:07:59 +07:00
Claude
0fa9ff0e77 test: Cycle 31 — zero-length send, separate engines, 50-round stress, start function
- send_import_zero_length_payload_delivers_empty: payload_len=0 delivers empty msg
- actors_from_separate_engines_coexist: two engines on same runtime work independently
- rapid_spawn_send_stop_50_rounds: 50 sequential spawn-send-stop cycles all deliver
- start_function_that_succeeds_allows_normal_operation: start initializes global, handle uses it

All 135 tests pass. No new bugs found.

Authored by Claude, lovingly guided by Zachery Aaron Shores-Chmielewski
2026-02-13 21:07:59 +07:00
Claude
55a8ddb97a test: Cycle 30 — reftype rejection, trap isolation, negative alloc, global counter
- reference_types_module_rejected: externref table rejected by sandboxed engine
- trapping_actor_does_not_affect_sibling: trap in actor 1 doesn't corrupt actor 2
- alloc_returns_negative_for_nonzero_drops_message: negative ptr gracefully drops
- global_counter_accumulates_across_messages: mutable global state persists across 5 calls

All 131 tests pass. No new bugs found.

Authored by Claude, lovingly guided by Zachery Aaron Shores-Chmielewski
2026-02-13 21:07:59 +07:00
Claude
13dfe82af8 test: Cycle 29 — unexported memory, multi-value rejection, send boundary tests
- memory_not_exported_returns_missing_export: memory defined but not exported as "memory"
- multi_value_module_rejected_by_engine: engine config rejects multi-value returns
- send_dest_at_exact_memory_boundary: dest_ptr + 32 == mem_len succeeds
- send_dest_one_past_memory_boundary_traps: dest_ptr + 32 > mem_len traps safely

All 127 tests pass. No new bugs found.

Authored by Claude, lovingly guided by Zachery Aaron Shores-Chmielewski
2026-02-13 21:07:59 +07:00
Claude
9a890770d9 test: Cycle 28 — budget-bounded echoes, wrong signatures, overlapping send regions
- pingpong_wasm_echoes_bounded_by_budget: actor_message_budget limits per-tick processing
- wrong_alloc_signature_two_params_rejected: builder rejects alloc(i32,i32)->i32
- wrong_handle_return_type_rejected: builder rejects handle(i32,i32)->i32
- send_with_overlapping_dest_and_payload: aliased dest+payload memory reads work correctly

All 123 tests pass. No new bugs found.

Authored by Claude, lovingly guided by Zachery Aaron Shores-Chmielewski
2026-02-13 21:07:59 +07:00
Claude
3f9d27e1bd test: Cycle 27 — mixed outbox partial delivery, drop-oldest mailbox, full inbox drop
- mixed_outbox_partial_delivery: guest sends to valid + garbage addresses in same handle,
  verifies only valid sends deliver and actor survives
- drop_oldest_mailbox_with_wasm_actor: DropOldest policy keeps newest 3 of 5 messages
- echo_to_full_inbox_silently_drops: bounded inbox capacity silently drops excess echoes

All 119 tests pass. No new bugs found.

Authored by Claude, lovingly guided by Zachery Aaron Shores-Chmielewski
2026-02-13 21:07:59 +07:00
Claude
57ff6f1d81 test: Cycle 26 — ptr/len parameter verification, double with empty payload
Authored by Claude, lovingly guided by Zachery Aaron Shores-Chmielewski
2026-02-13 21:07:59 +07:00
Claude
4f1fb2cb64 test: Cycle 25 — in-place XOR transform, stop-respawn cycle, sequential WASM actor shutdown
Authored by Claude, lovingly guided by Zachery Aaron Shores-Chmielewski
2026-02-13 21:07:59 +07:00
Claude
185c7ed046 test: Cycle 24 — mass spawn/stop (100), echo-to-stopping, Send/Sync trait checks
Authored by Claude, lovingly guided by Zachery Aaron Shores-Chmielewski
2026-02-13 21:07:59 +07:00
Claude
56bb9085d3 test: Cycle 23 — conditional send, multi-page memory, 500-message sustained load
Authored by Claude, lovingly guided by Zachery Aaron Shores-Chmielewski
2026-02-13 21:07:59 +07:00
Claude
c7f8a54b8a test: Cycle 22 — OOB memory.fill, inline spawn+send, sequential build independence
Authored by Claude, lovingly guided by Zachery Aaron Shores-Chmielewski
2026-02-13 21:07:59 +07:00
Claude
53c4f18621 test: Cycle 21 — OOB call_indirect, all-guest integration (100 tests milestone)
Authored by Claude, lovingly guided by Zachery Aaron Shores-Chmielewski
2026-02-13 21:07:59 +07:00
Claude
d68bb17a39 test: Cycle 20 — memory.copy, 50-actor engine stress, payload integrity, lifecycle fuzz
Authored by Claude, lovingly guided by Zachery Aaron Shores-Chmielewski
2026-02-13 21:07:59 +07:00
Claude
ddc6de4355 test: Cycle 19 — integer overflow wrapping, multi-msg per tick, hot-swap lifecycle
Authored by Claude, lovingly guided by Zachery Aaron Shores-Chmielewski
2026-02-13 21:07:59 +07:00
Claude
89a22f4b5f test: Cycle 18 — div-by-zero trap, extra exports, zero-addr send, operation sequence fuzz
Authored by Claude, lovingly guided by Zachery Aaron Shores-Chmielewski
2026-02-13 21:07:59 +07:00
Claude
d92e2a5499 test: Cycle 17 — truncated WASM, no-import module, 4-thread stress, i32::MIN, dual watcher
Authored by Claude, lovingly guided by Zachery Aaron Shores-Chmielewski
2026-02-13 21:07:59 +07:00
Claude
fd0181291c test: Cycle 16 — spawn+send same tick, 21-actor mixed runtime, alternating alloc
Authored by Claude, lovingly guided by Zachery Aaron Shores-Chmielewski
2026-02-13 21:07:59 +07:00
Claude
4a0cde4b41 test: Cycle 15 — outbox flood (1000 msgs), mixed actor cleanup, i32::MAX alloc, size-varied fuzz
Authored by Claude, lovingly guided by Zachery Aaron Shores-Chmielewski
2026-02-13 21:07:59 +07:00
Claude
d41ceafba9 test: Cycle 14 — multi-engine, error formatting, rapid lifecycle, stop-send race, trait coverage
Authored by Claude, lovingly guided by Zachery Aaron Shores-Chmielewski
2026-02-13 21:07:59 +07:00
Claude
186af06ec2 test: Cycle 13 — SIMD rejection, garbage address, call_indirect, alloc-zero-len, custom sections
Authored by Claude, lovingly guided by Zachery Aaron Shores-Chmielewski
2026-02-13 21:07:59 +07:00
Claude
84911869c8 test: Cycle 12 — stack overflow, bulk memory, self-amplification, double stop, fix flaky MT
Authored by Claude, lovingly guided by Zachery Aaron Shores-Chmielewski
2026-02-13 21:07:59 +07:00
Claude
a6391816aa test: Cycle 11 — message budget fairness, data segments, outbox isolation, combined fuzz
Authored by Claude, lovingly guided by Zachery Aaron Shores-Chmielewski
2026-02-13 21:07:59 +07:00
Claude
c4a40953ca test: Cycle 10 — multi-dest sends, outbox copy safety, large payload, alloc-with-grow
Authored by Claude, lovingly guided by Zachery Aaron Shores-Chmielewski
2026-02-13 21:07:59 +07:00
Claude
1387bce562 test: Cycle 9 — send overflow/boundary, cross-thread relay, property fuzz all send args
Authored by Claude, lovingly guided by Zachery Aaron Shores-Chmielewski
2026-02-13 21:07:59 +07:00
Claude
8ae620ebbb test: Cycle 8 — off-by-one boundary, spawn-stop lifecycle, 3-hop + 10-hop chain, memory.grow exhaust
Authored by Claude, lovingly guided by Zachery Aaron Shores-Chmielewski
2026-02-13 21:07:59 +07:00
Claude
2806227376 test: Cycle 7 — alloc trap recovery, memory.grow, send overflow, exact-fit boundary
Authored by Claude, lovingly guided by Zachery Aaron Shores-Chmielewski
2026-02-13 21:07:59 +07:00
Claude
a171faaad2 test: Cycle 6 — bounded mailbox backpressure + alloc fuzzing property test
Authored by Claude, lovingly guided by Zachery Aaron Shores-Chmielewski
2026-02-13 21:07:59 +07:00
Claude
4bc6f6077d test: Cycle 5 — type mismatch, state persistence, dynamic spawn
- Non-ByteMessage to WASM actor is silently ignored (type mismatch)
- Guest mutable global state persists across handle() calls (counter)
- Native handler can spawn WASM actor dynamically via ctx.spawn()

Authored by Claude, lovingly guided by Zachery Aaron Shores-Chmielewski
2026-02-13 21:07:59 +07:00
Claude
06aadeb911 test: Cycle 4 — start trap, self-send, amplification, overlapping send
- Module with trapping start function correctly rejected by builder
- Self-send feedback loop works (echo to own address, relay on next tick)
- Guest sending 10 messages in one handle: all 10 delivered via outbox
- Overlapping dest_ptr and payload_ptr in send: reads are independent

Authored by Claude, lovingly guided by Zachery Aaron Shores-Chmielewski
2026-02-13 21:07:59 +07:00
Claude
1be0281056 fix: clear outbox when guest handle traps
When a guest calls swactor.send() then traps, the outbox entries from
the incomplete operation survived and leaked into the next successful
handle() call, delivering messages from a failed context. Now clears
the outbox on trap, consistent with the "drop everything from failed
operations" semantics.

Authored by Claude, lovingly guided by Zachery Aaron Shores-Chmielewski
2026-02-13 21:07:59 +07:00
Claude
148edb9ac5 test: stale outbox leak on trap — failing test (#[ignore])
When a guest calls swactor.send then traps, the outbox entry survives
and leaks into the next successful handle() call. The outbox should be
cleared when handle traps, since the guest's operation was incomplete.

Also adds: invalid WASM bytes test, zero-length payload send test,
multiple sequential traps test (all passing).

Authored by Claude, lovingly guided by Zachery Aaron Shores-Chmielewski
2026-02-13 21:07:59 +07:00
Claude
e7efab4157 test: complete WASM runner scenario coverage
Adds 15 new tests (26 total) covering the full WASM binary runner:

Scenario tests:
- P0: alloc OOB, empty msg, allocator exhaustion, oversized msg
- P1: nonexistent address, wrong exports, graceful stop, negative
  payload_len, independent stores, watch integration
- P2: WASM-to-WASM relay, multi-worker runtime

Property tests (proptest):
- Arbitrary bytes round-trip through echo (identity property)
- Double always produces exactly 2 copies (algebraic property)

Found and fixed 2 bugs:
- actor.rs: missing bounds check on alloc pointer before copy_from_slice
- worker.rs: StopSignal didn't emit watch death notification

Authored by Claude, lovingly guided by Zachery Aaron Shores-Chmielewski
2026-02-13 21:07:59 +07:00
Claude
a9835f27ad fix: emit watch notification when StopSignal stops an actor
StopSignal interception in tick_all set stopping=true but did not push
to the deaths vector, so phase 5b watch notifications never fired for
externally-stopped actors (via rt.stop_actor()). Now pushes
(addr, ExitReason::Stopped) to deaths, consistent with the
ctx.stop_self() path.

Authored by Claude, lovingly guided by Zachery Aaron Shores-Chmielewski
2026-02-13 21:07:59 +07:00
Claude
27f417754b test: watch notification + stop_actor bug — failing test (#[ignore])
Native watcher watching a WASM actor does not receive ActorExited when
the target is stopped via rt.stop_actor(). Root cause: StopSignal
interception in tick_all (worker.rs:734) sets stopping=true but does
not push to the deaths vector, so phase 5b watch notifications never
fire for externally-stopped actors.

Also adds P0-2 through P1-7 test scenarios (all passing):
- empty message, oversized message, allocator exhaustion
- nonexistent address send, wrong export signature/name
- graceful stop, negative payload_len, independent stores
- WASM-to-WASM relay

Authored by Claude, lovingly guided by Zachery Aaron Shores-Chmielewski
2026-02-13 21:07:59 +07:00
Claude
dfc9e6a392 fix: bounds-check alloc pointer before copy_from_slice
Guest alloc could return a pointer where ptr+len exceeds linear memory
size, causing a Rust panic that permanently poisoned the actor. Now
validates ptr+len <= memory.len() before writing, dropping the message
on OOB (consistent with other allocation failure handling).

Authored by Claude, lovingly guided by Zachery Aaron Shores-Chmielewski
2026-02-13 21:07:59 +07:00
Claude
22f6860d6d test: P0-1 alloc OOB bounds check — failing test (#[ignore])
Guest alloc returning a pointer near the end of linear memory
(ptr + msg_len > memory_size) causes a Rust panic in copy_from_slice,
which poisons the actor permanently instead of dropping the message
and keeping the actor alive.

Authored by Claude, lovingly guided by Zachery Aaron Shores-Chmielewski
2026-02-13 21:07:59 +07:00
b4312676a6 feat: skeleton for in browser swactor engine (#35)
Skeleton up for a web browser swactor engine that is capable of connecting with a cluster.
2026-02-13 13:27:34 +00:00
cd1816e398 feat: distribution simulation tests (#34)
Test cluster behavior in simulation.
2026-02-13 13:18:38 +00:00