Make Pipelines Docker-only with OpenCode and Pi
Install current verified harness releases inside Docker, preserve persistent accounts and settings, and provide separate interactive and pipeline model defaults with terminal onboarding and fuzzy pickers. Add Docker-aware authoring transport, Pi stage execution, bounded workflow controls, reliable final-result readback and usage settlement, and finite short-lived CLI pipe draining. Keep dated installation evidence and packaged authoring guidance consistent. Verified with a real Docker installation, both harness stages and interactive authors, the built-in plan/implement/review starter, independent host race/vet checks, installer tests, and packaged skill tests. Generated release receipts stay ignored in clean checkouts.
This commit is contained in:
@@ -31,6 +31,11 @@ func setup(t *testing.T) (func(...string) (string, error), *pipeline.Store, stri
|
||||
t.Cleanup(func() { cancel(); http.Close(); server.WaitRuns(handler); store.Close() })
|
||||
url := "ws" + strings.TrimPrefix(http.URL, "http") + "/connect"
|
||||
t.Setenv("PIPELINES_DRAFT_DIR", t.TempDir())
|
||||
// Isolate harness configuration: a developer's real Docker-linked profile must
|
||||
// not route debug/author commands through a different service or compare its
|
||||
// loopback port against this test's ephemeral server. A missing native fixture
|
||||
// keeps the host executable authoritative, matching unconfigured setups.
|
||||
t.Setenv("PIPELINES_HARNESS_CONFIG", filepath.Join(t.TempDir(), "harnesses.json"))
|
||||
return func(args ...string) (string, error) {
|
||||
if len(args) > 0 && (args[0] == "submit" || args[0] == "new" || args[0] == "edit") {
|
||||
args = append(args, "--yes")
|
||||
@@ -187,6 +192,12 @@ func TestCLIAuthorOpenCodeReferencesGlobalSkillAndLeavesDraft(t *testing.T) {
|
||||
capture := filepath.Join(root, "invocation")
|
||||
script := filepath.Join(root, "opencode")
|
||||
os.WriteFile(script, []byte("#!/bin/sh\nif [ \"$1\" = --help ]; then printf '%s\\n' ' api commands'; exit 0; fi\nif [ \"$1\" = api ]; then\n if [ \"$3\" = /api/session ]; then printf '%s' '{\"data\":{\"id\":\"ses_test\"}}'; fi\n exit 0\nfi\nprintf '%s\\n' \"$@\" > "+"'"+capture+"'"+"\n"), 0700)
|
||||
configPath := filepath.Join(root, "harnesses.json")
|
||||
t.Setenv("PIPELINES_HARNESS_CONFIG", configPath)
|
||||
configData, _ := json.Marshal(map[string]any{"default": "opencode", "profiles": map[string]any{"opencode": map[string]string{"executable": script, "model": "fixture/model", "pipeline_model": "fixture/model"}}})
|
||||
if err := os.WriteFile(configPath, configData, 0600); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if _, err := run("new", "scoped skill", "Make a digest", "--opencode", script); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -194,8 +205,7 @@ func TestCLIAuthorOpenCodeReferencesGlobalSkillAndLeavesDraft(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
parts := strings.SplitN(string(data), "\n", 3)
|
||||
if parts[1] != "--prompt" || !strings.HasPrefix(parts[2], "@pipelines") || !strings.Contains(parts[2], "Make a digest") {
|
||||
if !strings.HasPrefix(string(data), "mini\n--model\nfixture/model\n--prompt\n@pipelines") || !strings.Contains(string(data), "Make a digest") {
|
||||
t.Fatal(string(data))
|
||||
}
|
||||
skillDir, err := author.SkillDirectory()
|
||||
|
||||
Reference in New Issue
Block a user