Pending backups can preempt a backup that is already executing Backup scheduling must…
- 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.
- Assistant
I’ll trace the backup scheduling path and existing tests, then patch the selection logic and add regression coverage for executing and equal-timestamp cases.
- Assistant
The current gate treats pending, started, and running as one “in progress” category and sorts by name, which explains the preemption. I’m narrowing the intended phase semantics and test conventions before changing it.
- Assistant
I’ve confirmed the intended distinction:
pendingremains “in progress” for general status reporting, but onlystartedandrunninghold execution resources. The scheduler will prioritize any executing backup first; otherwise it will order eligible pending work by creation time, then name. - Assistant
The implementation and regression tests are in place. The focused package test is still compiling its dependency graph; after it finishes I’ll run the relevant controller tests and inspect the final diff for unintended changes.
- Assistant
The first test attempt hit the environment’s process limit during compilation, not a code failure. I reran it with constrained parallelism; that build is progressing normally but is slower because the cache was initially cold.
- Assistant
A regression fixture was inserted into the wrong neighboring test by an overly broad patch context, and the test run caught it. I’m relocating that fixture and rerunning the suite.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.