Skip to content

Recognize ad code that speed and consent plugins delay - #125

Merged
RaviTejaKNTS merged 1 commit into
mainfrom
ad-matcher-delayed-scripts
Nov 13, 2026
Merged

RaviTejaKNTS merged 1 commit into
mainfrom
ad-matcher-delayed-scripts

Conversation

@RaviTejaKNTS

Copy link
Copy Markdown
Collaborator

Problem

scripts/ad-networks/matcher.mjs confirmed AdSense and page signatures only in executable scripts. Speed and consent plugins rewrite tags, for example <script type="litespeed/javascript" data-src="…adsbygoogle.js?client=ca-pub-…">, so live sites were recorded as absent and ended. In the first production correction batch (24 sites), curl from OVH found the original ID on 22 of 24 homepages; the checker confirmed 1.

Change (matcher ad-network-1.5.2)

  • An audited allow-list of 19 deferred-loader and consent formats, each with its source file and line in content_docs/ad-networks/maintenance.md. Only the loader's own activation attribute (or plain src where that loader supports it) can confirm.
  • Inconclusive, never absent: different candidate sources on one tag, a signal inside a held or deferred inline body, and parse failures.
  • Restored non-JavaScript saved types are ignored. The only allowed chain is Perfmatters → LiteSpeed.
  • Ordinary executable inline scripts match exactly as before: 0 differences on 218 captured pages against 6a90331d. Scripts inside pre, code, blockquote are read again.
  • correct-homepage-misses.mjs is split in two:
    • History repair (erase the departure, invalidate snapshots) needs stored proof that the miss check itself was false.
    • Current-only reconfirmation keeps the departure and records one return.
  • Runbook: corrected acceptance queries; resume of every paused job; hourly verification resumed last.

Review

Four review rounds by a separate reviewer: 3, then 2, then 1 blockers, then none. The last finding (the no-window resume command failing on an empty SSH argument) was fixed by the lead.

Checks

  • Ad network suite: 451 passed, 9 skipped (PostgreSQL integration, opt-in).
  • npm run quality: TypeScript and 113 core tests passed.
  • Replay of 274 captured homepages: 145 sampled relationships restore. The weighted estimate is about 5,861 of 10,273 candidates.

After merge

Hourly verification on OVH stays paused. Run the correction by the runbook: 25 domains, then 100-domain batches, then resume verification.

🤖 Generated with Claude Code

Matcher ad-network-1.5.2. The matcher read only executable scripts, so
AdSense and page signatures loaded through plugins such as LiteSpeed
(type="litespeed/javascript" data-src=...) were recorded as absent
and live relationships ended. In a production batch of 24, curl found
the original ID on 22 to 24 pages while the checker found it on 1.

- An audited allow-list of 19 deferred-loader and consent formats.
  Only each loader's own activation attribute, or a plain src where
  that loader supports it, can confirm. Conflicting sources, held
  inline bodies with a signal, and parse failures are inconclusive.
  Restored non-JavaScript types are ignored.
- Ordinary executable scripts match as in 1.4.0; scripts inside pre,
  code and blockquote are read again.
- The correction is split. History repair (erase the departure,
  invalidate snapshots) needs stored proof of a false miss. Current-only
  reconfirmation keeps the departure and records one return.
- Runbook: acceptance queries, resume of every paused job, and the
  hourly verification resumed last.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@RaviTejaKNTS
RaviTejaKNTS merged commit e8bc5c6 into main Nov 13, 2026
7 of 8 checks passed

This branch was previously deployed

1 inactive deployment
production — be94cafd Deployed Nov 13, 2026 by RaviTejaKNTS via verify-production-build #116
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