Skip to content

Verify and document graceful degradation when no slots match the request URL #700

@prk-Jr

Description

@prk-Jr

Context

When no creative-opportunities.toml slots match the incoming request URL, the following guards prevent any partial auction or injection state:

Guard Location Effect
should_run_auction = false publisher.rs:905 No auction dispatched
ad_slots_script = None publisher.rs:985 window.__ts_ad_slots not injected
winning_bids = {} publisher.rs:1457 No bid data produced
has_slots guard html_processor.rs:305 window.__ts_bids script entirely skipped

No \</body> hold occurs. The page streams unmodified. GAM falls back to its own auction.

Action

  • Add explicit tests in publisher.rs verifying zero injection when slot match is empty (currently covered implicitly but not as a named case)
  • Confirm behavior when creative_opportunities config section is present but creative-opportunities.toml has zero slots (kill-switch path per spec §8)
  • Log a debug message at the no-match gate so operators can confirm the feature is inactive on non-article URLs

Parent: #677

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions