# Reported issues for Mergetrain

Pod holds 5 of 5 GitHub reports that passed its relevance review. This can include external user reports, maintainer-confirmed bugs, and concrete feature gaps. Treat them as evidence to inspect, not a count of distinct defects.

Back to [Mergetrain](/mcp/mergetrain).

## Most discussed

### [P1] POSIX timeout escalation skips SIGKILL once the process-group leader has exited

## Summary

On a timeout or cancel, `_stop_process` sends SIGTERM to the process group, then sends SIGKILL only if the group leader is still alive. Descendants that trap or ignore SIGTERM keep running after the timeout is reported and the worktree is deleted. Examples are a server doing a graceful shutdown or a JVM with a shutdown hook. This is the POSIX analog of #215.

## Where (at 4a2da62)

- `src/mergetrain/command_runner.py`: `_stop_process` (about lines 137-160)

## Reproduction

Use a…

[Read the thread](https://github.com/yongjip/mergetrain/issues/228) · 2026-09-28 · closed · 0 comments

### [P0] Parallel gates ignore SIGINT, so MCP cancel and Ctrl-C leave them running (POSIX)

## Summary

Parallel gate groups run in `ThreadPoolExecutor` workers. `KeyboardInterrupt` is raised only in the monitor thread. Leaving the `with` block then waits for the workers without setting `cancel_event`, so no worker's `_run_managed` stops its process group.

The MCP server relies on SIGINT unwinding the CLI's command runners (`mcp_server.py`, about lines 175-199). After its 5 s grace period it SIGKILLs only the CLI's process group. The gates each run in their own session, so they keep…

[Read the thread](https://github.com/yongjip/mergetrain/issues/222) · 2026-09-28 · closed · 0 comments

### [P0] Persistent validation workspace check can run git reset --hard on the user's checkout

## Summary

`prepare_persistent` accepts an existing workspace path when `git rev-parse --git-common-dir`, run there, matches the repository. A directory with no `.git` inside `<control>/.mergetrain/worktrees` passes this check, because Git walks up to the control checkout. mergetrain then runs `git reset --hard <integration_ref>`, the merges and the gates against the user's own checkout.

## Where (at 4a2da62)

- `src/mergetrain/worktree_manager.py:123-140` (`prepare_persistent`)
-…

[Read the thread](https://github.com/yongjip/mergetrain/issues/221) · 2026-09-28 · closed · 0 comments

### [P0] An orphaned git push can land after reconcile decided it did not

## Summary

Managed commands, `git push` included, start in a new session (`start_new_session`). If the runner is killed mid-push, the push keeps running. That happens on SIGKILL, and on SIGTERM too, because the CLI has no SIGTERM handler. Recovery treats the dead runner PID as proof that the push is over:

1. `status` recommends `reconcile --apply`.
2. Reconcile sees the remote not yet updated and decides `queued`, or terminal `canceled` if a cancel was pending. It clears the pending marker…

[Read the thread](https://github.com/yongjip/mergetrain/issues/220) · 2026-09-28 · closed · 0 comments

### [P0] Placeholder quoting breaks after an apostrophe in a shell comment

## Summary

`expand_command` tracks shell quoting to decide how to quote `${repo}` and `${worktree}`, but it does not understand `#` comments. An apostrophe inside a comment, such as `# don't …`, flips its state to "inside single quotes", so a later placeholder is inserted raw. When the path contains spaces, the shell splits it, and `rm -rf ${worktree}/build` deletes a directory outside the repository. docs/config.md says unquoted placeholder use is safe.

## Where (at 4a2da62)

-…

[Read the thread](https://github.com/yongjip/mergetrain/issues/219) · 2026-09-28 · closed · 0 comments

## Most recent

The remaining reports are on [the project's issue tracker](https://github.com/yongjip/mergetrain/issues).
