fix(purge): say when purges are recorded only, not sent (no live CDN) #20

Merged
KofTwentyTwo merged 1 commits from fix/no-cdn-provider-honest into develop 2026-10-14 15:50:22 +00:00
KofTwentyTwo commented 2026-10-14 15:40:12 +00:00 (Migrated from github.com)

Fixes the qbit side of KofTwentyTwo/Website-Backend#199: with no live CDN, editors were told purges were sent.

What changes

  • CdnPurgeService.sendingStatus(providerId) answers "would this be sent?" using the same initialStatus rule that records SKIPPED_NONE_PROVIDER / SKIPPED_STAGE_OFF, so the screens and the dispatcher can't disagree.
  • Purge From CDN, Purge Everything and Retry Purge: Review adds a WARNING line ("No CDN provider configured: purges are recorded only, not sent." or "CDN hostnames are not live: ..."); Result says "purge requests were recorded (not sent: no CDN provider)" instead of "(sent within seconds)". Retry against a NONE/OFF provider now records the skip status rather than PENDING. With a live provider the wording is unchanged.
  • Home: the Connection and Health cards say "No CDN provider configured: purges are recorded only."; recent purges are tagged "recorded only (not sent)"; the Origin headers card says checks are not run by this version (nothing writes cdn_origin_check), and still shows rows if a host writes them.

Tests: mvnw -o -B verify green (89 tests, checkstyle, guardrails G1-G7, coverage). New cases cover NONE, stage OFF and a live fake provider for each action, plus the home strings.

kof22 picks this up through a qbit-cdn release and a version bump; switching the provider to CloudFront stays an owner step for the cutover.

🤖 Generated with Claude Code

Fixes the qbit side of KofTwentyTwo/Website-Backend#199: with no live CDN, editors were told purges were sent. **What changes** - `CdnPurgeService.sendingStatus(providerId)` answers "would this be sent?" using the same `initialStatus` rule that records `SKIPPED_NONE_PROVIDER` / `SKIPPED_STAGE_OFF`, so the screens and the dispatcher can't disagree. - **Purge From CDN**, **Purge Everything** and **Retry Purge**: Review adds a WARNING line ("No CDN provider configured: purges are recorded only, not sent." or "CDN hostnames are not live: ..."); Result says "purge requests were recorded (not sent: no CDN provider)" instead of "(sent within seconds)". Retry against a NONE/OFF provider now records the skip status rather than PENDING. With a live provider the wording is unchanged. - **Home:** the Connection and Health cards say "No CDN provider configured: purges are recorded only."; recent purges are tagged "recorded only (not sent)"; the Origin headers card says checks are not run by this version (nothing writes `cdn_origin_check`), and still shows rows if a host writes them. **Tests:** `mvnw -o -B verify` green (89 tests, checkstyle, guardrails G1-G7, coverage). New cases cover NONE, stage OFF and a live fake provider for each action, plus the home strings. kof22 picks this up through a qbit-cdn release and a version bump; switching the provider to CloudFront stays an owner step for the cutover. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.