Repository navigation
Description
Summary
Scanning hangs (effectively forever) during the static stage on v2.13.4 when the skill contains mixed-script content (CJK Markdown/JSON region packs + Sinhala text with U+200D ZWJ). A worker thread gets stuck in the token-gap text-view compaction path in artifacts.py and the scan never reaches the LLM stage. v2.12.0 completes the same scan fine.
Environment
- SkillSpector: v2.13.4 (installed from the git tag), Windows 10.0.26300 x64, Python 3.13.17 (uv-managed)
- Target: public skill
skills/geo-sleuthin Oldcircle/geo-sleuth @ 5aeec41 — ~100 files, ~5 MB, mixed-script content: CJK (regions/cn,regions/kg, …) and Sinhala with ZWJ (regions/lk) - Provider is irrelevant: the hang happens before any LLM call (reproduced with
openai_compatibleconfigured; static analyzers had already logged results before the stall)
Symptoms
Static analyzers run and log findings (behavioral_ast: 24, behavioral_taint_tracking: 5, mcp_rug_pull: 6, …), then progress stops mid static stage. Process CPU flatlines (≈250 s accumulated, +2 s over the next 18 minutes), zero network activity, no log output. Reproduced 3×; each time killed manually. The same target on v2.12.0 passes through this exact analyzer (static_patterns_system_prompt_leakage: 0 findings) and completes.
py-spy dump (worker thread, taken ~5 min into the stall)
Thread 40680 (idle): "ThreadPoolExecutor-1_0"
_is_token_gap_character (skillspector\artifacts.py:1685)
_token_bridging_gap_spans (skillspector\artifacts.py:1704)
_compact_gap_offsets (skillspector\artifacts.py:1873)
_next_offset (skillspector\artifacts.py:1897)
security_text_views (skillspector\artifacts.py:2411)
_scan_declared_marker_views (skillspector\nodes\analyzers\static_runner.py:2348)
_scan_all_views_with_parser_diagnostics (skillspector\nodes\analyzers\static_runner.py:2853)
_scan_all_views_detailed (skillspector\nodes\analyzers\static_runner.py:2539)
run_static_patterns_with_ledger (skillspector\nodes\analyzers\static_runner.py:3854)
node (skillspector\nodes\analyzers\static_patterns_system_prompt_leakage.py:1720)
guard_analyzer_node.<locals>.guarded (skillspector\inspection_ledger.py:1641)
(MainThread was parked in PregelRunner.tick → Pregel.stream, waiting on the executor.)
Analysis
The token-gap view compaction (_is_token_gap_character → _token_bridging_gap_spans → _compact_gap_offsets → _next_offset, reached from _scan_declared_marker_views) appears to have super-linear/pathological behavior on this mixed-script content — on v2.12.0 the same functions don't exhibit it, so this looks like a regression in 2.13.x. Related to #866 (same file, Unicode security-view per-character machinery dominating runtime), but distinct functions and severity: #866 describes ~20 KB/s slowness, here the scan effectively never terminates. The v2.13.4 release notes mention bounded parsing for several formats; this path seems to have escaped that treatment.
Workaround
Pin v2.12.0:
uv tool install --force skillspector --from "git+https://github.com/NVIDIA/[email protected]"
Suggested directions
- Early exit / cheap prefilter in the token-gap path when the text (or window) contains no gap-relevant characters
- Memoize gap spans / offsets per artifact across views (also helps perf: per-character Python loops in the Unicode security view dominate analysis (~20 KB/s) #866)
- Enforce a per-artifact static-analysis time cap (cf.
SKILLSPECTOR_MAX_STATIC_ANALYSIS_SECONDS_PER_ARTIFACT) insecurity_text_viewsso worst-case content degrades to a partial-coverage ledger entry instead of a silent hang
Activity
Varshith-Kali commentedon Nov 9, 2026
I can reproduce this and would like to work on a fix. The py-spy stack points at the token-gap compaction path in artifacts.py, and the v2.12.0 vs v2.13.4 split gives a clean bisection window. I will post a fix PR once I have a reproducer and regression tests.
fix(analyzer): bound token-gap compaction on mixed-script content (#1075