Skip to content

Retry on empty addition - #702

Open
szmania wants to merge 9 commits into
cecli-dev:v1.6.2from
szmania:cli-67-retry-on-empty-addition
Open

szmania wants to merge 9 commits into
cecli-dev:v1.6.2from
szmania:cli-67-retry-on-empty-addition

Conversation

@szmania

@szmania szmania commented Sep 29, 2026 •

Copy link
Copy Markdown

This PR implements a robust retry mechanism for empty additions in the CLI. Key changes:

  • Updated retry module to detect empty diffs and automatically retry the operation up to 3 times.
  • Added unit tests in tests/test_retry.py covering:
    • Successful retry when the first attempt fails due to no changes.
    • Failure after maximum retries.
    • Correct handling of non-empty diffs.
  • Updated documentation in docs/cli.md to explain the new retry behavior.
  • Minor refactor of the add command to use the new retry logic.

The PR addresses issue #67 and ensures that the CLI does not exit with an error when no changes are detected. Please review the changes and run the CI pipeline to confirm the retry logic works as expected.

Implementation notes:

  • The retry logic is now encapsulated in src/cli/retry.py.
  • Tests use the pytest framework and the click.testing module.
  • The PR targets the main branch of the upstream cecli-dev/cecli repository.

Thank you for reviewing!

@szmania
szmania changed the base branch from main to v1.6.2 September 30, 2026 07:31

This branch has not been deployed

No deployments
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