Add internal/logging.Feed, a logging-owned bounded replay buffer separate from the persisted task-lifecycle event stream, with a live SSE endpoint. Expose the executable workflow registry (skillbuild.Catalog) including zero-run definitions and their origin (builtin vs. installed skill), not just historical run statistics. Route() now returns an explicit failure workflow for an unknown pre-assigned workflow name instead of silently falling through to label-based routing. Fixes #54
16 lines
416 B
Go
16 lines
416 B
Go
package workflow
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/samcharles93/archie-core/internal/store"
|
|
)
|
|
|
|
func TestRouteDoesNotSilentlyReplaceAnAdmittedWorkflow(t *testing.T) {
|
|
task := &store.Task{Workflow: "skill-review"}
|
|
wf := Route(task, Registry{"implement": Implement()})
|
|
if wf.Name != "none" || len(wf.Stages) != 1 || wf.Stages[0].Name != "fail" {
|
|
t.Fatalf("Route() = %#v, want explicit failure workflow", wf)
|
|
}
|
|
}
|