Skip to content

Rename max_retries to max_attempts for semantic clarity#2

Merged
emilioSp merged 5 commits intofeat/retry-logicfrom
copilot/sub-pr-1
Jan 28, 2026
Merged

Rename max_retries to max_attempts for semantic clarity#2
emilioSp merged 5 commits intofeat/retry-logicfrom
copilot/sub-pr-1

Conversation

Copy link
Copy Markdown

Copilot AI commented Jan 28, 2026

The retry logic used max_retries with semantics that made it behave as a max attempts threshold (1 initial + N-1 retries), causing confusion about whether it meant "total attempts" or "retries after first attempt".

Changes:

  • Renamed max_retriesmax_attempts in types, consumer logic, and migration
  • Updated log messages from "retry X/Y" → "failure X/Y" since retry_count tracks failures, not attempt numbers
  • Fixed migration rollback to remove invalid ALTER TYPE ... REMOVE VALUE syntax (PostgreSQL doesn't support enum value removal)

Semantics:

// With max_attempts=3:
// - Attempt 1 fails → retry_count=1, log "failure 1/3"
// - Attempt 2 fails → retry_count=2, log "failure 2/3"  
// - Attempt 3 fails → retry_count=3, mark as permanently failed

The naming now correctly reflects that this value controls total execution attempts, not retry-after-failure count.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 3 commits January 28, 2026 15:24
Co-authored-by: emilioSp <22614105+emilioSp@users.noreply.github.com>
Co-authored-by: emilioSp <22614105+emilioSp@users.noreply.github.com>
Co-authored-by: emilioSp <22614105+emilioSp@users.noreply.github.com>
Copilot AI changed the title [WIP] Update retry logic implementation based on review comments Rename max_retries to max_attempts for semantic clarity Jan 28, 2026
Copilot AI requested a review from emilioSp January 28, 2026 15:29
@emilioSp emilioSp marked this pull request as ready for review January 28, 2026 15:30
@emilioSp emilioSp merged commit 934d181 into feat/retry-logic Jan 28, 2026
@emilioSp emilioSp deleted the copilot/sub-pr-1 branch January 28, 2026 15:30
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.

2 participants