diff --git a/crates/mind-body/src/persona.rs b/crates/mind-body/src/persona.rs index b927825..824643d 100644 --- a/crates/mind-body/src/persona.rs +++ b/crates/mind-body/src/persona.rs @@ -19,7 +19,6 @@ use anyhow::{Result, anyhow, bail}; use chrono::{DateTime, Utc}; use cultcache_rs::{CultCache, DatabaseEntry, SingleFileMessagePackBackingStore}; use eureka_pipeline::{MemoryOrigin, Slug}; -use serde::{Deserialize, Serialize}; use serde_json::Value; use crate::address::{Addressee, addresses, is_for, localpart}; diff --git a/crates/mind-body/src/projection/simulate.rs b/crates/mind-body/src/projection/simulate.rs index 817e4e4..804525c 100644 --- a/crates/mind-body/src/projection/simulate.rs +++ b/crates/mind-body/src/projection/simulate.rs @@ -40,7 +40,7 @@ use super::harness::{Harness, Line, Message, OVERLAP_FLAG, cosine, pending_for, use super::select::Draw; use super::tuning; use super::turn::{self, Actuator, Edited, Sent, history, last_wake}; -use super::{DomainFacts, DomainSource, MouthReader, Organs, ReadFixture, ReadSource, Request, Through, TurnKind, project}; +use super::{DomainFacts, DomainSource, MouthReader, Organs, ReadFixture, ReadSource, Request, Through, TurnKind}; use crate::address::{Addressee, is_for, localpart}; use crate::chat_client::ChatPending; use crate::heartbeat::{Addressing, DEFAULT_BEAT_S, FileStore, HeartbeatView, LineFacts, Speaker, WakeCause, WakePolicy, addressed_by_member, wakes}; diff --git a/crates/mind-body/src/projection/turn.rs b/crates/mind-body/src/projection/turn.rs index 9498c83..70b472f 100644 --- a/crates/mind-body/src/projection/turn.rs +++ b/crates/mind-body/src/projection/turn.rs @@ -66,12 +66,11 @@ impl Actuator for Mouth<'_> { } } -/// One turn taken: what `project` reported, her record of it, her state after the commit and what the commit did. +/// One turn taken: what `project` reported, her record of it (the commit's work under `committed`) and her state after it. pub(crate) struct Taken { pub report: Value, pub record: Value, pub state: Value, - pub applied: Applied, } impl Taken { @@ -125,7 +124,7 @@ pub(crate) fn take(organs: &Organs, request: &Request, actuator: &dyn Actuator, record["selected"] = render["selected"].clone(); } record["at"] = json!(now.to_rfc3339()); - Taken { report, record, state, applied } + Taken { report, record, state } } /// What her records say of her: her last turn's record, the ids her last projections selected, her last records and diff --git a/crates/mind-body/src/projection/turn/tests.rs b/crates/mind-body/src/projection/turn/tests.rs index 20e5aec..beafbe3 100644 --- a/crates/mind-body/src/projection/turn/tests.rs +++ b/crates/mind-body/src/projection/turn/tests.rs @@ -121,7 +121,7 @@ fn t_l1_failed_turn_record() { keys.retain(|key| !matches!(*key, "selected" | "at" | "committed")); assert_eq!(keys, ["failed"], "the record holds the failure alone beside what every record carries"); assert_eq!(taken.state, state, "a failed turn applies nothing"); - assert_eq!(taken.applied, Applied::default()); + assert_eq!(taken.record["committed"], json!(Applied::default())); } #[test]