@@ -198,6 +198,70 @@ describe("interpretTurn", () => {
198198 } ) ;
199199 } ) ;
200200
201+ it ( "clears a satisfied time clarification slot when the answer provides a clock time" , async ( ) => {
202+ const result = await interpretTurn ( {
203+ rawText : "5pm" ,
204+ normalizedText : "5pm" ,
205+ recentTurns : [ ] ,
206+ discourseState : {
207+ focus_entity_id : null ,
208+ currently_editable_entity_id : null ,
209+ last_user_mentioned_entity_ids : [ ] ,
210+ last_presented_items : [ ] ,
211+ pending_clarifications : [
212+ {
213+ id : "clar-1" ,
214+ slot : "time" ,
215+ question : "What time should I schedule it?" ,
216+ status : "pending" ,
217+ blocking : true ,
218+ createdAt : "2026-03-20T16:00:00.000Z" ,
219+ createdTurnId : "assistant:1"
220+ }
221+ ] ,
222+ mode : "clarifying"
223+ }
224+ } ) ;
225+
226+ expect ( result ) . toMatchObject ( {
227+ turnType : "clarification_answer" ,
228+ ambiguity : "none"
229+ } ) ;
230+ expect ( result . missingSlots ) . toBeUndefined ( ) ;
231+ } ) ;
232+
233+ it ( "treats punctuated consent as confirmation when one active proposal exists" , async ( ) => {
234+ const result = await interpretTurn ( {
235+ rawText : "Ok," ,
236+ normalizedText : "Ok," ,
237+ recentTurns : [ ] ,
238+ entityRegistry : [
239+ {
240+ id : "proposal-1" ,
241+ conversationId : "conversation-1" ,
242+ kind : "proposal_option" ,
243+ label : "Schedule it at 5pm" ,
244+ status : "active" ,
245+ createdAt : "2026-03-20T16:00:00.000Z" ,
246+ updatedAt : "2026-03-20T16:00:00.000Z" ,
247+ data : {
248+ route : "conversation_then_mutation" ,
249+ replyText : "Would you like me to schedule it at 5pm?" ,
250+ confirmationRequired : true ,
251+ targetEntityId : null ,
252+ mutationInputSource : null
253+ }
254+ }
255+ ]
256+ } ) ;
257+
258+ expect ( result ) . toMatchObject ( {
259+ turnType : "confirmation" ,
260+ resolvedProposalId : "proposal-1" ,
261+ ambiguity : "none"
262+ } ) ;
263+ } ) ;
264+
201265 it ( "treats informational questions as informational" , async ( ) => {
202266 const result = await interpretTurn ( {
203267 rawText : "What do I have tomorrow?" ,
0 commit comments