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:
2026-10-11 23:00:25 +01:00
parent c42a19f7d3
commit 05ae530442
131 changed files with 9297 additions and 355 deletions
+33 -1
View File
@@ -5,6 +5,7 @@ import (
"context"
"encoding/json"
"fmt"
"git.a-wan.net/alan/pipelines/internal/buildinfo"
"git.a-wan.net/alan/pipelines/internal/cli"
"git.a-wan.net/alan/pipelines/internal/pipeline"
"git.a-wan.net/alan/pipelines/internal/protocol"
@@ -17,7 +18,38 @@ import (
"testing"
)
func TestCLIPingReportsServerBuild(t *testing.T) {
// Keep the host executable authoritative for CLI integration: a developer's
// real Docker-linked harness profile must never influence an ephemeral test
// endpoint. A missing native fixture matches an unconfigured setup.
t.Setenv("PIPELINES_HARNESS_CONFIG", filepath.Join(t.TempDir(), "harnesses.json"))
srv := httptest.NewServer(Handler(context.Background()))
defer srv.Close()
endpoint := "ws" + strings.TrimPrefix(srv.URL, "http") + "/connect"
for _, jsonMode := range []bool{false, true} {
var out bytes.Buffer
app := cli.App{Out: &out, Err: &out, In: strings.NewReader("")}
args := []string{"--url", endpoint, "ping"}
if jsonMode {
args = append(args, "--json")
}
if err := app.Run(context.Background(), args); err != nil {
t.Fatal(err)
}
build := buildinfo.Current()
if !strings.Contains(out.String(), build.Version) || !strings.Contains(out.String(), build.Commit) {
t.Fatal("ping omitted server version", out.String())
}
}
}
func TestCLIHeadlessRunInspectionCancellationAndRPC(t *testing.T) {
// Isolate harness configuration: this test's debug query builds a CLI prefix
// locally, so a developer's real Docker-linked profile would fail closed
// against this ephemeral httptest endpoint ("refusing to redirect"). A
// missing native fixture keeps the host executable authoritative, matching
// the isolation already used by internal/cli's setup.
t.Setenv("PIPELINES_HARNESS_CONFIG", filepath.Join(t.TempDir(), "harnesses.json"))
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
store, err := pipeline.Open(filepath.Join(t.TempDir(), "cli-runs.db"))
@@ -85,7 +117,7 @@ func TestCLIHeadlessRunInspectionCancellationAndRPC(t *testing.T) {
if _, err = run("runs", "--pipeline", "workflow", "--json"); err != nil {
t.Fatal(err)
}
if _, err = run("run", "workflow", "exact task", "--yes", "--json", "--request-key", "same-key", "--wait", "--timeout", "100ms"); err == nil || !strings.Contains(err.Error(), "remains active") {
if _, err = run("run", "workflow", "exact task", "--yes", "--json", "--request-key", "same-key", "--wait", "--wait-timeout", "100ms"); err == nil || !strings.Contains(err.Error(), "remains active") {
t.Fatal("wait timeout canceled or incorrectly succeeded", err)
}
if _, err = run("cancel", "1", "--yes", "--json"); err != nil {