From 26a47c0d30fafddeb4c1da08c1411aa1e0d90ab9 Mon Sep 17 00:00:00 2001 From: "K. Isom" Date: Sun, 18 Oct 2026 09:25:28 -0700 Subject: [PATCH] =?UTF-8?q?docs:=20plan=20=E2=80=94=20Exchange::drain=5Fev?= =?UTF-8?q?ents=20is=20pub(crate)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/superpowers/plans/2026-10-18-tines-fleet-deployment.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/superpowers/plans/2026-10-18-tines-fleet-deployment.md b/docs/superpowers/plans/2026-10-18-tines-fleet-deployment.md index a56c5973..fefdfa83 100644 --- a/docs/superpowers/plans/2026-10-18-tines-fleet-deployment.md +++ b/docs/superpowers/plans/2026-10-18-tines-fleet-deployment.md @@ -82,7 +82,7 @@ **Interfaces:** - Produces: `pub struct ConfidenceEvent { pub peer: NodeId, pub id: ObservationId }` (peer = who received the obs). - Bounce records become `(ObservationId, A, BounceKind)` where `enum BounceKind { Sent, Received }` (private). `record_bounce` takes a kind; `is_sourced` matches either kind; a new `was_sent(bounce, id, addr)` matches `Sent` only. -- Exchange gains `bcast_sent: heapless::Vec<(ObservationId, A), { consts::BCAST_SENT_CAP }>` — broadcast sends are recorded into it on the emit path — plus `events: heapless::Vec` (push drop-oldest) and `pub fn drain_events(&mut self) -> impl Iterator + '_`. +- Exchange gains `bcast_sent: heapless::Vec<(ObservationId, A), { consts::BCAST_SENT_CAP }>` — broadcast sends are recorded into it on the emit path — plus `events: heapless::Vec` (push drop-oldest) and `pub(crate) fn drain_events(&mut self) -> heapless::Vec` (hosts reach it via `Node::drain_events`, Task 5). - [ ] **Step 1: Write the failing test** — `ack_validates_only_sent_ids`: A sends obs X to peer at addr 1; a forged `Ack { from: [2;16], ids: [X] }` from addr 2 (which never received X) is ignored — `store.is_released(&X)` stays false. `ack_releases_custody`: after A sends X to addr 1, an `Ack` from addr 1 listing X releases it (`is_released(&X)` true, `for_each_addressed_id`/forwarding skips it). `ack_fires_confidence_event`: a broadcast obs Y sent to addr 1, an `Ack` from addr 1 listing Y, `drain_events()` yields one `ConfidenceEvent { peer: [2;16], id: Y }`. - [ ] **Step 2: Run test to verify it fails** — `cargo test -p tines-core ack_` — Expected: FAIL.