Replace starters with four graded examples seeded into new databases
The template catalog is now Example 1-4: one stage, two stages (handoff), feedback loop (runner-owned limits, retries, timeout) and human decision (type=human approve/revise/abort with notify hooks). All read-only or leave changes uncommitted; none commits, pushes or deploys. A brand-new database (schema created by this Open) gets the examples once at server start, bound to the configured default model and harness. A server_settings marker records the decision, so removed examples never come back and existing installs are marked without any pipeline being added or rewritten.
This commit is contained in:
@@ -11,7 +11,7 @@ import (
|
||||
)
|
||||
|
||||
func TestShowcaseGraphsRender(t *testing.T) {
|
||||
for _, name := range []string{"task", "review", "research", "three-stage"} {
|
||||
for _, name := range []string{"one-stage", "two-stages", "feedback-loop", "human-decision"} {
|
||||
t.Run(name, func(t *testing.T) {
|
||||
source, err := os.ReadFile(filepath.Join("..", "..", "examples", name+".md"))
|
||||
if err != nil {
|
||||
|
||||
@@ -38,7 +38,7 @@ func TestTemplateSubmitNamesRetainsAndExplicitlyPublishesSelectedTemplate(t *tes
|
||||
m.templateOpen, m.keys.templates = true, true
|
||||
m.defaultModel = "fixture/model"
|
||||
for i, item := range m.templates {
|
||||
if item.Key == "review" {
|
||||
if item.Key == "one-stage" {
|
||||
m.templateIndex = i
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ func TestUIUXReviewSnapshots(t *testing.T) {
|
||||
if err := os.MkdirAll(directory, 0700); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
source, err := os.ReadFile("../../examples/three-stage.md")
|
||||
source, err := os.ReadFile("../../examples/human-decision.md")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -36,7 +36,7 @@ func TestUIUXReviewSnapshots(t *testing.T) {
|
||||
m.loaded = true
|
||||
m.status = "127.0.0.1:8080"
|
||||
m.notificationEndpoints = []protocol.NotificationEndpoint{{Destination: "system", ServerURL: "http://100.85.25.33:8090", Topic: "pipelines"}}
|
||||
m.pipelines = []protocol.PipelineSummary{{ID: 8, Name: "Plan, implement, review", Version: 1, Stages: 3, CreatedAt: "2026-10-08T20:00:00Z", UpdatedAt: "2026-10-08T20:00:00Z"}}
|
||||
m.pipelines = []protocol.PipelineSummary{{ID: 8, Name: "Example 4: human decision", Version: 1, Stages: 3, CreatedAt: "2026-10-08T20:00:00Z", UpdatedAt: "2026-10-08T20:00:00Z"}}
|
||||
save := func(name string) {
|
||||
t.Helper()
|
||||
view := ansi.Strip(m.View())
|
||||
@@ -66,7 +66,7 @@ func TestUIUXReviewSnapshots(t *testing.T) {
|
||||
save("review-stage")
|
||||
m.runOpen = true
|
||||
m.keys.runs = true
|
||||
m.runDetail = &protocol.RunDetail{RunSummary: protocol.RunSummary{ID: 1, Name: "Plan, implement, review", PipelineID: 8, Version: 1, Status: "succeeded", CreatedAt: "2026-10-08T20:00:00Z", FinishedAt: "2026-10-08T20:01:00Z"}, Graph: graph, Steps: []protocol.RunStep{{Sequence: 1, Stage: "planner", Status: "completed", Outcome: "success", Target: "implementer"}, {Sequence: 2, Stage: "implementer", Status: "completed", Outcome: "success", Target: "reviewer"}, {Sequence: 3, Stage: "reviewer", Status: "completed", Outcome: "success", Target: protocol.SuccessEnd, Output: map[string]any{"summary": "Fixture review report", "findings": "Fixture findings"}}}}
|
||||
m.runDetail = &protocol.RunDetail{RunSummary: protocol.RunSummary{ID: 1, Name: "Example 4: human decision", PipelineID: 8, Version: 1, Status: "succeeded", CreatedAt: "2026-10-08T20:00:00Z", FinishedAt: "2026-10-08T20:01:00Z"}, Graph: graph, Steps: []protocol.RunStep{{Sequence: 1, Stage: "plan", Status: "completed", Outcome: "success", Target: "decide"}, {Sequence: 2, Stage: "decide", Status: "completed", Outcome: "approve", Target: "act"}, {Sequence: 3, Stage: "act", Status: "completed", Outcome: "success", Target: protocol.SuccessEnd, Output: map[string]any{"summary": "Fixture review report", "findings": "Fixture findings"}}}}
|
||||
m.runStepIndex = 3
|
||||
save("run")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user