05ae530442
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.
31 lines
1.1 KiB
Go
31 lines
1.1 KiB
Go
package tui
|
|
|
|
import (
|
|
"context"
|
|
"git.a-wan.net/alan/pipelines/internal/harness"
|
|
"path/filepath"
|
|
"testing"
|
|
)
|
|
|
|
func configureTestHarness(t *testing.T) {
|
|
t.Helper()
|
|
t.Setenv("PIPELINES_HARNESS_CONFIG", filepath.Join(t.TempDir(), "harnesses.json"))
|
|
if err := harness.Save(harness.Config{Default: "opencode", Profiles: map[string]harness.Profile{"opencode": {Executable: "opencode", Model: "fixture/model", PipelineModel: "fixture/model"}}}); err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
}
|
|
|
|
func TestOnlyConfiguredHarnessesAreOffered(t *testing.T) {
|
|
t.Setenv("PIPELINES_HARNESS_CONFIG", filepath.Join(t.TempDir(), "harnesses.json"))
|
|
m := New(context.Background(), "")
|
|
if choices := m.editorChoices(); len(choices) != 1 || choices[0] != "nvim" {
|
|
t.Fatal(choices)
|
|
}
|
|
if err := harness.Save(harness.Config{Default: "pi", Profiles: map[string]harness.Profile{"pi": {Executable: "pi", Model: "fixture/model", PipelineModel: "fixture/model"}}}); err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
if choices := m.editorChoices(); len(choices) != 2 || choices[0] != "Pi" || choices[1] != "nvim" {
|
|
t.Fatal(choices)
|
|
}
|
|
}
|