Problem
Empty receipt ID arrays may cross the Go/Rust FFI boundary as a null pointer with zero length while Rust unconditionally constructs a slice from the pointer.
Expected behavior
The ABI uses a coherent nil/zero pair for empty arrays, Rust decodes it without dereferencing a null pointer, and non-empty arrays retain their synchronous callback lifetime.
Actual behavior
The empty case is not explicitly guarded by the Rust decoder.
Relevant evidence
Affected code is in whatsrust/src/events.rs, whatsrust/lib/receipt_events.go, and its tests.
Acceptance criteria
- Empty receipt arrays decode safely.
- Non-empty arrays preserve existing allocation and callback behavior.
- ABI layout remains unchanged.
- Focused/full Go and Rust tests pass.
Problem
Empty receipt ID arrays may cross the Go/Rust FFI boundary as a null pointer with zero length while Rust unconditionally constructs a slice from the pointer.
Expected behavior
The ABI uses a coherent nil/zero pair for empty arrays, Rust decodes it without dereferencing a null pointer, and non-empty arrays retain their synchronous callback lifetime.
Actual behavior
The empty case is not explicitly guarded by the Rust decoder.
Relevant evidence
Affected code is in
whatsrust/src/events.rs,whatsrust/lib/receipt_events.go, and its tests.Acceptance criteria