Commit 3dd9557
feat(voice): ask before leaving work behind, and stop cutting off the sign-off
Three things the device found, all in the same corner of teardown.
**A machine switch discarded outstanding work, silently.**
`applyMachineSwitch` builds a fresh VoiceSession, so the FSM goes with the
old one: the queue, the in-flight turn and any pending approval. A task
Sai had promised out loud disappeared with nothing said — the hazard
VOICE_FSM §7 records for a dropped call, reachable by an ordinary voice
command. `close()` only discards the stream, so the work kept running on
the machine being left and its result reached nobody.
So the switch now asks first, and so does the hang-up, through one shared
LeavingWorkPolicy — they lose the same work in the same way, and the ask
should not read differently depending on which one you said. It names
what is outstanding, says it keeps running where it started, and points
at the Sai app for the result. It never stops anything: aborting work
nobody asked to cancel would be its own failure.
One-shot, like applyInterrupt's scope question — someone who says "switch
to my laptop" twice means it. Running and queued are named separately,
the same rule interruptScopeQuestion follows, because reading them as one
list describes a queued task as underway. From the picker there is no
question to ask, so it switches and then says what was left behind.
**The idle sign-off was cut mid-sentence.** Teardown waited a flat 1.8s;
"It's been quiet for a bit, so I'll hang up to save battery. Tap to start
again." runs about four. It now waits for the line to start, for the play
queue to drain, and for a short tail — capped at 12s, because a teardown
that hangs on a sign-off that never came leaves the mic open and has not
actually ended anything.
Both endCall-with-reason paths get it; the goodbye window is left alone
on purpose, since its 1.8s doubles as the barge-in cancel window that
check 10d is written against.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent 961b8f1 commit 3dd9557
5 files changed
Lines changed: 353 additions & 2 deletions
File tree
- docs
- meta-android-app/app/src
- main/java/com/meta/wearable/dat/externalsampleapps/cameraaccess/saispike
- test/java/com/meta/wearable/dat/externalsampleapps/cameraaccess/saispike
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
273 | 273 | | |
274 | 274 | | |
275 | 275 | | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
276 | 284 | | |
277 | 285 | | |
278 | 286 | | |
| |||
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
281 | 281 | | |
282 | 282 | | |
283 | 283 | | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
284 | 299 | | |
285 | 300 | | |
286 | 301 | | |
| |||
Lines changed: 105 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
120 | 129 | | |
121 | 130 | | |
122 | 131 | | |
| |||
234 | 243 | | |
235 | 244 | | |
236 | 245 | | |
| 246 | + | |
237 | 247 | | |
238 | 248 | | |
239 | 249 | | |
| |||
750 | 760 | | |
751 | 761 | | |
752 | 762 | | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
753 | 774 | | |
754 | 775 | | |
755 | 776 | | |
| |||
847 | 868 | | |
848 | 869 | | |
849 | 870 | | |
850 | | - | |
| 871 | + | |
851 | 872 | | |
852 | 873 | | |
853 | 874 | | |
| |||
1001 | 1022 | | |
1002 | 1023 | | |
1003 | 1024 | | |
1004 | | - | |
| 1025 | + | |
1005 | 1026 | | |
1006 | 1027 | | |
1007 | 1028 | | |
| |||
1016 | 1037 | | |
1017 | 1038 | | |
1018 | 1039 | | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
1019 | 1050 | | |
1020 | 1051 | | |
1021 | 1052 | | |
| |||
1034 | 1065 | | |
1035 | 1066 | | |
1036 | 1067 | | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
1037 | 1072 | | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
1038 | 1078 | | |
1039 | 1079 | | |
1040 | 1080 | | |
| |||
1152 | 1192 | | |
1153 | 1193 | | |
1154 | 1194 | | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
| 1213 | + | |
| 1214 | + | |
| 1215 | + | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
| 1220 | + | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
| 1226 | + | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
| 1236 | + | |
| 1237 | + | |
| 1238 | + | |
| 1239 | + | |
| 1240 | + | |
| 1241 | + | |
| 1242 | + | |
| 1243 | + | |
| 1244 | + | |
| 1245 | + | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
1155 | 1250 | | |
1156 | 1251 | | |
1157 | 1252 | | |
| |||
1547 | 1642 | | |
1548 | 1643 | | |
1549 | 1644 | | |
| 1645 | + | |
| 1646 | + | |
| 1647 | + | |
| 1648 | + | |
| 1649 | + | |
| 1650 | + | |
| 1651 | + | |
| 1652 | + | |
1550 | 1653 | | |
1551 | 1654 | | |
1552 | 1655 | | |
| |||
Lines changed: 111 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
0 commit comments