Skip to content

Comments

Add --timeout flag to abort long-running operations#15

Open
tommoor wants to merge 1 commit intomainfrom
tom/lin-58767-add-timeout-configuration-b819
Open

Add --timeout flag to abort long-running operations#15
tommoor wants to merge 1 commit intomainfrom
tom/lin-58767-add-timeout-configuration-b819

Conversation

@tommoor
Copy link
Member

@tommoor tommoor commented Feb 24, 2026

Summary

  • Adds a --timeout=<seconds> CLI flag (default: 60s) that aborts the process with a clear error message if the operation exceeds the configured duration
  • Prevents CI jobs from hanging indefinitely on large repositories with many commits
  • Validates the timeout value is a positive number, with helpful error messages for invalid input

Resolves LIN-58767

Test plan

  • Type checking passes (pnpm typecheck)
  • New tests for --timeout parsing: default value, space syntax, = syntax, non-numeric, zero, and negative values
  • All args tests pass (25/25)

Large repositories with many commits could cause the CLI to hang
indefinitely. This adds a --timeout flag (default 60s) that aborts
with a clear error message if exceeded, preventing CI jobs from
running forever and helping users identify performance issues.
@linear-code-review
Copy link

@tommoor tommoor marked this pull request as ready for review February 24, 2026 16:35
@tommoor tommoor changed the title Add --timeout flag to abort long-running operations Add --timeout flag to abort long-running operations Feb 24, 2026
@tommoor tommoor requested a review from RomainCscn February 24, 2026 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant