memory-core git exec: real-Git stdin test hangs to the 20 s test timeout on macos-latest

Author: code-yeongyuCreated Sep 28, 2026Updated Sep 28, 2026

Summary

packages/memory-core/src/git/exec.test.ts › "createNodeGitExec > #given stdin #when real Git runs #then bytes are piped and existing argv handling is unchanged" timed out on test (macos-latest, 1/2). The PR that hit it changes no memory-core code.

Evidence

  • Run: https://github.com/code-yeongyu/oh-my-openagent/actions/runs/36399788237 (job test (macos-latest, 1/2), PR #9090, whose diff touches only packages/senpi-task).
  • Log line: (fail) createNodeGitExec > #given stdin #when real Git runs #then bytes are piped and existing argv handling is unchanged [20003.57ms]. Every other createNodeGitExec case in the file passed in under 6 ms.

Timing

The test spawns real git twice (hash-object -- <file>, then hash-object --stdin), each with timeoutMs: 5000, inside the suite's 20 s test timeout. It ran for the full 20 s. So neither spawn returned or hit its own 5 s budget, which suggests the stdin pipe (or the spawned process) never settled rather than git being slow.

Expected

The stdin case completes or fails within its own budgets on every runner. A child that never reads stdin to EOF, or whose stdin is never closed, must surface as the exec's own timeout error, never as a hung test.

Suspected area

The stdin path of createNodeGitExec (packages/memory-core/src/git/exec.ts): whether stdin is written and ended on the spawned child in all cases, and whether the per-call timeoutMs covers the stdin-write phase and kills the child. Unverified; this is a hypothesis.

Acceptance

  • A deterministic test for a child that does not consume stdin, asserting the exec rejects within timeoutMs.
  • The real-git stdin test cannot hang past its budgets.

Source: code-yeongyu/oh-my-openagent