feat(tasks): add inherited context and resilient LLM execution
Add read-only task context inheritance, ordered task-level LLM failover, live Worker controls, cascading task cleanup, FIFO task concurrency, cancellation diagnostics, UI updates, tests, build script, and changelog.
This commit is contained in:
1 parent
7090b034f8
commit
9793b522d9
82 files changed
+11094
-1712
No files matched your search
@@ -0,0 +1,20 @@
|
||||
package db
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestCreateTaskRejectsTooManySourcesBeforeOpeningTransaction(t *testing.T) {
|
||||
sourceIDs := make([]int64, MaxTaskSourceCount+1)
|
||||
for i := range sourceIDs {
|
||||
sourceIDs[i] = int64(i + 1)
|
||||
}
|
||||
|
||||
// No database handle is needed: validation must run before Begin so an
|
||||
// oversized request cannot consume a connection or create partial rows.
|
||||
_, err := (&DB{}).CreateTaskWithOptions("child", "goal", TaskCreateOptions{SourceTaskIDs: sourceIDs})
|
||||
if err == nil || !strings.Contains(err.Error(), "too many source tasks") {
|
||||
t.Fatalf("expected source-count validation error, got %v", err)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user