Keep explicit preferences on the local route #295
@@ -90,6 +90,10 @@ func shouldRequestSemanticInterpretation(result interactiondomain.SemanticResult
|
|||||||
switch result.Interpretation.SpeechAct {
|
switch result.Interpretation.SpeechAct {
|
||||||
case interaction.SpeechActConversational, interaction.SpeechActConfirmation, interaction.SpeechActRejection:
|
case interaction.SpeechActConversational, interaction.SpeechActConfirmation, interaction.SpeechActRejection:
|
||||||
return false
|
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:
|
case interaction.SpeechActAssertion:
|
||||||
return result.Interpretation.ConfidenceMillis < 850
|
return result.Interpretation.ConfidenceMillis < 850
|
||||||
default:
|
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")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user