feat: upload audio, get a private Swedish transcript, discuss it (#33, ADR-033) #39

Merged
mathias merged 299 commits from feat/33-audio-upload-transcript into main 2026-10-03 14:13:37 +00:00
Showing only changes of commit a1e16fa658 - Show all commits
+10 -10
View File
@@ -123,10 +123,10 @@ func TestReconcile_SeveralDisputesAreAppliedIndependentlyAndInOrder(t *testing.T
return reconcile.VerdictBase, nil
}}
out := merge(t, tr("kunderna onboardade nu och sen betalas till SEB med 1050 kronor"),
tr("kunderna omvårdade nu och sen betalas till SCB med 2050 kronor"), adj)
out := merge(t, tr("kunderna onboardade nu och sen betalas till SEB via ombud med 1050 kronor"),
tr("kunderna omvårdade nu och sen betalas till SCB via ombud med 2050 kronor"), adj)
assert.Equal(t, "kunderna omvårdade nu och sen betalas till SCB med 1050 kronor", out.Text)
assert.Equal(t, "kunderna omvårdade nu och sen betalas till SCB via ombud med 1050 kronor", out.Text)
assert.Equal(t, 3, out.Reconciliation.Disputes)
assert.Equal(t, 2, out.Reconciliation.Changed)
}
@@ -134,7 +134,7 @@ func TestReconcile_SeveralDisputesAreAppliedIndependentlyAndInOrder(t *testing.T
func TestReconcile_TheReadingOrderAlternatesFromOneDisputeToTheNext(t *testing.T) {
adj := always(reconcile.VerdictBase)
merge(t, tr("a x b y c z d"), tr("a p b q c r d"), adj)
merge(t, tr("a x s1 s2 y t1 t2 z d"), tr("a p s1 s2 q t1 t2 r d"), adj)
require.Len(t, adj.calls, 3)
assert.False(t, adj.calls[0].AltFirst)
@@ -166,9 +166,9 @@ func TestReconcile_OneModelErrorLeavesThatSpotUnsureAndCarriesOn(t *testing.T) {
return reconcile.VerdictAlt, nil
}}
out := merge(t, tr("a x b y c"), tr("a p b q c"), adj)
out := merge(t, tr("a x s1 s2 y c"), tr("a p s1 s2 q c"), adj)
assert.Equal(t, "a x b q c", out.Text, "the first spot stayed as the base, the second was decided")
assert.Equal(t, "a x s1 s2 q c", out.Text, "the first spot stayed as the base, the second was decided")
assert.Equal(t, 1, out.Reconciliation.Errors)
assert.Equal(t, 1, out.Reconciliation.Unsure)
assert.Equal(t, domain.ReconcileDone, out.Reconciliation.Status)
@@ -179,8 +179,8 @@ func TestReconcile_ConsecutiveModelErrorsStopTheWholeReconciliationInsteadOfWait
adj := &scripted{fn: func(int, reconcile.Request) (reconcile.Verdict, error) { return reconcile.VerdictUnsure, boom }}
a, b := make([]string, 0, 20), make([]string, 0, 20)
for i := 0; i < 10; i++ {
a = append(a, fmt.Sprintf("w%d", i), "same")
b = append(b, fmt.Sprintf("v%d", i), "same")
a = append(a, fmt.Sprintf("w%d", i), "s", "t")
b = append(b, fmt.Sprintf("v%d", i), "s", "t")
}
out := merge(t, tr(strings.Join(a, " ")), tr(strings.Join(b, " ")), adj)
@@ -201,8 +201,8 @@ func TestReconcile_ASuccessBetweenFailuresResetsTheBreaker(t *testing.T) {
}}
a, b := make([]string, 0, 20), make([]string, 0, 20)
for i := 0; i < 9; i++ {
a = append(a, fmt.Sprintf("w%d", i), "same")
b = append(b, fmt.Sprintf("v%d", i), "same")
a = append(a, fmt.Sprintf("w%d", i), "s", "t")
b = append(b, fmt.Sprintf("v%d", i), "s", "t")
}
out := merge(t, tr(strings.Join(a, " ")), tr(strings.Join(b, " ")), adj)