Skip to content

Commit timeout

commit_timeout

Internal bounded provenance for timed-out commit attempts.

CommitTimeoutError

Bases: TimeoutExpired

Carry causal timeout evidence through the scoped refusal path.

Source code in packages/axm-git/src/axm_git/core/commit_timeout.py
Python
class CommitTimeoutError(subprocess.TimeoutExpired):
    """Carry causal timeout evidence through the scoped refusal path."""

    def __init__(
        self,
        timeout: subprocess.TimeoutExpired,
        *,
        retried: bool = False,
        auto_fixed: list[str] | None = None,
    ) -> None:
        """Snapshot retry metadata and bounded streams without retrying."""
        super().__init__(
            timeout.cmd,
            timeout.timeout,
            output=_bounded_output(timeout.output),
            stderr=_bounded_output(timeout.stderr),
        )
        self.seconds = timeout.timeout
        self.retried = retried
        self.auto_fixed = list(auto_fixed or [])
        self.output = (
            _bounded_output(timeout.stdout) + "\n" + _bounded_output(timeout.stderr)
        )

    def __str__(self) -> str:
        """Keep the public refusal diagnostic explicit and stable."""
        return f"git timed out after {self.seconds}s"
__init__(timeout, *, retried=False, auto_fixed=None)

Snapshot retry metadata and bounded streams without retrying.

Source code in packages/axm-git/src/axm_git/core/commit_timeout.py
Python
def __init__(
    self,
    timeout: subprocess.TimeoutExpired,
    *,
    retried: bool = False,
    auto_fixed: list[str] | None = None,
) -> None:
    """Snapshot retry metadata and bounded streams without retrying."""
    super().__init__(
        timeout.cmd,
        timeout.timeout,
        output=_bounded_output(timeout.output),
        stderr=_bounded_output(timeout.stderr),
    )
    self.seconds = timeout.timeout
    self.retried = retried
    self.auto_fixed = list(auto_fixed or [])
    self.output = (
        _bounded_output(timeout.stdout) + "\n" + _bounded_output(timeout.stderr)
    )
__str__()

Keep the public refusal diagnostic explicit and stable.

Source code in packages/axm-git/src/axm_git/core/commit_timeout.py
Python
def __str__(self) -> str:
    """Keep the public refusal diagnostic explicit and stable."""
    return f"git timed out after {self.seconds}s"