chore(simulation): address review suggestions — comments and minor fixes

- monologue.rs: tracing::warn on unrecognized trigger in fallback arm
- disclosure.rs: borrow-sequencing comment, first() simplification note
- trait_modifiers.rs: delegate parse_confidence to KnowledgeConfidence::try_from
- npc_knowledge_transfer.rs: fix misleading "draw randomly" comment,
  document one-directional transfer behavior
- graph.rs: document intentional no-retrigger after contradiction
- dialogue.rs: explain entity grant guardrail asymmetry (D-079)
- knowledge/mod.rs: document one-tick monologue lag from system ordering
- poi_discovery.rs: document D-079 carve-out for direct KG write

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-24 12:45:47 +01:00
co-authored by Claude Opus 4.6
parent c655878dee
commit 132676c25a
8 changed files with 42 additions and 12 deletions
+5 -10
View File
@@ -189,17 +189,12 @@ impl TraitModifierConfig {
// ---------------------------------------------------------------------------
/// Parse a confidence string from YAML config to enum value.
/// Delegates to `KnowledgeConfidence::try_from` (which accepts both
/// camelCase and underscore forms) rather than duplicating the match.
fn parse_confidence(s: &str) -> Option<KnowledgeConfidence> {
match s {
"suspects" => Some(KnowledgeConfidence::Suspects),
"knows_of" => Some(KnowledgeConfidence::KnowsOf),
"knows_details" => Some(KnowledgeConfidence::KnowsDetails),
"direct" => Some(KnowledgeConfidence::Direct),
_ => {
tracing::warn!("Unknown confidence level in trait config: {:?}", s);
None
}
}
KnowledgeConfidence::try_from(s).map_err(|e| {
tracing::warn!("Unknown confidence level in trait config: {}", e);
}).ok()
}
/// Convert a `PersonalityTrait` to its lowercase YAML key.