Title: extract --code-only hangs forever on large monorepo (no graph.json written); worker spins 100% in re.sub — reproduced on 0.9.53 and 0.9.54
Environment
- macOS 15.7.7 (Apple Silicon), Python 3.11.15 (uv-managed), graphifyy 0.9.53 and 0.9.54 (both reproduced)
- Corpus: DeepSeek Harness monorepo (dsh) v0.1.3-alpha.1, ~2,470 code files after excluding tests/snapshots via
.graphifyignore (**/tests/, **/*.spec.ts, **/*.test.ts, **/*.e2e.ts, snapshots/). Total repo incl. tests ≈ 4,037 files.
Steps to reproduce
- Add the
.graphifyignore exclusions above in repo root.
graphify extract . --code-only (default workers)
→ AST extraction progress freezes: parallel runs stall at ~97–99% (2400/2470; inside packages/ alone 3300/3362; also 3400/3415) and graph.json is never written.
- Variants all reproduce:
--max-workers 1/2/4/10, --no-dedup, 0.9.53 and 0.9.54.
- Serial run (
--max-workers 1) freezes earlier at 500/2469 (20%), also indefinitely.
- Repo subsets that are small (each top-level dir except
packages/) complete fine; a ~60-file repo (xiaohongshu-mcp) completes fine — so not a universal scale issue.
Diagnostics
- While frozen: the active worker shows 100% CPU and opens NO files (
lsof lists only the python binary).
sample (macOS) of the spinning worker shows 2485/2485 samples inside _sre_SRE_Pattern_sub → sre_search → sre_ucs1_match — i.e., a Python re.sub operating on a large UCS-1 (ASCII) string is the hot path. No traceback; process exits only when killed, with resource_tracker semaphore-leak warnings at teardown.
- Freeze point shifts with file set → looks content-triggered: likely a regex normalization/sanitization pass over large serialized per-chunk/per-file payloads that is pathologically slow (or catastrophic backtracking) for some content in this corpus.
Request
Could you check the post-parse regex normalization paths (e.g., anything running re.sub over chunk/file payloads) for patterns that are linearity-unsafe on large ASCII inputs? Happy to provide more logs/cache entries on request. This blocks graphify extract on moderately large TypeScript monorepos.
Notes
- I did not retain
graphify-out/cache (deleted between retries); can keep it on a repro run if useful.
- Corpus is a public GitHub repo:
deepseek-ai/deepseek-harness (tag v0.1.3-alpha.1).
Title:
extract --code-onlyhangs forever on large monorepo (no graph.json written); worker spins 100% inre.sub— reproduced on 0.9.53 and 0.9.54Environment
.graphifyignore(**/tests/,**/*.spec.ts,**/*.test.ts,**/*.e2e.ts,snapshots/). Total repo incl. tests ≈ 4,037 files.Steps to reproduce
.graphifyignoreexclusions above in repo root.graphify extract . --code-only(default workers)→ AST extraction progress freezes: parallel runs stall at ~97–99% (2400/2470; inside
packages/alone 3300/3362; also 3400/3415) andgraph.jsonis never written.--max-workers 1/2/4/10,--no-dedup, 0.9.53 and 0.9.54.--max-workers 1) freezes earlier at 500/2469 (20%), also indefinitely.packages/) complete fine; a ~60-file repo (xiaohongshu-mcp) completes fine — so not a universal scale issue.Diagnostics
lsoflists only the python binary).sample(macOS) of the spinning worker shows 2485/2485 samples inside_sre_SRE_Pattern_sub→sre_search→sre_ucs1_match— i.e., a Pythonre.suboperating on a large UCS-1 (ASCII) string is the hot path. No traceback; process exits only when killed, withresource_trackersemaphore-leak warnings at teardown.Request
Could you check the post-parse regex normalization paths (e.g., anything running
re.subover chunk/file payloads) for patterns that are linearity-unsafe on large ASCII inputs? Happy to provide more logs/cache entries on request. This blocksgraphify extracton moderately large TypeScript monorepos.Notes
graphify-out/cache(deleted between retries); can keep it on a repro run if useful.deepseek-ai/deepseek-harness(tag v0.1.3-alpha.1).