You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] SIGTERM during apm install exits without rollback and leaves a staging directory and unlocked modules #3676
area/cliCLI command surface, flags, help text (cross-cutting).pillar/foundationsPillar: reliability, platforms, CI, code healthstatus/acceptedHuman scope approval; verify the issue's approval record and review contact before work.type/bugSomething does not work as documented.
Ctrl+C (SIGINT) during apm install rolls back cleanly ("Install interrupted"). SIGTERM, which CI cancellation, docker stop and job timeouts send, has no handler: the process dies with status -15, prints nothing, and leaves apm_modules/.apm-resolution-staging, partially installed modules, deployed files and no lockfile. Running lifecycle scripts are not stopped either.
To reproduce
A project with many local dependencies (for example 30).
Start apm install and send SIGTERM once the first file is deployed.
Expected behavior
SIGTERM is handled like SIGINT: the install transaction rolls back (or reports its residue), lifecycle scripts are stopped, and the exit is non-zero with a message.
Actual behavior
Silent exit -15 with staging directory, modules and deployed files left behind.
Options
Register a SIGTERM handler at CLI entry that raises the same interruption as SIGINT, so rollback, residue reporting and script reaping run.
Document SIGTERM as non-transactional.
Found by the 0.36.0 pre-release lifecycle sweep, round 2 (#3649). Same behavior on v0.35.1, so this is not a 0.36 regression.
Decision (maintainer): SIGTERM is handled like Ctrl+C. A handler at the CLI entry routes SIGTERM to the same interruption path, so the install transaction rolls back, residue is reported and running lifecycle scripts are stopped. Planned for 0.36.0 in the round-2 sweep PR (#3649).
area/cliCLI command surface, flags, help text (cross-cutting).pillar/foundationsPillar: reliability, platforms, CI, code healthstatus/acceptedHuman scope approval; verify the issue's approval record and review contact before work.type/bugSomething does not work as documented.
Activity
danielmeppiel commentedon Nov 12, 2026
Decision (maintainer): SIGTERM is handled like Ctrl+C. A handler at the CLI entry routes SIGTERM to the same interruption path, so the install transaction rolls back, residue is reported and running lifecycle scripts are stopped. Planned for 0.36.0 in the round-2 sweep PR (#3649).
fix(cli): route SIGTERM through the Ctrl+C rollback path (#3676)
fix: 0.36.0 red-team round 2 (MCP config safety, user-file collisions…