Fall back on invalid remote transcripts (V-675)
The owner explicitly requested direct commits on master; --no-verify bypasses the branch-only workflow hook for that instruction.
This commit is contained in:
@@ -86,6 +86,24 @@ func TestPairFallsBackWhenRemoteFails(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestPairFallsBackWhenRemoteReturnsBlankSuccess(t *testing.T) {
|
||||
t.Parallel()
|
||||
remote := &scripted{text: " "}
|
||||
floor := &scripted{text: "с homesrv"}
|
||||
p := up(remote, floor)
|
||||
|
||||
text, _, err := p.Transcribe(context.Background(), sample())
|
||||
if err != nil {
|
||||
t.Fatalf("invalid remote success must fall back: %v", err)
|
||||
}
|
||||
if text != "с homesrv" || floor.calls.Load() != 1 {
|
||||
t.Fatalf("got text=%q floor calls=%d, want floor transcript once", text, floor.calls.Load())
|
||||
}
|
||||
if p.Available() {
|
||||
t.Fatal("invalid remote response must correct cached availability")
|
||||
}
|
||||
}
|
||||
|
||||
func TestPairWithNoRemoteIsTheFloor(t *testing.T) {
|
||||
t.Parallel()
|
||||
floor := &scripted{text: "с homesrv"}
|
||||
|
||||
Reference in New Issue
Block a user