Unify ready pipeline jobs under one worker pool and remove the global LLM scheduler

This commit is contained in:
2026-11-22 01:45:31 +00:00
parent b47208bd57
commit 9a527b77c4
24 changed files with 496 additions and 1160 deletions

View File

@@ -8,7 +8,6 @@ import (
"testing"
"gitea.maximumdirect.net/eric/notarius/internal/framework/contracts"
"gitea.maximumdirect.net/eric/notarius/internal/framework/llm"
)
type executionDebugClient struct {
@@ -20,7 +19,7 @@ func (c executionDebugClient) CompleteStructured(context.Context, contracts.Stru
return c.response, c.err
}
func TestScheduledDebugClientPreservesExecutionThroughTerminalRecords(t *testing.T) {
func TestDebugClientPreservesExecutionThroughTerminalRecords(t *testing.T) {
providerErr := contracts.NewLLMGenerationError(503, "provider unavailable")
const content = `{"ok":true}`
for _, test := range []struct {
@@ -61,16 +60,12 @@ func TestScheduledDebugClientPreservesExecutionThroughTerminalRecords(t *testing
} else {
response.Content = json.RawMessage(test.content)
}
scheduler, err := llm.NewScheduler(1)
if err != nil {
t.Fatal(err)
}
recorder := newCapturedDebugRecorder()
client := WithDebugLLMRecording(llm.NewScheduledClient(executionDebugClient{response, test.err}, scheduler), recorder)
client := WithDebugLLMRecording(executionDebugClient{response, test.err}, recorder)
ctx, scope := withDebugLLMScope(context.Background(), "attempt")
got, err := client.CompleteStructured(ctx, contracts.StructuredCompletionRequest{StageName: "extract"}, &struct{}{})
if !errors.Is(err, test.err) || got.Execution == nil || *got.Execution != want {
t.Fatalf("scheduled debug completion = (%+v, %v), want summary and original error", got, err)
t.Fatalf("debug completion = (%+v, %v), want summary and original error", got, err)
}
terminal := newAttemptTerminalRecorder(recorder, "attempt/terminal", "extract", scope, debugTimedEnvelope{Stage: "extract"})
if err := terminal.record(nil, test.err); !errors.Is(err, test.err) {