Skip to content
TheChatArchiveThe Chat Archive
composer-2.5· unknownHugging Face ibragim-bad/swe_rebench_07_2026_trajectories

Pending backups can preempt a backup that is already executing Backup scheduling must…

  1. User

    Pending backups can preempt a backup that is already executing

    Backup scheduling must not select a pending backup while another backup is already executing. When none is executing, select the oldest pending backup, using a deterministic tie-break for equal creation times.

    Interface

    Type: Function Name: IsExecuting Path: api/v1/backup_funcs.go Input: () Output: bool Description: Returns true if the backup has started or is running. Use this to determine whether a backup holds active resources and should not be preempted.

  2. Assistant

    I'll locate the backup scheduling logic and the IsExecuting hook so we can prevent pending backups from preempting an active run.

  3. Assistant

    Checking how pending backups are set and whether there are related tests or recent changes:

  4. Assistant

    Implementing IsExecuting and updating scheduling so pending backups can't preempt active runs; selecting the oldest pending backup when none are executing.

  5. Assistant

    Adding tests for the new behavior:

  6. Assistant

    Fixed the backup scheduling bug where a pending backup could preempt one already executing.

    Root cause

    CanExecuteBackup treated BackupPhasePending as "in progress" via IsInProgress(), so a pending backup was allowed to run even when another backup was already executing.

    Changes

    api/v1/backup_funcs.go

    1. IsExecuting() — returns true only for started or running phases (backups that hold active resources).

    2. GetPendingBackupNames() — collects backups that are not done and not executing (including explicit pending phase). Sorts by creation time (oldest first), with name as a deterministic tie-breaker.

    3. CanExecuteBackup() — uses IsExecuting() instead of IsInProgress():

      • If any backup is executing, only that backup may run.
      • Otherwise, only the oldest pending backup may run.

    api/v1/backup_funcs_test.go — added tests for IsExecuting, creation-time ordering, name tie-breaking, and the pending-vs-running preemption case.

    All 229 api/v1 tests and 348 controller tests pass.

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.