fix(agentexec): recover omitted finish calls
This commit is contained in:
1 parent
c2b4df6b21
commit
aaa9e85dd4
4 files changed
+7
-1
No files matched your search
@@ -72,7 +72,7 @@ require (
|
||||
github.com/moby/moby/client v0.5.1
|
||||
github.com/nats-io/nats-server/v2 v2.14.4
|
||||
github.com/nats-io/nats.go v1.52.0
|
||||
github.com/samcharles93/ai-sdk v0.1.21
|
||||
github.com/samcharles93/ai-sdk v0.1.22
|
||||
github.com/traefik/yaegi v0.16.1
|
||||
golang.org/x/net v0.57.0
|
||||
golang.org/x/term v0.45.0
|
||||
|
||||
@@ -130,6 +130,8 @@ github.com/samcharles93/ai-sdk v0.1.20 h1:Z52dyMN293aV8Cpgjdyyd2zw6oNF5FSXKWfCux
|
||||
github.com/samcharles93/ai-sdk v0.1.20/go.mod h1:a4JYsUrwGsmm2eiXgrpcKExtYe7uHQ5zsHDbbkcPB6o=
|
||||
github.com/samcharles93/ai-sdk v0.1.21 h1:V/OqLnoWuZQ/8qw6MiVZuQU5qVLkULGex6WMQYCbCg4=
|
||||
github.com/samcharles93/ai-sdk v0.1.21/go.mod h1:a4JYsUrwGsmm2eiXgrpcKExtYe7uHQ5zsHDbbkcPB6o=
|
||||
github.com/samcharles93/ai-sdk v0.1.22 h1:IIV1HVOzCKMQl5MvZ23WzEzaOyHpnT8QcoN8ihFi9Xc=
|
||||
github.com/samcharles93/ai-sdk v0.1.22/go.mod h1:a4JYsUrwGsmm2eiXgrpcKExtYe7uHQ5zsHDbbkcPB6o=
|
||||
github.com/sergi/go-diff v1.4.0 h1:n/SP9D5ad1fORl+llWyN+D6qoUETXNZARKjyY2/KVCw=
|
||||
github.com/sergi/go-diff v1.4.0/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
|
||||
@@ -105,6 +105,7 @@ func (r *InProcessRunner) Run(ctx context.Context, workspace string, req Request
|
||||
MaxSteps: req.Budget.MaxSteps,
|
||||
WallClock: req.Budget.WallClock,
|
||||
},
|
||||
Completion: agentloop.CompletionForceFinish,
|
||||
ReadOnly: req.ReadOnly,
|
||||
ProtectPaths: protectionMatcher(req.Protection, req.ReadOnly),
|
||||
Extra: mergeToolSets(
|
||||
|
||||
@@ -67,6 +67,9 @@ func TestInProcessRunnerMapsRequestAndCapturesOutput(t *testing.T) {
|
||||
if cfg.ProtectPaths == nil || !cfg.ProtectPaths("nested/file_test.go") || !cfg.ProtectPaths("view_templ.go") {
|
||||
t.Fatal("declarative path protection was not applied")
|
||||
}
|
||||
if cfg.Completion != agentloop.CompletionForceFinish {
|
||||
t.Fatalf("Completion = %q, want forced finish recovery", cfg.Completion)
|
||||
}
|
||||
if !strings.Contains(cfg.ExtraRules, "Confine discovery to /workspace") ||
|
||||
!strings.Contains(cfg.ExtraRules, "unless the mission explicitly requests") {
|
||||
t.Fatalf("project discovery rule missing from ExtraRules: %q", cfg.ExtraRules)
|
||||
|
||||
Reference in new issue
Block a user