Skip to content

Add timeouts to workspace project command execution #1204

Description

@codeforester

Problem

Validated from Claude third-pass finding [91].

cli/python/base_projects/command_helpers.py::run_project_command() wraps subprocess.run(...) with check=False, capture_output=True, and text=True, but no timeout. It is used by workspace clone/init flows through base_projects.engine, including delegated basectl repo clone calls. A hung Git operation or unreachable remote can therefore hang the workspace command indefinitely.

This is the same class of issue recently fixed for release publishing subprocesses, but the newly extracted project command helper does not yet carry that bounded execution policy.

Desired outcome

Bound subprocess execution in workspace project command helpers and surface timeout failures with redacted, actionable errors.

Scope

  • Add an explicit timeout policy to run_project_command().
  • Preserve stdout/stderr capture and redaction in error messages.
  • Decide whether the timeout is a constant, option, or internal default.
  • Add tests for timeout handling and existing OSError handling.

Acceptance criteria

  • run_project_command() cannot hang indefinitely by default.
  • Timeout failures are reported as ProjectCommandError or an equivalent existing command error with redacted command details.
  • Workspace clone/init callers handle timeout failures without tracebacks.
  • Existing base_projects tests pass.

Classification

Review finding taxonomy: implementation robustness.

Metadata

Metadata

Assignees

Labels

bugSomething is not working

Type

No type

Fields

No fields configured for issues without a type.

Projects

Status
Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions