Retain OpenCode sessions and verify fresh retry isolation

This commit is contained in:
2026-10-09 21:16:28 +01:00
parent dc9b7b1c02
commit f60599230c
10 changed files with 142 additions and 36 deletions
+5
View File
@@ -310,6 +310,11 @@ func (r *runner) run(ctx context.Context, id int64, d *protocol.PipelineDetail,
result, err = (stage.ModelStage{Client: client}).Run(ctx, def, input)
} else if stage.EffectiveType(def.Type) == stage.ModelType {
plain := &stage.OpenCodeClient{Directory: workspace}
plain.OnGenerationSession = func(session, backend, reference string, active bool) error {
c, cancel := context.WithTimeout(context.Background(), 10*time.Second)
defer cancel()
return r.store.RunSession(c, id, sequence, session, active, backend, reference)
}
result, err = (stage.ModelStage{Client: plain}).Run(ctx, def, input)
client.Transcript = plain.FormatAudit
} else {