Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
4dc570c
fix(process): bound context command cleanup
PierrunoYT Aug 27, 2026
8621fdb
fix(process): retain command tree cancellation identity
ampagent Aug 27, 2026
f743018
fix(process): bind Windows jobs before execution
ampagent Aug 27, 2026
44aff3d
fix(execution): preserve successful Windows descendants
PierrunoYT Aug 28, 2026
e9af688
fix(execution): fall back when tree containment fails
PierrunoYT Aug 29, 2026
91c5895
fix(execution): require Windows job containment
ampagent Sep 2, 2026
803e076
fix(execution): retain process tree lifecycle ownership
PierrunoYT Sep 3, 2026
aac2bd9
fix(process): bound context command cleanup
PierrunoYT Aug 27, 2026
54b457f
fix(process): retain command tree cancellation identity
ampagent Aug 27, 2026
8e69a0b
fix(process): bind Windows jobs before execution
ampagent Aug 27, 2026
20b24c1
fix(execution): preserve successful Windows descendants
PierrunoYT Aug 28, 2026
c6e35f0
fix(execution): fall back when tree containment fails
PierrunoYT Aug 29, 2026
56a3503
fix(execution): require Windows job containment
ampagent Sep 2, 2026
53b3ead
fix(execution): retain process tree lifecycle ownership
PierrunoYT Sep 3, 2026
d6e8f02
fix(execution): bound configured hook process lifecycles
ampagent Sep 7, 2026
109c345
Merge existing PR ancestry after refreshing upstream base
ampagent Sep 7, 2026
6285a65
Merge upstream main into fix/issue-966-process-tree-timeouts
ampagent Sep 12, 2026
aa20bc1
test(plugins): allow race runtime exit delay in origin fixture
ampagent Sep 12, 2026
173ddc3
fix(process): preserve benchmark output drain failures
PierrunoYT Sep 13, 2026
1eda99d
Merge upstream main into fix/issue-966-process-tree-timeouts
PierrunoYT Oct 14, 2026
95f6ce0
Merge upstream main into fix/issue-966-process-tree-timeouts
kevincodex1 Dec 2, 2026
24cc10a
fix(execution): keep command results honest at lifecycle edges
kevincodex1 Dec 2, 2026
150c9f5
fix(execution): run the tree anchor on Android and settle cancel races
kevincodex1 Dec 2, 2026
370f7d5
test(execution): run the empty-PATH check without /bin/sh
kevincodex1 Dec 2, 2026
ed4954b
fix(execution): keep a cut-off stdin pipe out of ordinary exits
kevincodex1 Dec 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions internal/agenteval/agent_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ package agenteval
import (
"bytes"
"context"
"errors"
"os/exec"
"strings"

"github.com/Twigpine/zero/internal/execution"
)

type AgentRunInput struct {
Expand Down Expand Up @@ -67,7 +68,7 @@ func (runner CommandAgentRunner) Run(ctx context.Context, input AgentRunInput) A
cmd.Stdout = stdout
cmd.Stderr = stderr

err := cmd.Run()
err := execution.RunCommand(ctx, cmd)
result.Stdout = stdout.buf.String()
result.Stderr = stderr.buf.String()
result.Truncated = stdout.truncated || stderr.truncated
Expand All @@ -81,8 +82,7 @@ func (runner CommandAgentRunner) Run(ctx context.Context, input AgentRunInput) A
result.Error = ctxErr.Error()
return result
}
var exitErr *exec.ExitError
if errors.As(err, &exitErr) {
if exitErr, ok := execution.AsPureExitError(err); ok {
result.ExitCode = exitErr.ExitCode()
return result
}
Expand Down
4 changes: 3 additions & 1 deletion internal/agenteval/materialize.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import (
"os/exec"
"path/filepath"
"strings"

"github.com/Twigpine/zero/internal/execution"
)

type Materializer struct{}
Expand Down Expand Up @@ -198,7 +200,7 @@ func initGitBaseline(ctx context.Context, workspace string) error {
var output bytes.Buffer
cmd.Stdout = &output
cmd.Stderr = &output
if err := cmd.Run(); err != nil {
if err := execution.RunCommand(ctx, cmd); err != nil {
if ctxErr := ctx.Err(); ctxErr != nil {
return ctxErr
}
Expand Down
13 changes: 8 additions & 5 deletions internal/agenteval/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import (
"path/filepath"
"strings"
"time"

"github.com/Twigpine/zero/internal/execution"
)

// defaultCommandTimeout bounds a single verification command so a hung command
Expand Down Expand Up @@ -144,15 +146,14 @@ func execCommand(ctx context.Context, workspace string, command Command) Command
var stderr bytes.Buffer
cmd.Stdout = &stdout
cmd.Stderr = &stderr
err := cmd.Run()
err := execution.RunCommand(ctx, cmd)
result.Stdout = stdout.String()
result.Stderr = stderr.String()
if err == nil {
result.ExitCode = 0
return result
}
var exitErr *exec.ExitError
if errors.As(err, &exitErr) {
if exitErr, ok := execution.AsPureExitError(err); ok {
result.ExitCode = exitErr.ExitCode()
return result
}
Expand All @@ -167,14 +168,16 @@ func execCommand(ctx context.Context, workspace string, command Command) Command
func defaultRunGit(ctx context.Context, workspace string, args ...string) ([]byte, error) {
allArgs := append([]string{"-C", workspace}, args...)
cmd := exec.CommandContext(ctx, "git", allArgs...)
output, err := cmd.Output()
var output bytes.Buffer
cmd.Stdout = &output
err := execution.RunCommand(ctx, cmd)
if err != nil {
if ctxErr := ctx.Err(); ctxErr != nil {
return nil, ctxErr
}
return nil, err
}
return output, nil
return output.Bytes(), nil
}

func parseGitStatusPorcelain(output []byte) []string {
Expand Down
4 changes: 3 additions & 1 deletion internal/dictation/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import (
"os"
"os/exec"
"time"

"github.com/Twigpine/zero/internal/execution"
)

// commandSpec describes one capture-process invocation. Argv is always
Expand Down Expand Up @@ -107,7 +109,7 @@ func runCommandOutput(ctx context.Context, name string, args ...string) ([]byte,
var out bytes.Buffer
cmd.Stdout = &out
cmd.Stderr = &out
err := cmd.Run()
err := execution.RunCommand(ctx, cmd)
return out.Bytes(), err
}

Expand Down
Loading
Loading