fix: resolve remaining unconvert and pre-existing skillscript test failure

- Remove unnecessary string() conversion on res.Status in workflow/agent.go
  (Status is already string in agentexec.Result)
- Fix TestRunWrapsExternalCommand: sh -c only reads the first argument as
  the command string. exec.CommandContext("sh", "-c", "echo wrapped")
  passes the intent correctly, while the previous split form
  (", "", "echo", "wrapped"") treated "wrapped" as /bin/bash.
This commit is contained in:
sam committed 2026-07-29 03:23:31 +10:00
1 parent 9859d10095
commit 1da53e2939
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -45,7 +45,7 @@ import (
func main() {
ctx := context.Background()
out, _ := exec.CommandContext(ctx, "sh", "-c", "echo", "wrapped").CombinedOutput()
out, _ := exec.CommandContext(ctx, "sh", "-c", "echo wrapped").CombinedOutput()
fmt.Print(string(out))
}
`)
+1 -1
View File
@@ -171,7 +171,7 @@ func (a AgentStage) Stage() Stage {
tc.Task.TokensUsed += res.TokensUsed
tc.Task.Iterations += res.Iterations
tc.Emit("agent_finish", a.Name, res.Summary, map[string]any{
"status": string(res.Status), "stop_reason": res.StopReason,
"status": res.Status, "stop_reason": res.StopReason,
"tokens": res.TokensUsed, "iterations": res.Iterations, "model": modelRef,
})