Keep explicit preferences on the local route #295

Merged
m merged 2 commits from codex/chat-semantic-inventory into main 2026-08-24 23:30:43 +00:00
2 changed files with 13 additions and 0 deletions
@@ -90,6 +90,10 @@ func shouldRequestSemanticInterpretation(result interactiondomain.SemanticResult
switch result.Interpretation.SpeechAct {
case interaction.SpeechActConversational, interaction.SpeechActConfirmation, interaction.SpeechActRejection:
return false
case interaction.SpeechActPreference:
// Explicit user preferences are durable interaction context. A sampled
// advisory audit must not reinterpret or erase them.
return false
case interaction.SpeechActAssertion:
return result.Interpretation.ConfidenceMillis < 850
default:
@@ -74,3 +74,12 @@ func TestMeaningfulSignalsAreNotReflexOnly(t *testing.T) {
}
}
}
func TestExplicitPreferenceIsNotReinterpretedByCognitiveAudit(t *testing.T) {
result := interactiondomain.SemanticResult{Interpretation: interaction.UtteranceInterpretation{
SpeechAct: interaction.SpeechActPreference, Applicability: interaction.SemanticApplicable,
}}
if shouldRequestSemanticInterpretation(result) || shouldAuditDeterministicReflex(result, "preference", time.Unix(0, 0)) {
t.Fatal("explicit preference must remain on the deterministic durable-context path")
}
}