Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
## Unreleased

## v68.4.0 (2026-05-18)

### Diagnostics
- **Backup-search cold/warm cache cost instrumented** — the `Blocking ads (<type>) — backup found in Nms` log now appends `(cold cache: N token fetch[es])` or `(warm cache)`. A per-search local counter increments on the cold path (`isFreshM3u8` — the GQL `getAccessToken` round-trip is only taken when `BackupEncodingsM3U8Cache[type]` misses; it is skipped when the encodings are cached). This decomposes the ~4s stacked sequential backup-search walk seen in field logs into cold-cache-first-break vs warm steady-state, so the latency can be designed against real data rather than guessed. Pure observability — no behavioral or load change; the entangled backup-search loop is untouched. Complements the v68.3.0 cooldown cut by making its cold-fetch-load cost visible in field logs (vaft) (#NN)

## v68.3.0 (2026-05-18)
## v68.2.0 (2026-05-21)

### Performance
- **Backup-retry cooldown cut 15s → 5s** — the `FailedBackupPlayerTypes` lockout (`if (failedAt && (Date.now() - failedAt) < 15000)`) kept the backup search off a contaminated player type for 15s. In the universal CSAI-flip reality a type can become clean again within seconds, so the 15s lockout left the search avoiding a now-recovered type far longer than warranted, prolonging ad-break stalling. Reduced to 5s, porting the GosuDRM/TTV-AB v8.0.0 "reduced ad-induced stalling" tuning (`_getBackupPlayerRetryCooldownMs` 15000→5000) to vaft's equivalent lockout. **Deliberate latency/load tradeoff:** a 5s cooldown means an ad-laden type is retried ~3× more often → more token/m3u8 fetches → more pressure on the `ConsecutiveTokenFetchFailures` detection/rate-limit tripwire. Shipped *with* the cold/warm token-fetch instrumentation (v68.2.0 / #228) specifically so the added cold-fetch load is visible in field logs and the tradeoff can be tuned or reverted against data. vaft-only mechanism (video-swap-new has no equivalent) (#NN)
- **Backup-retry cooldown cut 15s → 5s** — the `FailedBackupPlayerTypes` lockout (`if (failedAt && (Date.now() - failedAt) < 15000)`) kept the backup search off a contaminated player type for 15s. In the universal CSAI-flip reality a type can become clean again within seconds, so the 15s lockout left the search avoiding a now-recovered type far longer than warranted, prolonging ad-break stalling. Reduced to 5s, porting the GosuDRM/TTV-AB v8.0.0 "reduced ad-induced stalling" tuning (`_getBackupPlayerRetryCooldownMs` 15000→5000) to vaft's equivalent lockout. **Deliberate latency/load tradeoff:** a 5s cooldown means an ad-laden type is retried ~3× more often → more token/m3u8 fetches → more pressure on the `ConsecutiveTokenFetchFailures` detection/rate-limit tripwire. Shipped *with* the cold/warm token-fetch instrumentation below specifically so the added cold-fetch load is visible in field logs and the tradeoff can be tuned or reverted against data. vaft-only mechanism (video-swap-new has no equivalent) (#NN)

### Diagnostics
- **Backup-search cold/warm cache cost instrumented** — the `Blocking ads (<type>) — backup found in Nms` log now appends `(cold cache: N token fetch[es])` or `(warm cache)`. A per-search local counter increments on the cold path (`isFreshM3u8` — the GQL `getAccessToken` round-trip is only taken when `BackupEncodingsM3U8Cache[type]` misses; it is skipped when the encodings are cached). This decomposes the ~4s stacked sequential backup-search walk seen in field logs into cold-cache-first-break vs warm steady-state, so the latency can be designed against real data rather than guessed. Pure observability — no behavioral or load change; the entangled backup-search loop is untouched. Companion to the cooldown cut above — makes its cold-fetch-load cost visible in field logs (vaft) (#NN)

## v68.1.0 (2026-05-18)

Expand Down
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ uBlock files have `twitch-videoad.js text/javascript` as line 1 (not valid JS

## Versions

Bump `@version` (userscript header) and `ourTwitchAdSolutionsVersion` together for functional changes. Current: vaft 68.4.0/85, video-swap-new 1.86/54, strip 1.9/26. Testing: vaft 651.0.0/651, video-swap-new -/619.
Bump `@version` (userscript header) and `ourTwitchAdSolutionsVersion` together for functional changes. Current: vaft 68.2.0/83, video-swap-new 1.86/54, strip 1.9/26. Testing: vaft 651.0.0/651, video-swap-new -/619.

## localStorage Config

Expand Down
2 changes: 1 addition & 1 deletion vaft/vaft-ublock-origin.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ twitch-videoad.js text/javascript
}
}
'use strict';
const ourTwitchAdSolutionsVersion = 85;// Used to prevent conflicts with outdated versions of the scripts
const ourTwitchAdSolutionsVersion = 83;// Used to prevent conflicts with outdated versions of the scripts
console.log('[AD DEBUG] TwitchAdSolutions vaft v' + ourTwitchAdSolutionsVersion + ' loading');
if (typeof window.twitchAdSolutionsVersion !== 'undefined' && window.twitchAdSolutionsVersion >= ourTwitchAdSolutionsVersion) {
console.log('[AD DEBUG] CONFLICT: vaft v' + ourTwitchAdSolutionsVersion + ' skipped — another script already active (v' + window.twitchAdSolutionsVersion + '). Remove duplicate scripts.');
Expand Down
4 changes: 2 additions & 2 deletions vaft/vaft.user.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==UserScript==
// @name TwitchAdSolutions (vaft)
// @namespace https://github.com/ryanbr/TwitchAdSolutions
// @version 68.4.0
// @version 68.2.0
// @description Multiple solutions for blocking Twitch ads (vaft)
// @updateURL https://github.com/ryanbr/TwitchAdSolutions/raw/master/vaft/vaft.user.js
// @downloadURL https://github.com/ryanbr/TwitchAdSolutions/raw/master/vaft/vaft.user.js
Expand Down Expand Up @@ -47,7 +47,7 @@
}
}
'use strict';
const ourTwitchAdSolutionsVersion = 85;// Used to prevent conflicts with outdated versions of the scripts
const ourTwitchAdSolutionsVersion = 83;// Used to prevent conflicts with outdated versions of the scripts
console.log('[AD DEBUG] TwitchAdSolutions vaft v' + ourTwitchAdSolutionsVersion + ' loading');
if (typeof window.twitchAdSolutionsVersion !== 'undefined' && window.twitchAdSolutionsVersion >= ourTwitchAdSolutionsVersion) {
console.log('[AD DEBUG] CONFLICT: vaft v' + ourTwitchAdSolutionsVersion + ' skipped — another script already active (v' + window.twitchAdSolutionsVersion + '). Remove duplicate scripts.');
Expand Down
Loading