Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,8 @@ impl Source<ContextMessage> for Actions<'_> {
let stored = item.stored.as_ref()?;
let seq: u64 = item.key.parse().ok()?;
let label = self.memory.action_whole_label(seq)?;
let path = crate::cognition::tool_executor::spill::resolve(self.persona, &stored.handle).ok()?;
let body = std::fs::read_to_string(path).ok()?;
// the record keeps its result trimmed (`record_receipt_inner`); loaded back, it reads the same
Some(ContextMessage::user(format!("{label}{}", body.trim())))
let body = crate::cognition::tool_executor::spill::saved_whole(self.persona, &stored.handle).ok()?;
Some(ContextMessage::user(format!("{label}{body}")))
}

/// Once she has acted, the void said earlier in this epoch is superseded, never edited:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ fn an_evicted_result_is_still_seen_whole_through_its_stored_level() {
memory.record_receipt_typed(&[], "the newest stays resident", None, pin.retain(persona, "the newest stays resident"));
let (before, _) = memory.action_renderings();
let resident_whole = before.first().map(|act| act.1.clone()).expect("test: the first act");
memory.evict_resident_results_over(1);
memory.evict_resident_results_over(1, &|_, _| true);
let (acts, _) = memory.action_renderings();
let (seq, full, _, pointer, stored) = acts.first().cloned().expect("test: the first act");
let (chars, _) = stored.expect("evicted to its handle and priced");
Expand Down
2 changes: 2 additions & 0 deletions core/continuum-cognition/src/cognition/persona_workspace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,6 @@ pub use acting_hands::*;
mod root_acting_workspace;
pub use root_acting_workspace::*;
mod own_speech_persisted;
mod mind_results_reporter;
pub use mind_results_reporter::MindResultsReporter;
pub(crate) use own_speech_persisted::*;
Original file line number Diff line number Diff line change
Expand Up @@ -653,8 +653,9 @@ pub struct PersonaWorkspaceRegistry {
/// crosses between her public and private turns except what she publishes. It is never in
/// `cycles`, so the volatile checkpoint never writes it to disk in plaintext (until her
/// sealed store exists, a restart forgets her private scratchpad, which is the honest cost).
/// Lock order: `cycles`, then `templates`, then `mind_cycles`.
pub(super) mind_cycles: Mutex<HashMap<Uuid, Arc<WorkspaceCycle>>>,
/// Lock order: `cycles`, then `templates`, then `mind_cycles`. Its working memory is held
/// beside it so the memory owner accounts and sheds her private results too.
pub(super) mind_cycles: Mutex<HashMap<Uuid, ResidentWorkspace>>,
}

pub(super) struct ResidentWorkspace {
Expand Down
Loading
Loading