freshyo/docs/test-cases/jobs-health.md
2026-10-11 18:21:24 +05:30

2.4 KiB

Scheduled jobs, initialization and health

Scope: cache creator/store initialization, regional flash schedules, supported queue/job processing, service health and startup. Isolated scheduler/queue harness only; do not wait for or mutate production cron.

ID Priority Action / input Expected result
JOB-01 P1 Backend startup with configured regional DB/KV/assets. Health responds and required stores initialized before serving valid data.
JOB-02 P1 Empty DB/regions/config in approved initialized fixture. Explicit setup/empty state; no implicit migration execution.
JOB-03 P1 Schedule cache refresh for A/B in same window. Both scopes processed; no lost pending region.
JOB-04 P1 New write during existing generation. Final value eventually published, not discarded by reset flag.
JOB-05 P1 Flash enable/disable at intended regional schedule boundaries. Correct regional values and discovery updates; other region schedule untouched.
JOB-06 P1 Midnight/IST/UTC crossover and delayed scheduler tick. Defined once/next-state behavior; no permanently wrong flag.
JOB-07 P1 Retry same queue event or duplicate scheduler invocation. Approved repeat-safe effects; no duplicate order/notification side effect.
JOB-08 P1 DB/KV/storage/provider unavailable during job. Bounded retry/visible failure; no falsely completed publication.
JOB-09 P1 Job interrupted/restarted midway. Recovery resumes/rebuilds coherent state; no half-serving initialized caches.
JOB-10 P0 Queue payload references foreign/deleted IDs or forged scope. Correct authority/context validation; no arbitrary cross-region writes.
JOB-11 P1 Health when dependencies degraded. Accurate documented health semantics; no credential leak in diagnostic response.
JOB-12 P1 Many regions/SKUs and supported bulk initialization. All batches processed; no SQL parameter limit truncation.
JOB-13 P1 Regional versions and in-memory store freshness after initialization. No global singleton leaking another region's product flags.
JOB-14 P2 Logs/alerts on permanent failure. Actionable redacted error plus scope/event identity; no endless silent retries.

Health HTTP semantics, job exactly-once/dedup behavior and retry limits must be explicit. Queue acceptance is not evidence of completed downstream delivery.