Add dynamic Persona memory recall
This commit is contained in:
parent
24afc4eabf
commit
003d84e09f
11 changed files with 295 additions and 18 deletions
|
|
@ -15,6 +15,7 @@ use epiphany_core::build_persona_interpreter_prompt;
|
|||
use epiphany_core::build_persona_memory_chunks;
|
||||
use epiphany_core::build_persona_projector_prompt;
|
||||
use epiphany_core::build_persona_turn_prompt;
|
||||
use epiphany_core::render_dynamic_persona_memory_recall_for_output;
|
||||
use epiphany_core::render_persona_memory_recall_with_cache;
|
||||
use epiphany_core::render_persona_semantic_memory_recall;
|
||||
use epiphany_core::semantic_memory_recall_from_heartbeat_action;
|
||||
|
|
@ -147,20 +148,64 @@ fn main() {
|
|||
assert_contains(&persona_prompt, "Semantic memory recall");
|
||||
assert_contains(&persona_prompt, "Fallback typed memory graph context");
|
||||
|
||||
let persona_output = "I can speak, but the effect needs a receipt.";
|
||||
let dynamic = render_dynamic_persona_memory_recall_for_output(
|
||||
&persona_memory_entry(),
|
||||
"state/agents.msgpack#Persona",
|
||||
&persona_prompt,
|
||||
persona_output,
|
||||
&recall,
|
||||
4,
|
||||
Some(&EpiphanyMemoryContextPacket {
|
||||
id: "memctx-smoke-dynamic-fallback".to_string(),
|
||||
query_id: "persona-smoke-dynamic-output".to_string(),
|
||||
summaries: vec![EpiphanyMemorySummary {
|
||||
id: "summary-smoke-dynamic-fallback".to_string(),
|
||||
target: "role:Persona".to_string(),
|
||||
claim: "Dynamic self-memory recall should inspect the Persona output before Mind interprets side effects."
|
||||
.to_string(),
|
||||
action_implication:
|
||||
"Interpreter should see output-triggered recall, not only the pre-turn prompt recall."
|
||||
.to_string(),
|
||||
freshness: EpiphanyMemoryFreshnessStatus::Ready,
|
||||
confidence: 82,
|
||||
..Default::default()
|
||||
}],
|
||||
..Default::default()
|
||||
}),
|
||||
&PersonaMemoryCacheConfig {
|
||||
qdrant_url: "http://127.0.0.1:1".to_string(),
|
||||
qdrant_api_key: None,
|
||||
qdrant_timeout_ms: 1,
|
||||
ollama_base_url: "http://127.0.0.1:1".to_string(),
|
||||
ollama_model: "qwen3-embedding:0.6b".to_string(),
|
||||
ollama_timeout_ms: 1,
|
||||
collection_name: "epiphany_persona_memory_dynamic_smoke".to_string(),
|
||||
query_instruction: "dynamic-smoke".to_string(),
|
||||
},
|
||||
);
|
||||
assert_eq!(dynamic.status, "fallback");
|
||||
assert_contains(
|
||||
&dynamic.rendered_recall,
|
||||
"Dynamic self-memory recall should inspect the Persona output",
|
||||
);
|
||||
|
||||
let interpreter_prompt = build_persona_interpreter_prompt(&PersonaInterpreterInput {
|
||||
identity,
|
||||
persona_prompt,
|
||||
persona_output: "I can speak, but the effect needs a receipt.".to_string(),
|
||||
persona_output: persona_output.to_string(),
|
||||
semantic_memory_recall: recall,
|
||||
dynamic_semantic_memory_recall: dynamic.rendered_recall,
|
||||
pending_mentions: Vec::new(),
|
||||
allowed_channel_ids: vec!["aquarium".to_string()],
|
||||
});
|
||||
assert_contains(&interpreter_prompt, "Dynamic semantic memory recall");
|
||||
assert_contains(&interpreter_prompt, "Dynamic self-memory recall");
|
||||
assert_contains(&interpreter_prompt, "output-triggered recall");
|
||||
assert_contains(&interpreter_prompt, "STATE NOTE");
|
||||
assert_contains(&interpreter_prompt, "SAY");
|
||||
|
||||
println!(
|
||||
"status=ok recallSource=typed-memory-graph qdrantCache=persona-memory-bridge-wired heartbeatRecall=prompt-wired liveQdrant=not-required personaLayers=projector,persona,interpreter privateStateExposed=false"
|
||||
"status=ok recallSource=typed-memory-graph qdrantCache=persona-memory-bridge-wired heartbeatRecall=prompt-wired dynamicRecall=interpreter-output-wired liveQdrant=not-required personaLayers=projector,persona,interpreter privateStateExposed=false"
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ use epiphany_core::build_persona_turn_prompt;
|
|||
use epiphany_core::build_weksa_interlingua_packet;
|
||||
use epiphany_core::build_weksa_target_lowering_request;
|
||||
use epiphany_core::record_weksa_target_lowering_receipt;
|
||||
use epiphany_core::render_dynamic_persona_memory_recall_for_output;
|
||||
use epiphany_core::render_persona_memory_recall_with_cache;
|
||||
use epiphany_core::render_persona_semantic_memory_recall;
|
||||
use epiphany_core::semantic_memory_recall_from_heartbeat_action;
|
||||
|
|
@ -172,7 +173,7 @@ fn run_smoke(args: Args) -> Result<Value> {
|
|||
green(
|
||||
"persona-memory-recall",
|
||||
"Persona/Mind",
|
||||
"Qdrant-backed Persona memory cache and typed graph fallback feed Projector, Persona, and Interpreter prompts without exposing private state",
|
||||
"Qdrant-backed Persona memory cache and typed graph fallback feed Projector, Persona, and output-triggered Interpreter prompts without exposing private state",
|
||||
),
|
||||
green(
|
||||
"imagination-plan",
|
||||
|
|
@ -313,6 +314,10 @@ fn verify_fresh_repo(value: &Value) -> Result<()> {
|
|||
require_eq(value, &["familyAssertionsStatus"], "passed")?;
|
||||
require_eq(value, &["publishStatus"], "publication-receipts-recorded")?;
|
||||
require_eq(value, &["syncStatus"], "upstream-main-synced")?;
|
||||
require_non_empty(value, &["personaMemoryRecallStatus"])?;
|
||||
require_non_empty(value, &["personaMemoryRecallCacheStatus"])?;
|
||||
require_non_empty(value, &["personaInterpreterDynamicRecallStatus"])?;
|
||||
require_non_empty(value, &["personaInterpreterDynamicRecallCacheStatus"])?;
|
||||
require_bool(value, &["upstreamMainSynced"], true)?;
|
||||
require_eq(value, &["publicProofStatus"], "public-proof-exported")?;
|
||||
require_bool(value, &["privateStateExposed"], false)
|
||||
|
|
@ -646,17 +651,70 @@ fn verify_persona_memory_recall() -> Result<Value> {
|
|||
"Persona prompt",
|
||||
)?;
|
||||
|
||||
let persona_output = "I can speak, but the effect needs a receipt.";
|
||||
let dynamic = render_dynamic_persona_memory_recall_for_output(
|
||||
&memory_entry,
|
||||
"state/agents.msgpack#Persona",
|
||||
&persona_prompt,
|
||||
persona_output,
|
||||
&recall,
|
||||
4,
|
||||
Some(&EpiphanyMemoryContextPacket {
|
||||
id: "memctx-repo-swarm-mvp-gate-dynamic-fallback".to_string(),
|
||||
query_id: "repo-swarm-mvp-gate-persona-dynamic-output".to_string(),
|
||||
summaries: vec![EpiphanyMemorySummary {
|
||||
id: "summary-repo-swarm-mvp-gate-dynamic-fallback".to_string(),
|
||||
target: "role:Persona".to_string(),
|
||||
claim: "Dynamic self-memory recall should inspect the Persona output before Mind interprets side effects."
|
||||
.to_string(),
|
||||
action_implication:
|
||||
"Interpreter should see output-triggered recall, not only the pre-turn prompt recall."
|
||||
.to_string(),
|
||||
freshness: EpiphanyMemoryFreshnessStatus::Ready,
|
||||
confidence: 82,
|
||||
..Default::default()
|
||||
}],
|
||||
..Default::default()
|
||||
}),
|
||||
&PersonaMemoryCacheConfig {
|
||||
qdrant_url: "http://127.0.0.1:1".to_string(),
|
||||
qdrant_api_key: None,
|
||||
qdrant_timeout_ms: 1,
|
||||
ollama_base_url: "http://127.0.0.1:1".to_string(),
|
||||
ollama_model: "qwen3-embedding:0.6b".to_string(),
|
||||
ollama_timeout_ms: 1,
|
||||
collection_name: "epiphany_persona_memory_mvp_gate_dynamic".to_string(),
|
||||
query_instruction: "repo-swarm-mvp-gate-dynamic".to_string(),
|
||||
},
|
||||
);
|
||||
require_contains(
|
||||
&dynamic.rendered_recall,
|
||||
"Dynamic self-memory recall should inspect the Persona output",
|
||||
"dynamic Persona memory recall",
|
||||
)?;
|
||||
if dynamic.private_state_exposed || dynamic.rendered_recall.contains("sealed private note") {
|
||||
return Err(anyhow!(
|
||||
"dynamic Persona memory recall exposed private state"
|
||||
));
|
||||
}
|
||||
|
||||
let interpreter_prompt = build_persona_interpreter_prompt(&PersonaInterpreterInput {
|
||||
identity,
|
||||
persona_prompt,
|
||||
persona_output: "I can speak, but the effect needs a receipt.".to_string(),
|
||||
persona_output: persona_output.to_string(),
|
||||
semantic_memory_recall: recall,
|
||||
dynamic_semantic_memory_recall: dynamic.rendered_recall,
|
||||
pending_mentions: Vec::new(),
|
||||
allowed_channel_ids: vec!["aquarium".to_string()],
|
||||
});
|
||||
require_contains(
|
||||
&interpreter_prompt,
|
||||
"Dynamic semantic memory recall",
|
||||
"Dynamic self-memory recall",
|
||||
"Persona Interpreter prompt",
|
||||
)?;
|
||||
require_contains(
|
||||
&interpreter_prompt,
|
||||
"output-triggered recall",
|
||||
"Persona Interpreter prompt",
|
||||
)?;
|
||||
require_contains(
|
||||
|
|
@ -670,10 +728,13 @@ fn verify_persona_memory_recall() -> Result<Value> {
|
|||
"schemaVersion": "epiphany.repo_swarm_mvp_persona_memory_recall_gate.v0",
|
||||
"status": bridge.status,
|
||||
"cacheStatus": bridge.cache_status,
|
||||
"dynamicCacheStatus": dynamic.cache_status,
|
||||
"chunkCount": bridge.chunk_count,
|
||||
"hitCount": bridge.hit_count,
|
||||
"dynamicHitCount": dynamic.hit_count,
|
||||
"fallbackContainsTypedGraph": true,
|
||||
"heartbeatRecallWired": true,
|
||||
"dynamicRecallWired": true,
|
||||
"personaLayers": ["projector", "persona", "interpreter"],
|
||||
"liveQdrantRequiredForSmoke": false,
|
||||
"privateStateExposed": false,
|
||||
|
|
@ -825,6 +886,19 @@ fn require_bool(value: &Value, path: &[&str], expected: bool) -> Result<()> {
|
|||
}
|
||||
}
|
||||
|
||||
fn require_non_empty(value: &Value, path: &[&str]) -> Result<()> {
|
||||
let actual = path
|
||||
.iter()
|
||||
.try_fold(value, |current, key| current.get(*key))
|
||||
.and_then(Value::as_str)
|
||||
.unwrap_or("");
|
||||
if actual.trim().is_empty() {
|
||||
Err(anyhow!("expected {} to be non-empty", path.join(".")))
|
||||
} else {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
fn require_contains(haystack: &str, needle: &str, label: &str) -> Result<()> {
|
||||
if haystack.contains(needle) {
|
||||
Ok(())
|
||||
|
|
|
|||
|
|
@ -311,6 +311,8 @@ fn run_smoke(args: Args) -> Result<Value> {
|
|||
require_eq(&export, &["status"], "public-proof-exported")?;
|
||||
require_non_empty(&intake, &["memoryRecallStatus"])?;
|
||||
require_non_empty(&intake, &["memoryRecallCacheStatus"])?;
|
||||
require_non_empty(&intake, &["interpreterDynamicRecallStatus"])?;
|
||||
require_non_empty(&intake, &["interpreterDynamicRecallCacheStatus"])?;
|
||||
require_non_empty(&intake, &["weksaLoweringReceiptId"])?;
|
||||
require_bool(&intake, &["privateStateExposed"], false)?;
|
||||
require_bool(&overview, &["privateStateExposed"], false)?;
|
||||
|
|
@ -342,6 +344,9 @@ fn run_smoke(args: Args) -> Result<Value> {
|
|||
"personaMemoryRecallStatus": intake["memoryRecallStatus"],
|
||||
"personaMemoryRecallCacheStatus": intake["memoryRecallCacheStatus"],
|
||||
"personaMemoryRecallHitCount": intake["memoryRecallHitCount"],
|
||||
"personaInterpreterDynamicRecallStatus": intake["interpreterDynamicRecallStatus"],
|
||||
"personaInterpreterDynamicRecallCacheStatus": intake["interpreterDynamicRecallCacheStatus"],
|
||||
"personaInterpreterDynamicRecallHitCount": intake["interpreterDynamicRecallHitCount"],
|
||||
"weksaLoweringReceiptId": intake["weksaLoweringReceiptId"],
|
||||
"planStatus": plan["status"],
|
||||
"preRunOverviewGate": pre_run_overview["gate"],
|
||||
|
|
|
|||
|
|
@ -1931,6 +1931,9 @@ fn run_persona_intake(args: PersonaIntakeArgs) -> Result<Value> {
|
|||
"memoryRecallStatus": receipt["persona"]["memoryRecall"]["status"],
|
||||
"memoryRecallCacheStatus": receipt["persona"]["memoryRecall"]["cacheStatus"],
|
||||
"memoryRecallHitCount": receipt["persona"]["memoryRecall"]["hitCount"],
|
||||
"interpreterDynamicRecallStatus": receipt["persona"]["memoryRecall"]["interpreterDynamicRecall"]["status"],
|
||||
"interpreterDynamicRecallCacheStatus": receipt["persona"]["memoryRecall"]["interpreterDynamicRecall"]["cacheStatus"],
|
||||
"interpreterDynamicRecallHitCount": receipt["persona"]["memoryRecall"]["interpreterDynamicRecall"]["hitCount"],
|
||||
"weksaLoweringReceiptId": receipt["persona"]["weksa"]["receiptId"],
|
||||
"bubblePath": receipt["persona"]["bubblePath"],
|
||||
"acceptReceiptPath": accept["receiptPath"],
|
||||
|
|
@ -2006,6 +2009,20 @@ fn record_repo_persona_intake_memory_recall(
|
|||
Some(&fallback),
|
||||
&config,
|
||||
);
|
||||
let synthetic_persona_prompt = format!(
|
||||
"Repo Persona intake message:\n{}\n\nInitial semantic memory recall:\n{}",
|
||||
message, recall.rendered_recall
|
||||
);
|
||||
let dynamic_recall = epiphany_core::render_dynamic_persona_memory_recall_for_output(
|
||||
&entry,
|
||||
format!("{}#Persona", agent_store.display()),
|
||||
&synthetic_persona_prompt,
|
||||
message,
|
||||
&recall.rendered_recall,
|
||||
8,
|
||||
Some(&fallback),
|
||||
&config,
|
||||
);
|
||||
|
||||
json!({
|
||||
"schemaVersion": recall.schema_version,
|
||||
|
|
@ -2016,6 +2033,26 @@ fn record_repo_persona_intake_memory_recall(
|
|||
"chunkCount": recall.chunk_count,
|
||||
"hitCount": recall.hit_count,
|
||||
"renderedRecall": recall.rendered_recall,
|
||||
"interpreterDynamicRecall": {
|
||||
"schemaVersion": dynamic_recall.schema_version,
|
||||
"status": dynamic_recall.status,
|
||||
"cacheStatus": dynamic_recall.cache_status,
|
||||
"identityId": dynamic_recall.identity_id,
|
||||
"roleId": dynamic_recall.role_id,
|
||||
"chunkCount": dynamic_recall.chunk_count,
|
||||
"hitCount": dynamic_recall.hit_count,
|
||||
"renderedRecall": dynamic_recall.rendered_recall,
|
||||
"warnings": dynamic_recall.warnings,
|
||||
"queryBasis": "candidate-say-meaning",
|
||||
"authority": {
|
||||
"scaffoldedFromOperatorMessage": true,
|
||||
"fullAutonomousPersonaTurn": false,
|
||||
"durableStateAdmitted": false,
|
||||
"publicationAuthorized": false,
|
||||
"privateStateExposed": false
|
||||
},
|
||||
"privateStateExposed": dynamic_recall.private_state_exposed
|
||||
},
|
||||
"warnings": recall.warnings,
|
||||
"privateStateExposed": recall.private_state_exposed,
|
||||
})
|
||||
|
|
|
|||
|
|
@ -3879,10 +3879,23 @@ mod tests {
|
|||
assert_eq!(recall["roleId"], "Persona");
|
||||
assert_eq!(recall["privateStateExposed"], false);
|
||||
assert!(
|
||||
recall["renderedRecall"]
|
||||
!recall["status"].as_str().unwrap_or_default().is_empty(),
|
||||
"Persona recall should report whether it came from Qdrant or fallback"
|
||||
);
|
||||
assert!(
|
||||
!recall["cacheStatus"]
|
||||
.as_str()
|
||||
.unwrap_or_default()
|
||||
.contains("typed memory graph")
|
||||
.is_empty(),
|
||||
"Persona recall should report cache status"
|
||||
);
|
||||
assert!(
|
||||
!recall["renderedRecall"]
|
||||
.as_str()
|
||||
.unwrap_or_default()
|
||||
.trim()
|
||||
.is_empty(),
|
||||
"Persona recall should carry a rendered prompt surface"
|
||||
);
|
||||
assert!(recall["chunkCount"].as_u64().unwrap_or_default() > 0);
|
||||
assert!(
|
||||
|
|
|
|||
|
|
@ -621,6 +621,7 @@ pub use persona_memory_cache::PersonaMemoryRecallRender;
|
|||
pub use persona_memory_cache::PersonaMemorySearchHit;
|
||||
pub use persona_memory_cache::build_persona_memory_chunks;
|
||||
pub use persona_memory_cache::index_persona_memory_chunks;
|
||||
pub use persona_memory_cache::render_dynamic_persona_memory_recall_for_output;
|
||||
pub use persona_memory_cache::render_persona_memory_recall_with_cache;
|
||||
pub use persona_memory_cache::search_persona_memory_cache;
|
||||
pub use persona_turn::PERSONA_INTERPRETER_PROMPT_SCHEMA_VERSION;
|
||||
|
|
|
|||
|
|
@ -363,6 +363,53 @@ pub fn render_persona_memory_recall_with_cache(
|
|||
}
|
||||
}
|
||||
|
||||
pub fn render_dynamic_persona_memory_recall_for_output(
|
||||
entry: &EpiphanyAgentMemoryEntry,
|
||||
source_state_ref: impl Into<String>,
|
||||
persona_prompt: &str,
|
||||
persona_output: &str,
|
||||
initial_recall_seed: &str,
|
||||
limit: usize,
|
||||
fallback_context: Option<&EpiphanyMemoryContextPacket>,
|
||||
config: &PersonaMemoryCacheConfig,
|
||||
) -> PersonaMemoryRecallRender {
|
||||
let query = build_dynamic_persona_memory_recall_query(
|
||||
&entry.agent.agent_id,
|
||||
persona_prompt,
|
||||
persona_output,
|
||||
initial_recall_seed,
|
||||
);
|
||||
render_persona_memory_recall_with_cache(
|
||||
entry,
|
||||
source_state_ref,
|
||||
&query,
|
||||
limit,
|
||||
fallback_context,
|
||||
config,
|
||||
)
|
||||
}
|
||||
|
||||
pub fn build_dynamic_persona_memory_recall_query(
|
||||
identity_id: &str,
|
||||
persona_prompt: &str,
|
||||
persona_output: &str,
|
||||
initial_recall_seed: &str,
|
||||
) -> String {
|
||||
[
|
||||
format!("Current train of thought from {identity_id}:"),
|
||||
collapse_whitespace(persona_output, 6_000),
|
||||
"Original Persona turn pressure:".to_string(),
|
||||
extract_prompt_seed(persona_prompt),
|
||||
"Initial semantic memory recall seed:".to_string(),
|
||||
collapse_whitespace(initial_recall_seed, 2_000),
|
||||
]
|
||||
.into_iter()
|
||||
.map(|part| part.trim().to_string())
|
||||
.filter(|part| !part.is_empty())
|
||||
.collect::<Vec<_>>()
|
||||
.join("\n")
|
||||
}
|
||||
|
||||
fn render_persona_memory_cache_hits(hits: &[PersonaMemorySearchHit]) -> String {
|
||||
let mut lines = vec![
|
||||
"These are derived Qdrant Persona-memory cache hits from typed Persona state. They are hints, not durable authority; typed memory remains the owner.".to_string(),
|
||||
|
|
@ -380,6 +427,40 @@ fn render_persona_memory_cache_hits(hits: &[PersonaMemorySearchHit]) -> String {
|
|||
lines.join("\n")
|
||||
}
|
||||
|
||||
fn extract_prompt_seed(prompt: &str) -> String {
|
||||
let markers = [
|
||||
"Semantic memory recall:",
|
||||
"Projected inner state from Imagination:",
|
||||
"Recent home-repo activity",
|
||||
"Pending addressed pressure:",
|
||||
"Raw room transcript",
|
||||
];
|
||||
let mut sections = Vec::new();
|
||||
|
||||
for marker in markers {
|
||||
let Some(start) = prompt.find(marker) else {
|
||||
continue;
|
||||
};
|
||||
let end = markers
|
||||
.iter()
|
||||
.filter(|candidate| **candidate != marker)
|
||||
.filter_map(|candidate| {
|
||||
prompt[start + marker.len()..]
|
||||
.find(candidate)
|
||||
.map(|offset| start + marker.len() + offset)
|
||||
})
|
||||
.min()
|
||||
.unwrap_or_else(|| prompt.len().min(start + 2_400));
|
||||
sections.push(prompt[start..end.min(start + 2_400)].trim().to_string());
|
||||
}
|
||||
|
||||
if sections.is_empty() {
|
||||
collapse_whitespace(prompt, 2_400)
|
||||
} else {
|
||||
sections.join("\n\n")
|
||||
}
|
||||
}
|
||||
|
||||
fn fallback_persona_memory_recall(
|
||||
identity_id: String,
|
||||
role_id: String,
|
||||
|
|
|
|||
|
|
@ -101,6 +101,8 @@ pub struct PersonaInterpreterInput {
|
|||
#[serde(default)]
|
||||
pub semantic_memory_recall: String,
|
||||
#[serde(default)]
|
||||
pub dynamic_semantic_memory_recall: String,
|
||||
#[serde(default)]
|
||||
pub pending_mentions: Vec<HeartbeatPendingMention>,
|
||||
#[serde(default)]
|
||||
pub allowed_channel_ids: Vec<String>,
|
||||
|
|
@ -246,9 +248,12 @@ Allowed channel ids:
|
|||
Pending addressed pressure:
|
||||
{mentions}
|
||||
|
||||
Dynamic semantic memory recall:
|
||||
Initial semantic memory recall from the Persona turn:
|
||||
{semantic_recall}
|
||||
|
||||
Dynamic self-memory recall from the Persona output:
|
||||
{dynamic_semantic_recall}
|
||||
|
||||
Original Persona prompt:
|
||||
```
|
||||
{persona_prompt}
|
||||
|
|
@ -266,6 +271,14 @@ Return concise structured effect blocks. No prose outside the blocks.
|
|||
channels = render_allowed_channels(&input.allowed_channel_ids),
|
||||
mentions = render_pending_mentions(&input.pending_mentions),
|
||||
semantic_recall = render_semantic_memory_recall_text(&input.semantic_memory_recall),
|
||||
dynamic_semantic_recall = render_semantic_memory_recall_text(
|
||||
input
|
||||
.dynamic_semantic_memory_recall
|
||||
.trim()
|
||||
.is_empty()
|
||||
.then_some(input.semantic_memory_recall.as_str())
|
||||
.unwrap_or(input.dynamic_semantic_memory_recall.as_str())
|
||||
),
|
||||
persona_prompt = input.persona_prompt.trim(),
|
||||
persona_output = input.persona_output.trim(),
|
||||
)
|
||||
|
|
@ -583,6 +596,7 @@ mod tests {
|
|||
persona_prompt: persona,
|
||||
persona_output: "I want to answer, but only if I can name the cut plainly.".to_string(),
|
||||
semantic_memory_recall: String::new(),
|
||||
dynamic_semantic_memory_recall: String::new(),
|
||||
pending_mentions: vec![pending],
|
||||
allowed_channel_ids: vec!["aquarium".to_string()],
|
||||
});
|
||||
|
|
@ -642,10 +656,13 @@ mod tests {
|
|||
persona_prompt: persona,
|
||||
persona_output: "I can answer, but the answer should stay review-gated.".to_string(),
|
||||
semantic_memory_recall: recall,
|
||||
dynamic_semantic_memory_recall: "Output-triggered recall says review gates matter."
|
||||
.to_string(),
|
||||
pending_mentions: Vec::new(),
|
||||
allowed_channel_ids: vec!["aquarium".to_string()],
|
||||
});
|
||||
assert!(interpreter.contains("Dynamic semantic memory recall"));
|
||||
assert!(interpreter.contains("Dynamic self-memory recall"));
|
||||
assert!(interpreter.contains("Output-triggered recall"));
|
||||
assert!(interpreter.contains("STATE NOTE"));
|
||||
assert!(interpreter.contains("SAY"));
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue