Conversation
|
Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability. Example:
Projects:
Please add a Jira issue key to your PR title. |
2 similar comments
|
Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability. Example:
Projects:
Please add a Jira issue key to your PR title. |
|
Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability. Example:
Projects:
Please add a Jira issue key to your PR title. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
| "updatedAt" = NOW() | ||
| WHERE "repositoryId" = $1 | ||
| """ | ||
| return await execute(sql_query, (repo_id,)) |
There was a problem hiding this comment.
Pending reonboard repos prioritized above recurrent repos
High Severity
The acquire_pending_reonboard_repo call is placed before acquire_recurrent_repo, giving re-onboarding repos higher priority than recurrent repos on weekends. This contradicts both the docstring (which lists them as priority 3, "lowest priority") and the PR description ("process them with lowest priority"). The weekend reonboard check and the recurrent repo check need to be swapped so recurrent repos are tried first.


This pull request introduces support for deferred re-onboarding of repositories by adding a new
PENDING_REONBOARDstate and updating the repository acquisition logic to prioritize these repos only on weekends. This helps manage system load by postponing re-onboarding tasks to less busy periods.Deferred re-onboarding support:
PENDING_REONBOARDstate to theRepositoryStateenum to represent repositories waiting for re-onboarding on weekends.acquire_repo_for_processingto check forPENDING_REONBOARDrepos on weekends and process them with lowest priority. [1] [2]acquire_pending_reonboard_repofunction to select and lock a pending re-onboard repository for processing.Worker logic changes:
ReOnboardingRequiredErrorin the repository worker to set the repository state toPENDING_REONBOARDand defer processing, instead of immediately resetting and re-queueing for onboarding.increase_re_onboarding_countimport from the repository worker.Other:
Note
Medium Risk
Changes repository state transitions and selection/locking logic in the processing pipeline, which could delay re-onboarding or affect scheduling/throughput if the new
PENDING_REONBOARDhandling is incorrect.Overview
Adds a new
RepositoryState.PENDING_REONBOARDto represent repositories that require re-onboarding but should be deferred until the weekend.Updates repo acquisition so
PENDING_REONBOARDitems are excluded from normal recurrent processing and are only picked up on weekends via a newacquire_pending_reonboard_repo()path that also resets commit/branch and incrementsreOnboardingCount.Adjusts the worker’s
ReOnboardingRequiredErrorhandling to mark repos asPENDING_REONBOARDinstead of immediately resetting and re-queueing for onboarding, and removes the now-unneededincrease_re_onboarding_counthelper.Written by Cursor Bugbot for commit deaa2f1. This will update automatically on new commits. Configure here.