Commit Graph
2 Commits
Author SHA1 Message Date
James MaesandClaude Fable 5.2 2be9fc21db fix(schedule): the daily prune prunes, and plans run on their schedule without a scheduled jobs table
maven / build (push) Successful in 1m25s
build / maven (push) Successful in 1m25s
The daily prune never deleted anything. Its schedule was on "Prune per
retention" (backupPrune), an action for a person that needs plans selected
and a review; a scheduler that started it was told "No records were
selected", logged a warning and went on, every day, in every host.

- backupPruneScheduled (BackupScheduledPruneProcess) prunes every active
  plan to its retention with nobody selecting anything, once a day
- a plan that cannot be pruned raises backups.prune.failed, cleared by its
  next good prune, and does not stop the others
- backupPrune has no schedule now

Plans did not run on their schedule in an application with no scheduled
jobs table: the sync to scheduled jobs logged "ScheduledJob table not
found" and did nothing, so such a host had to build a scheduler itself.

- backupRunDuePlans (BackupDuePlansProcess), once a minute on the qbit's
  scheduler, starts every active plan whose cron has come due since it
  last started and every verification that has come due; missed times
  collapse into one run
- where the application has scheduled jobs it starts nothing
- only the scheduler may run it

Tests: the prune started as the scheduler starts it deletes what the
retention no longer keeps (the same call on the old schedule deleted
nothing); one plan's trouble does not stop the others; six tests of the
due-plans process. ./mvnw verify: 233 tests, guardrails, help coverage
and code coverage pass.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-24 05:19:03 -06:00
james.maesandClaude Sonnet 5.5 01b60708f8 feat: run lifecycle - plan schedule, run lease, cancel, resume, GFS prune, object lock, plan validation
- BackupPlanSyncToScheduledJobProcess (+ verify variant) and the plan table wiring
- BackupRunCoordinator: one run per plan (live-heartbeat lease, QUEUED to RUNNING,
  SKIPPED_CONCURRENT warning), maxConcurrentRuns queueing, scheduled entry point
  (backupRunScheduledPlan) as the system session with plan-owner validation
- plan save validation (admin and read on resolved tables, object lock vs bucket
  capabilities, encryption rules, unsupported formats, planKey immutable after a run)
- PruneCalculator (GFS) and BackupPruner (retention classes, deletePermanent on the
  prune alias, kept: locked until, debris, file store mark-and-sweep)
- object lock applied at write time in the engine, parts catalogued as they complete
- Back up these records, Cancel, Resume (PER_TABLE, from the last complete part),
  Test destination and Prune processes with Review and Result lines

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 18:54:24 -05:00