persona drain: the actuator's no-attempt answer is Sent::Unattempted; a stray brace in the tests

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-11-28 05:52:07 +01:00
commit 4e53052bf5
2 changed files with 3 additions and 5 deletions

View file

@ -27,7 +27,7 @@ pub(crate) enum Sent {
Refused(String), Refused(String),
Lost, Lost,
/// The mouth attempted nothing: the send is certainly not posted, still owed, and goes out as a first send later. /// The mouth attempted nothing: the send is certainly not posted, still owed, and goes out as a first send later.
NotSent, Unattempted,
/// The mouth cannot say whether an earlier try posted: the send is never repeated, and is recorded unknown. /// The mouth cannot say whether an earlier try posted: the send is never repeated, and is recorded unknown.
Unknown, Unknown,
} }
@ -73,7 +73,7 @@ impl Actuator for Mouth<'_> {
Ok(receipt) => match (receipt.event_id, receipt.refusal) { Ok(receipt) => match (receipt.event_id, receipt.refusal) {
(_, Some(refusal)) => match refusal.reading(resend) { (_, Some(refusal)) => match refusal.reading(resend) {
Reading::NoAnswer => Sent::Lost, Reading::NoAnswer => Sent::Lost,
Reading::NotSent => Sent::NotSent, Reading::NotSent => Sent::Unattempted,
Reading::Unknown => Sent::Unknown, Reading::Unknown => Sent::Unknown,
Reading::Declined => Sent::Refused(refusal.name().to_owned()), Reading::Declined => Sent::Refused(refusal.name().to_owned()),
}, },
@ -222,7 +222,7 @@ pub(crate) fn deliver(actuator: &dyn Actuator, record: &mut Value, pass: Pass, s
stalled.insert(room.clone()); stalled.insert(room.clone());
still.push(send); still.push(send);
} }
Sent::NotSent => { Sent::Unattempted => {
stalled.insert(room.clone()); stalled.insert(room.clone());
if !handed { if !handed {
unmark(&mut send); unmark(&mut send);

View file

@ -359,8 +359,6 @@ fn t_l3_past_the_window_a_handed_send_is_unknown_and_one_never_handed_is_refused
assert!(record.get("owed").is_none()); assert!(record.get("owed").is_none());
} }
}
/// Soul s7 owed-predicate-split. One predicate says a record owes a send, and the poll's `owes`, the ack's `owing` and the drain's owed list /// Soul s7 owed-predicate-split. One predicate says a record owes a send, and the poll's `owes`, the ack's `owing` and the drain's owed list
/// all read it: a failed record never owes, whatever it carries, and an empty `owed` owes nothing. /// all read it: a failed record never owes, whatever it carries, and an empty `owed` owes nothing.
#[test] #[test]