Skip to content

test: make parallel process exits deterministic and side-effect free - #2

Merged
ORESoftware merged 4 commits into
masterfrom
agent/e2e-process-contracts
Aug 5, 2026
Merged

test: make parallel process exits deterministic and side-effect free#2
ORESoftware merged 4 commits into
masterfrom
agent/e2e-process-contracts

Conversation

@ORESoftware

Copy link
Copy Markdown
Owner

What changed

  • Remove the unconditional global Git configuration mutation from every subprocess run.
  • Validate that callers provide a non-empty command array before spawning.
  • Replace the CHLD trap/double-wait pattern with explicit PID tracking and one deterministic result line per command.
  • Wait for every peer before returning a single aggregate exit status.
  • Propagate SIGINT and SIGTERM to active child process groups.
  • Add three executable child-process journeys covering true concurrent startup, mixed success/failure completion, and global-config isolation plus empty-command rejection.
  • Add a pinned, read-only GitHub Actions gate.

Why

A process helper should not mutate the user's global Git configuration. The previous asynchronous CHLD trap could also race with the final wait, making exit accounting dependent on signal timing rather than command results.

Validation

The concurrency test uses a two-process barrier that cannot succeed if commands run serially. The failure test proves a peer still finishes after another command exits 7, while the parent exits 1. The isolation test runs under a temporary HOME and verifies no .gitconfig is created.

@ORESoftware
ORESoftware marked this pull request as ready for review August 3, 2026 05:52
@ORESoftware
ORESoftware merged commit 5ffe818 into master Aug 5, 2026
1 check passed
@linear-code

linear-code Bot commented Aug 5, 2026

Copy link
Copy Markdown

DEN-2097

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant