3.1 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.
STATUS: queue / scheduler / job cases EXCLUDED from the automated run (2026-10-18). Per owner instruction, the queue and scheduled-job cases are skipped for this run (no
--test-scheduledharness is available against the running dev server, and no queue consumer is exercised automatically). The cases below are retained unchanged (nothing removed) and are reported asSKIPPED, notPASS/FAIL/NOT RUN. Only the health/startup cases (JOB-01, JOB-02, JOB-11) remain in scope for the automated harness.
| 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. |
| JOB-15 | P1 | Global cache request followed by a regional request before the alarm runs; inspect the durable pending state. | The all-regions-pending marker survives the alarm, clears the per-region list, and cannot be overwritten by a regional request. |
Health HTTP semantics, job exactly-once/dedup behavior and retry limits must be explicit. Queue acceptance is not evidence of completed downstream delivery.