chore(fixtures): invented text in place of words that may come from the private recording; the research note no longer names the private file (adversarial review F10)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -32,7 +32,7 @@ func (f *fakeCompleter) Complete(_ context.Context, system, user string) (string
|
|||||||
return f.replies[i], nil
|
return f.replies[i], nil
|
||||||
}
|
}
|
||||||
|
|
||||||
var req = reconcile.Request{Before: "kunderna ska då", After: "De ska kunna betala", Base: "onboardade", Alt: "omvårdade"}
|
var req = reconcile.Request{Before: "grannarna ska då", After: "De ska kunna måla", Base: "målade", Alt: "mölade"}
|
||||||
|
|
||||||
func TestLLMAdjudicator_SendsTheMeasuredPromptWithTheReadingsInTheRequestedOrder(t *testing.T) {
|
func TestLLMAdjudicator_SendsTheMeasuredPromptWithTheReadingsInTheRequestedOrder(t *testing.T) {
|
||||||
fc := &fakeCompleter{replies: []string{"ANSWER: 1"}}
|
fc := &fakeCompleter{replies: []string{"ANSWER: 1"}}
|
||||||
@@ -45,10 +45,10 @@ func TestLLMAdjudicator_SendsTheMeasuredPromptWithTheReadingsInTheRequestedOrder
|
|||||||
assert.Contains(t, fc.systems[0], "two automatic transcriptions of the same Swedish speech")
|
assert.Contains(t, fc.systems[0], "two automatic transcriptions of the same Swedish speech")
|
||||||
assert.Contains(t, fc.systems[0], "ANSWER: 1")
|
assert.Contains(t, fc.systems[0], "ANSWER: 1")
|
||||||
u := fc.users[0]
|
u := fc.users[0]
|
||||||
assert.Contains(t, u, "Text before the spot:\nkunderna ska då")
|
assert.Contains(t, u, "Text before the spot:\ngrannarna ska då")
|
||||||
assert.Contains(t, u, "[[ THE SPOT ]]")
|
assert.Contains(t, u, "[[ THE SPOT ]]")
|
||||||
assert.Contains(t, u, "Text after the spot:\nDe ska kunna betala")
|
assert.Contains(t, u, "Text after the spot:\nDe ska kunna måla")
|
||||||
assert.Contains(t, u, "Reading 1: onboardade\nReading 2: omvårdade", "base first when AltFirst is false")
|
assert.Contains(t, u, "Reading 1: målade\nReading 2: mölade", "base first when AltFirst is false")
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestLLMAdjudicator_AltFirstSwapsWhichReadingIsNumberOne(t *testing.T) {
|
func TestLLMAdjudicator_AltFirstSwapsWhichReadingIsNumberOne(t *testing.T) {
|
||||||
@@ -59,7 +59,7 @@ func TestLLMAdjudicator_AltFirstSwapsWhichReadingIsNumberOne(t *testing.T) {
|
|||||||
_, err := reconcile.NewLLMAdjudicator(fc).Adjudicate(context.Background(), r)
|
_, err := reconcile.NewLLMAdjudicator(fc).Adjudicate(context.Background(), r)
|
||||||
|
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
assert.Contains(t, fc.users[0], "Reading 1: omvårdade\nReading 2: onboardade")
|
assert.Contains(t, fc.users[0], "Reading 1: mölade\nReading 2: målade")
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestLLMAdjudicator_MapsTheAnswerBackToBaseOrAltWhicheverOrderWasShown(t *testing.T) {
|
func TestLLMAdjudicator_MapsTheAnswerBackToBaseOrAltWhicheverOrderWasShown(t *testing.T) {
|
||||||
@@ -134,8 +134,8 @@ func TestOrderChecked_AsksTwiceWithTheOrderSwappedAndKeepsOnlyAgreement(t *testi
|
|||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
assert.Equal(t, tt.want, got)
|
assert.Equal(t, tt.want, got)
|
||||||
require.Len(t, fc.users, 2)
|
require.Len(t, fc.users, 2)
|
||||||
assert.True(t, strings.Contains(fc.users[0], "Reading 1: onboardade"), "first call shows the base first")
|
assert.True(t, strings.Contains(fc.users[0], "Reading 1: målade"), "first call shows the base first")
|
||||||
assert.True(t, strings.Contains(fc.users[1], "Reading 1: omvårdade"), "second call shows the alternative first")
|
assert.True(t, strings.Contains(fc.users[1], "Reading 1: mölade"), "second call shows the alternative first")
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user