Repository navigation
Description
Correction (2026-10-31)
The Sentry numbers below overstate the loss. Most of the 30 "lost" sites were false positives on v0.0.140, not real Sentry installs:
- 24 of the 30 sites have been checked so far. In 23 of them, the only
Sentry.initin any stored script is a string inside supabase-js that mentionsSentry.init()(an empty call in prose), not a Sentry setup. The old pattern/Sentry\.init/matched it whenever the sample happened to hold it; v0.0.146's sample moved and stopped holding it. - Tech detection reads at most 256 KB per bundle (plus 24 KB samples), 5 s per page, 8 candidates: large app bundles hide technologies #1387 (v0.0.147) tightened the Sentry pattern to
[Sentry]orSentry.init({, so these no longer match on any version. - 1 of the 24 has a real Sentry signal. The fix(tech-detect): derive a search literal for every detector, share the extras round by round, reserve the tail #1420 #1421 branch recovers it.
- The "uncapped build detects Sentry on all 30" line used the same old pattern, so it matched the prose too.
The crowd-out mechanism is real (the tests in #1421 reproduce it), but its effect on this corpus is small: v0.0.140 to v0.0.146 otherwise lost 1 PostHog site and no React or Stripe sites. The acceptance criteria stand; Sentry prose matches count as intended removals.
What happens
An offline re-run of tech detection over a stored corpus (10,133 sites so far; identical stored pages and script bodies per site, only the engine differs) compared v0.0.140 with v0.0.146 (tech code at 9c5e5c1, #1379):
- Sentry: 188 sites on v0.0.140, 158 on v0.0.146. 30 lost, none gained.
- PostHog: 1 lost.
- All 30 sites send script bodies at the 512 KB page budget (bundles past the 256 KB head). An uncapped research build detects Sentry on all 30, so the code is there.
Why
Sentry.init has no hint. 183 other script-content detectors don't either, among them React (__REACT_DEVTOOLS_GLOBAL_HOOK__), posthog.init, Stripe(, GA4 gtag('config', 'G-, the ad pixels. Only 10 have one. Past the head, an unhinted detector can match only in the tail that sampleBundleExtras appends with whatever room the hint windows leave in TECH_BUNDLE_EXTRAS_BYTES (24 KB).
#1379 made the windows take more of that room:
MAX_HITS_PER_HINTwent from 24 to 48.- Hints that have patterns no longer cap kept windows (up to 512 scans).
- New hint literals arrived (
also.hints, the WordPress and stack fingerprints).
So the tail shrinks or disappears, and unhinted detections that used to land in it are lost.
Acceptance Criteria
- An unhinted
script-contentdetector is never worse off than on v0.0.140. Any of these would do: the tail keeps a reserved minimum share of the extras budget, the hint windows get a total budget, or the common unhinted detectors get hints (e.g.Sentry.init). - A test with a bundle larger than the head that has
Sentry.initnear the end and many hint hits earlier detects Sentry. - Re-running the corpus comparison shows no technology lost against v0.0.140 other than intended removals.
Related: #1387 (raising the caps would mostly hide this, but the budget split stays) and #1379.
nik
Activity
fix(tech-detect): keep a loader the string tracker loses, send the re…
fix(tech-detect): derive a search literal for every detector, share t…
fix(tech-detect): qualify windows in code, keep declared hints first,…
fix(tech-detect): keep a loader the string tracker loses, send the re…
fix(tech-detect): never cut a long span after an odd backslash run, s…
fix(tech-detect): move a reopened cut on until its opener completes n…
fix(tech-detect): probe the whole text a reopened cut will send, not …
test(tech-detect): drop a no-op replace in the extras budget test #1420
fix(tech-detect): derive a search literal for every detector, share t…
fix(tech-detect): qualify windows in code, keep declared hints first,…
fix(tech-detect): keep a loader the string tracker loses, send the re…
fix(tech-detect): never cut a long span after an odd backslash run, s…
fix(tech-detect): move a reopened cut on until its opener completes n…
fix(tech-detect): probe the whole text a reopened cut will send, not …
test(tech-detect): drop a no-op replace in the extras budget test #1420
nc9 commentedon Oct 31, 2026
Verified against main after v0.0.151 (the search-literal, shared-extras and reserved-tail change landed). Met and ticked: criteria 1 and 2 (every detector gets a window and a late
Sentry.initsurvives hundreds of earlier hint windows; extras-budget tests pass, 86). Open: criterion 3, the corpus re-run against v0.0.140. The corpus run on this change is reported to the maintainers (about 2,100 more detections than v0.0.150, all previous losers recovered) but the result is not recorded in this issue. Leaving this open until it is posted here.nik
nc9 commentedon Nov 4, 2026
Acceptance check against main d7e9b44 (v0.0.167). Criteria 1 and 2 stay ticked. Criterion 3 is not met as worded.
Result: 2,410 pairs lost, 8,061 gained. The classification of the losses:
The mechanism this issue describes (the bundle tail crowded out by hint windows) shows no loss on this corpus: the Sentry, PostHog, React and Stripe losses are fingerprint, prose or CSP evidence. Sentry went 591 to 1,291 and PostHog 998 to 2,358.
What blocks the box: a second true-positive class, 105 pairs on 76 sites (0.2%), where a real loader sits in a delayed-loader wrapper script type (WP Rocket and similar) that v0.0.165 now reads as data. That is not an intended removal. It is tracked on #1550; a fix is in progress and not shipped. Once it ships and the corpus is re-run, this box can be ticked.
Left open for 3.
nik
nc9 commentedon Nov 5, 2026
Acceptance check against main 7e8416b (v0.0.169). Criteria 1 and 2 stay ticked (
extras-budget-1420.test.ts,hint-derive-soundness-1420.test.ts: pass on main, 144 and 85 pass across the runs below). Criterion 3, which was open only because of the wrapper-type losses, is now met.The 2,410 pairs lost against v0.0.140 (8,061 gained), by class:
CHANGELOG.mdanddocs/cloud/technologies.mdxas an intended recall change). These were classified by cause category, not each pair read by hand.The mechanism this issue describes (the bundle tail crowded out by hint windows) shows no loss: Sentry went 591 to 1,291 and PostHog 998 to 2,358, and the lost Sentry, PostHog, React and Stripe pairs are fingerprint, prose or CSP evidence.
The one non-intended class, 105 pairs on 76 sites where a real loader sat in a delay or consent wrapper script type, is fixed: re-run on the v0.0.169 tree over 2,795 sites (every site with a v0.0.165 loss, every shopify-payments site, a seeded 2,000-site slice of the rest), 77 of 77 deferred-loader pairs, 3 of 3 consent-wrapper pairs and 20 of 20 bundler-list pairs are detected again, 0 pairs lost against v0.0.167 anywhere in the slice. Every change from v0.0.165 to v0.0.169 only adds detections, so the remaining losses against v0.0.140 are a subset of the classified set above. Two small residuals stay as data by design (see #1550): 4
text/x-*custom-type pairs and 4 frameworkscriptLoaderJSON pairs.Caveats: the v0.0.169 pass covered 2,795 of the 37,248 sites, not all of them; the full-corpus classification is the v0.0.165 one. The wrapper pairs were classified by wrapper type and sampled. One Clarity pair named in #1422 is still unexplained and is tracked there.
Ticked 3; all three criteria are met, closing.
nik