fix: pin native exports to stage execution service

This commit is contained in:
2026-10-20 21:46:42 +01:00
parent 1f867d4827
commit bb98bde4fc
20 changed files with 420 additions and 74 deletions
+1 -8
View File
@@ -13,7 +13,6 @@ import (
"testing"
"time"
"git.a-wan.net/alan/pipelines/internal/opencode"
"git.a-wan.net/alan/pipelines/internal/pipeline"
"git.a-wan.net/alan/pipelines/internal/stage"
)
@@ -78,7 +77,6 @@ func TestAutomaticSessionExportRecoveryTransientThenComplete(t *testing.T) {
func TestAutomaticSessionExportRecoveryWrongSessionExhaustsNeverClean(t *testing.T) {
h, s, id := recoveryRunner(t)
ctx := context.Background()
dir := t.TempDir()
var calls atomic.Int32
srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
user, password, ok := r.BasicAuth()
@@ -95,12 +93,7 @@ func TestAutomaticSessionExportRecoveryWrongSessionExhaustsNeverClean(t *testing
w.Write([]byte(`{"info":{"id":"ses_wrong"},"messages":[{"info":{"role":"assistant"},"parts":[{"type":"text","text":"wrong"}]}]}`))
}))
t.Cleanup(srv.Close)
passwordFile := filepath.Join(dir, "password")
if err := os.WriteFile(passwordFile, []byte("fixture-password"), 0600); err != nil {
t.Fatal(err)
}
t.Setenv(opencode.EndpointEnvKey, srv.URL)
t.Setenv(opencode.EndpointPasswordFileEnvKey, passwordFile)
localExportService(t, srv.URL)
h.runner.exportSession = stage.ExportSession
for range 3 {
job, _ := s.SessionExportJob(ctx, id, 1)