Commit Graph
7 Commits
Author SHA1 Message Date
kyle 465410ca28 test(sim): pin bounce-table overflow behaviour 2026-10-22 08:44:09 -07:00
kyle 2738de4959 fix(core): ack only observations the store kept
Exchange::accept enqueued a pending ack whenever
!(duplicate && addressed && released) held, even when the backend
store.insert returned Err (store full / backend error). On Err the
released flag computed to false, so an ack was still enqueued: a
receiver that did not keep the message acked it. For an addressed
offer that releases the sender's custody for a message nobody holds;
for a broadcast it fires a false confidence event at the sender.

Gate the ack enqueue on res.is_ok(): enqueue only when the store
actually retained the observation. The existing released-holder
exception still applies among kept copies. No bounce is recorded on
Err (already the case).

Adds a unit test exercising a capped store (StoreError::Full) for
both a broadcast and an addressed offer, and a tines-sim property
that drives custody with CappedStore-backed nodes and asserts the
"at least one holder" invariant still holds when stores fill.
2026-10-19 12:35:17 -07:00
Tines Subagent 29c30a6b33 task-4: revert on_ack release to custody chain; fix drain_ack_buffer overflow
Revert on_ack release gating to release-on-any-ack (custody chain): release
custody on the first exact Ack from ANY peer the node dispatched the
observation to (relay or recipient), not just the recipient.

drain_ack_buffer send_n==0 bug: re-keep only the target addr's own pulled
entries instead of removing buffer.entries[0] (which dropped an unrelated
peer's oldest pending ack).

Rename the tines-sim addressed proptest to
addressed_always_held_by_carrier_or_recipient and reconcile its assertion to
the custody-chain holder invariant. Reword the misleading "Ids shrink
monotonically" comment. Add unit tests: ack_releases_custody_from_a_relay and
drain_ack_buffer_overflow_drops_only_target_peer.

Gate green: tines-core 106 lib tests, tines-sim suite, sh scripts/ci.sh.
2026-10-18 11:48:40 -07:00
kyle c9ee3684f0 test(sim): addressed relay scenario and property tests 2026-10-18 03:22:35 -07:00
kyle 1257f227ce refactor(sim): move FrameBuf on dup; vary per-node obs; test disconnect/unreachable 2026-10-17 23:58:15 -07:00
kyle ab9b892d94 chore: ci script and README 2026-10-17 21:48:37 -07:00
kyle 4706004f47 test(sim): property tests for convergence, order independence, monotonicity 2026-10-17 21:42:16 -07:00