Repository navigation
Release v0.3.11
L6+L7 memory-overflow fixes.
Bug Fixes
Peak memory on the 70 GB host dropped from 60 GB to ~4 GB.
- L7-1 LZ4 buffer lifetime: remove the
RamFirstSourcesfield fromParsePhase, store the LZ4 compression buffer inPipelineCtx, and release it immediately after the parse phase reads it. Saves ~3 GB on a 10k-file repository. - L7-2 parse edge cleanup: after
ScopeResolutionPhaseclones edges into the graph,clear()+shrink_to_fit()result.edgesandseen_qns. Saves ~1 GB on large repositories. - L7-3 PipelineCtx drain:
LoadPhaseusesctx.removeto take ownership ofScanOutput/ResolveOutputand drops them immediately on return. Saves ~1–2 GB. - L7-4 RAM-first amplification factor:
evaluate_ram_first_budgetestimates peak RSS withtotal × 8and compares againstmax_rss_bytes / 2, correcting budget distortion. A 70 GB host allows ~2.2 GB repositories to use RAM-first; a 4 GB laptop allows only ~125 MB. - L7-5 LadybugDB buffer_pool cap: set
buffer_pool_size=4GB/max_db_size=16GB/max_num_threads=8explicitly in the productionSystemConfig. DuckDB defaults to 80% of physical memory (~56 GB on a 70 GB host), the main remaining bottleneck after L6. Saves ~52 GB. - L7-6 LSP on-demand startup:
enhance_with_lspfirst queries Function/Method rows, collects the set of extensions actually present, and onlystart()s the needed LSP providers. Pure-Rust repositories now start only rust-analyzer, saving ~3–5 GB. - L7-4/6 memory-overflow fix — RAM-first amplification + LSP on-demand
- L7-5/2/3 memory-overflow fix — LadybugDB cap + parse edge cleanup + ctx drain
- L7-1 memory-overflow fix — drop LZ4 buffers after parse phase
- bound force_kill_and_wait with KILL_TIMEOUT_MS + fail-loud warnings
- L6 memory-overflow fix — pipeline streaming + LSP kill timeout
Other Changes
- L6-1 pipeline streaming + ctx.take():
ResolvePhasenow usesctx.remove::<ScopeOutput>("scope")to take ownership of the Graph (replacingscope.graph.clone(), eliminating multi-GB deep-clones on large repositories); thePhase::runsignature changes from&PipelineCtxto&mut PipelineCtxto support exclusive borrowing forctx.remove. - L6-3 iterator API: change the signatures of
save_nodes/save_edges/write_nodes_csv_stream/write_edges_csv_streamfrom&[Node]/&[Edge]toimpl IntoIterator<Item = &Node/&Edge>, eliminatingVec<Node>/Vec<Edge>intermediate collections; a 64KBBufWriterreduces syscalls. - L6-3 LSP kill timeout:
force_kill_and_waituseswait_with_timeoutinstead ofchild.wait()(preventing permanent blocking on D-state/zombie processes); addKILL_TIMEOUT_MS=3000/SHUTDOWN_TIMEOUT_MS=5000constants. - | Dimension | CRITICAL | HIGH | MEDIUM | LOW | Conclusion |
- |------|----------|------|--------|-----|------|
- | tiangang SAST | 0 | 0 | 1 | 4 | ✅ release approved |
- | diting architecture | 0 | 1 (fixed) | 1 | 1 | ✅ release approved |
- | diting performance | 0 | 0 | 2 | 3 | ✅ release approved |
- All MEDIUM/LOW findings are non-blocking and have been recorded on the v0.3.12 agenda.
cargo clippy --lib --features "core"/"full" -- -D warnings: 0 warningscargo test --lib --features "full": 4461 passed, 0 failedcargo test --lib --features "core": 2260 passed, 0 failedcargo test --tests --features "full": 163 integration tests passed- pre-push hook: fmt/check/clippy/test/coverage 95%/audit/deny all green
- v0.3.11 — L6+L7 memory-overflow fix changelog + roadmap + version bump
- record L6 memory-overflow fix + fix version links
Full changelog: v0.3.10...v0.3.11