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
@@ -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