Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Principle:1broseidon Ketch JS Shell Detection

From Leeroopedia
Knowledge Sources
Domains Extraction, Heuristic_Detection
Last Updated 2026-10-27 00:00 GMT

Overview

A heuristic classifier that labels raw HTML as `"static"`, `"likely_shell"`, or `"ambiguous"` to decide whether a headless browser render is needed, with a cheap fast path and a conservative escalation gate.

Theoretical Basis

The detector runs on the fast HTTP path, so it must be cheap and conservative — a false positive costs an unnecessary browser render and a false negative returns shell garbage. The two-phase design:

Phase 1 (single pass): collect visible text and meaningful block count. ≥200 chars of visible text is `"static"` unless a "loading" page override or a strong client-rendered hydration/streaming marker and a script payload dwarfing the visible text escalate it. The conjunction (both gates) keeps false positives bounded: each gate alone is too noisy, but together they signal content that streams in client-side (Next.js RSC, Vue/SvelteKit/Qwik/Astro islands).

Phase 2 (low-text pages): look for cheap DOM-local corroborators before paying for a full-source lowercase match against framework markers. The result drives both the scrape pipeline's browser fallback and the crawl's adaptive per-host escalation.

Usage

Use when a fetch pipeline must decide between a cheap static fetch and an expensive render. Run the detector on the static fetch's HTML; escalate only on `"likely_shell"`. Feed the result into per-host statistics for crawl-wide escalation.

Related Pages

Implemented By

Uses Heuristic

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment