Description
Found in the #1542 review (import maps). This is pre-existing: v0.0.159 and #1542 behave the same.
What happens
Detectors that read the page HTML also match text inside content the browser never runs or renders. So a vendor URL or tag that only appears there counts as a detection:
- the raw text of a non-executed
<script>:type="application/json",application/ld+json,importmapand other non-JS types. Repro: a page whose only Stripe reference is the string"<script src=\"https://js.stripe.com/v3/\"></script>"inside an import map or JSON script detects Stripe. Real cases on the corpus include embed URLs listed in page-data JSON, and loader URLs in config blobs. <template>content, which is inert until script clones it. A real<script src=…>inside a<template>is detected today.- HTML comments that hold commented-out tags or loaders (
<!-- <script src="…gtag/js…"></script> -->).
Deliberate marker comments that some fingerprints rely on, such as WordPress plugin banners (Yoast, WP Rocket, WP Super Cache, W3 Total Cache), are real evidence and must keep working. So must CSS evidence inside <style> (Tailwind, Google Fonts, Font Awesome).
Corpus count
Measured on the Product Hunt corpus, 10-shard sample, 5,877 sites, v0.0.159. A (site, technology) pair counts when its only evidence sits in the region:
| Region | Pairs where it is the only evidence | Main technologies |
|---|---|---|
Non-executed <script> bodies (JSON, JSON-LD, import map) |
83 | youtube-embed 35, shopify-payments 7, clarity 6, unpkg 5, cookiebot 4, tailwindcss 4, react 3, google-tag-manager 3 |
<template> |
8 | youtube-embed 4, clarity, wistia, hubspot-forms, google-analytics-4 |
| HTML comments | 76 | about 14 are deliberate plugin banners (keep); about 10 are Font Awesome banners (likely real inline-SVG use); the rest look like commented-out vendor code |
<textarea> |
0 | |
<style> (for reference, correct evidence) |
114 | tailwindcss, google-fonts, font-awesome |
Some of the non-executed-script cases may be real usage that a client renders from data (for example a video list in page JSON that becomes YouTube embeds). Those are worth sampling before deciding they are false.
Acceptance Criteria
- html-type detectors do not match inside the raw text of a non-executed
<script>(JSON, JSON-LD, import map or any non-JavaScript type); the Stripe-string repro above detects nothing - A
<script src=…>, an iframe or any vendor markup inside<template>content is not detected - Commented-out tags and loaders inside HTML comments are not detected, while fingerprints that intentionally match a marker comment (WordPress plugin banners) still detect
- Real
<script src>tags and inline loaders outside those regions still detect, and CSS evidence inside<style>still detects - The regions are found by one bounded structural pass per page (no per-detector rescans); the existing hostile-input perf tests stay inside their budgets
- A corpus re-detect shows only the losses classified above (non-executed scripts, templates, commented-out code), with a sample of the removed youtube-embed cases checked by hand
nik
Activity
test(tech-detect): longer template-prefixed tag names do not pair as …
fix(tech-detect): inert pass follows the HTML tokenizer and keeps wha…
fix(tech-detect): matches inside data scripts, templates and comments…
docs(tech-detect): name the Klaviyo marker correctly in the comment-e…
fix(tech-detect): script types follow the HTML spec, per-detector com…
fix(tech-detect): an import map inside a template that never closes i…
fix(tech-detect): the import map rollback compacts in place instead o…
fix(tech-detect): matches inside data scripts, templates and comments…
docs(tech-detect): name the Klaviyo marker correctly in the comment-e…
fix(tech-detect): script types follow the HTML spec, per-detector com…
fix(tech-detect): an import map inside a template that never closes i…
3 remaining items
fix(tech-detect): shopify-payments reads data-script text again; 75 o…
docs(tech-detect): shopify-payments reads any data script, shopify-fe…
fix(tech-detect): shopify-payments reads data-script text again; 75 o…
docs(tech-detect): shopify-payments reads any data script, shopify-fe…
nc9 commentedon Nov 4, 2026
Acceptance check against main d7e9b44 (v0.0.167). The region pass shipped in v0.0.165 (06f9c27, hardened by 347147b and 0080fc5); the shopify-payments regression found by the corpus run was fixed in v0.0.167 (6d6fde3).
packages/tech-detect/tests/non-executed-1550.test.ts"data script bodies" (application/json, ld+json, importmap, speculationrules, x-template, text/html: a Stripe tag and a YouTube iframe written as a JSON string are not detected; same markup live is detected) and "script types" (custom types are data)<template>content<script src>and inline loaders outside those regions still detect;<style>CSS still detectsdetect.tsbuilds the region ranges in one pass per page and caches the stripped views; "bounds" and "hostile inputs stay linear" (100,000-element shapes, each under 4 s) passRan on main:
non-executed-1550.test.ts,importmap-1539.test.ts,link-rel-1539.test.tsandshopify-payments-data-script-1550.test.ts(101 pass),flight-script-narrow-1437.test.ts(60 pass).Corpus re-detect (offline, stored pages of 37,248 sites, v0.0.164 against v0.0.165, same harness):
Gaps:
rocketlazyloadscriptand similar WP Rocket types,o/js-lzl,pmdelayedscript,bv_inline_delayed_js,nitropack/inlinescript,javascript/blocked, a<hash>-moduleRocket Loader form,text/babel, a JSON blob listing a Next.jsscriptLoaderstrategy). Clarity and Facebook Pixel are hit hardest (16 of 18 Clarity losses). This also bears on criterion 4.Ticked 1, 2, 3 and 5; left open for 4 and 6 until the wrapper fix ships and the corpus is re-run.
nik
fix(tech-detect): the delay-word wrapper families no longer read cust…
fix(tech-detect): only known wrapper script types read as code, no su…
fix(tech-detect): bundler resource lists read like an import map, sup…
fix(tech-detect): read loaders in delay and consent wrapper script ty…
fix(tech-detect): the delay-word wrapper families no longer read cust…
fix(tech-detect): only known wrapper script types read as code, no su…
fix(tech-detect): bundler resource lists read like an import map, sup…
fix(tech-detect): the bundler resource list is read through its id fi…
nc9 commentedon Nov 5, 2026
Acceptance check against main 7e8416b (v0.0.169). The region pass shipped in v0.0.165. The wrapper-type fixes shipped in v0.0.168 (aabff54, fd1cf9e, 24aa05a, 856dc70) and the bundler list fix in v0.0.169 (31f7e95). The corpus pass below ran on the v0.0.169 release tree (its tree hash is identical to main's).
packages/tech-detect/tests/non-executed-1550.test.ts"data script bodies"<template><script src>and inline loaders still detect,<style>CSS still detectsnon-executed-1550.test.ts"what stays evidence" and "the wrappers a cache, CDN or consent tool runs later stay read";deferred-loader-types-1550.test.ts"a loader inside a wrapper type is detected" (every name inDEFERRED_LOADER_TYPES,packages/tech-detect/src/detect.ts: 23 exact names plus the Rocket Loader hash pattern) and "the bundler's ext_resources list: its script URLs are read". Corpus, 105 pairs that v0.0.165 had lost to wrapper types: 77 of 77 deferred-loader pairs recovered, 20 of 20 bundler-list pairs recovered (through the list'sidfield), 3 of 3 consent-wrapper pairs recovered, none lost again.non-executed-1550.test.ts"bounds" and "hostile inputs stay linear"Regressions the corpus run found, all fixed and re-measured: shopify-payments 76 to 1 sites (back to 76 of 76 in v0.0.167), delay and consent wrapper types (above), and the bundler list (above).
Residuals, judged acceptable and left as data by design: 4 pairs on 4 sites where inline JavaScript sits in a custom
text/x-*type that no known delay or consent tool writes, and 4 pairs (google-analytics-4) where a frameworkscriptLoaderJSON config lists a gtag URL. Both fall under the first criterion ("any non-JavaScript type", a JSON config), together under 0.03% of corpus sites. The docs state the rule ("an unknown wrapper type is cut until corpus evidence adds it",docs/cloud/technologies.mdx) and the changelog says ascriptLoaderJSON is still data. A new wrapper type is a one-line addition to the list when evidence shows up.Ran on main:
deferred-loader-types-1550.test.ts,non-executed-1550.test.ts,link-rel-1539.test.ts,importmap-1539.test.ts,supabase-preconnect-1539.test.ts(193 pass),shopify-payments-data-script-1550.test.ts,in-code-candidates-1422.test.ts,extras-budget-1420.test.ts,clarity-inbundle-1488.test.ts,clarity-inline-string-1509.test.ts(144 pass).Not verifiable from here: the wrapper pairs were classified by wrapper type and sampled, not each read by hand.
Ticked 4 and 6; all six criteria are met, closing.
nik