Skip to content

Stop blocked homepage checks from ending live ad network relationships - #124

Merged
RaviTejaKNTS merged 1 commit into
mainfrom
ad-checker-inconclusive-homepage
Nov 13, 2026
Merged

RaviTejaKNTS merged 1 commit into
mainfrom
ad-checker-inconclusive-homepage

Conversation

@RaviTejaKNTS

Copy link
Copy Markdown
Collaborator

Problem

The ad network checker ended live relationships. A failed or challenged homepage fetch (OVH gets bot challenges and 403s from some sites) counted as "network not found" for networks that need page evidence: AdSense, MGID, Taboola, Teads, and others. Unchanged ads.txt replies then added misses without a new page fetch. On 2026-11-13, 1,786 left events landed in one day. A live re-check of 120 sites marked as having left AdSense found 91 (76%) still run it.

Change

  • Failed, blocked, empty, oversized, and challenge homepages are inconclusive: no miss, no confirmation, retry after 6, 24, 72, then 168 hours. Challenge detection reads parsed HTML for active provider challenges and ignores quoted or inert content.
  • A 304 reuses the saved ads.txt parse; only networks that need it fetch a fresh homepage. The deadline is enforced per domain.
  • Page evidence older than 30 days (by the saved evidence time) makes a confirmed relationship stale, never ended. Public checked dates use successful checks only.
  • scripts/ad-networks/correct-homepage-misses.mjs restores wrongly ended or stale relationships only with fresh matching evidence, removes their false left events, and repairs daily counts in bounded, checkpointed batches. New migration: a checkpoint table, backend access only.
  • content_docs/ad-networks/production-runbook.md: backups, a frontend maintenance window, a 25-domain batch, then 100-domain batches.

Review

Two reviews by a separate reviewer. Round 1: 2 blockers and 5 should-fix findings, all fixed. Round 2: no blockers; the 2 should-fix and 2 minor findings were fixed by the lead (expiry uses the saved evidence time; a valid absence can also expire an old confirmation; checker wording; removed the manual migration fallback).

Checks

  • Ad network suite: 233 passed, 9 skipped.
  • npm run quality: TypeScript and 113 core tests passed.
  • Production impact of the 30-day rule, measured read-only: 96 relationships across about 90 sites.

After merge

Run the correction on production following the runbook, starting with 25 domains.

🤖 Generated with Claude Code

…ures

A failed or challenged homepage fetch counted as "network not found"
for networks that need page evidence, and unchanged ads.txt replies
added further misses. Three misses ended live relationships: on
2026-11-13, 1,786 left events landed in one day, and 76% of a live
sample still ran AdSense.

Blocked, failed, empty and challenge pages are now inconclusive and
retried with backoff. Unchanged ads.txt reuses its saved parse but no
longer stands in for page evidence. Page evidence older than 30 days
makes a relationship stale (not ended), and public checked dates use
successful checks only. The per-domain deadline keeps the hourly job
inside its budget.

correct-homepage-misses.mjs restores relationships only with fresh
matching evidence, removes their false left events, and repairs daily
counts in bounded, checkpointed batches. The runbook covers backups, a
frontend maintenance window, and 25-domain then 100-domain batches.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@RaviTejaKNTS
RaviTejaKNTS merged commit 6a90331 into main Nov 13, 2026
4 checks passed

This branch was previously deployed

1 inactive deployment
production — e8830583 Deployed Nov 13, 2026 by RaviTejaKNTS via verify-production-build #115
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant