diff --git a/internal/phraser/swap.go b/internal/phraser/swap.go index bf4d679..e98a798 100644 --- a/internal/phraser/swap.go +++ b/internal/phraser/swap.go @@ -30,7 +30,7 @@ import ( // model load. No turn ever gets half of one model and half of another. // "Every path" means every path: the router, the replier, the mail // extractor and the memory evaluator do not call acquire, they call -// llm.Client.Complete, so LLMPhraser implements llm.Gate and the client +// llm.Client.Complete, so LLMPhraser implements llm.SwapGate and the client // enters through the same counter. // // 3. A failed load rolls back to the model that was working. The new server is @@ -149,7 +149,7 @@ func (p *LLMPhraser) acquire() (string, func(), error) { }, nil } -// Enter implements llm.Gate so every holder of an *llm.Client is drained by a +// Enter implements llm.SwapGate so every holder of an *llm.Client is drained by a // swap, not only the phrasing paths in this package. // // The router, the replier, the mail extractor and the memory evaluator do not diff --git a/internal/phraser/swap_gate_test.go b/internal/phraser/swap_gate_test.go index c2deda0..8b8917a 100644 --- a/internal/phraser/swap_gate_test.go +++ b/internal/phraser/swap_gate_test.go @@ -40,7 +40,7 @@ func TestSwap_WaitsForARouterCallThatWentThroughLLMClient(t *testing.T) { release := make(chan struct{}) c := llm.New(blockingLLM(t, release).URL, 5*time.Second) - c.SetGate(p) + c.SetSwapGate(p) completed := make(chan error, 1) go func() { @@ -81,7 +81,7 @@ func TestSwap_RefusesARouterCallThatArrivesMidSwap(t *testing.T) { open := make(chan struct{}) close(open) c := llm.New(blockingLLM(t, open).URL, 5*time.Second) - c.SetGate(p) + c.SetSwapGate(p) // Hold the door shut the way quiesce does. _, held, err := p.acquire()