Commit ee8dd9b
committed
docs: enrich OOM-fix streaming-refactor plan + gitignore fix
Adds the comprehensive implementation plan for fixing the
`codeiq enrich` OOM at ~/projects/ scale (49k files / 434k nodes,
exit 137 on 15 GB host).
Plan structure: 4 phases (Quick wins -> TreeCursor -> Streaming
three-pass refactor -> Verification harness), 12 tasks total, each
shippable as one PR. Includes a ralph-loop execution recipe so the
loop can drive the plan to completion without human gates inside
each phase.
Research backing the plan:
- Empirical pprof on airflow (9,151 files): 91% allocations from
tree-sitter.(*Tree).cachedNode, peak RSS 3.8 GB
- Trajectory: istio 1.1 GB / airflow 3.8 GB / ~/projects ~9-15 GB
- Code walk: GraphBuilder dedup maps never released after Snapshot;
ServiceDetector emits 434k CONTAINS edges
- Kuzu defaults: 80% of system RAM for buffer pool, no streaming
Appender API in v0.7.1-v0.11.3 (issue #2739)
- ETL patterns: ID-only dedup + compact NodeIndex for linkers
(drops Properties/Annotations) fits ~35 MB at scale
Completion criterion (from plan):
/usr/bin/time -v codeiq enrich ~/projects/
must complete with peak RSS < 4 GiB, exit 0, populated graph.
Also fixes the .gitignore quirk that was preventing
`docs/superpowers/plans/*.md` from being trackable:
`docs/superpowers/*` ignored the plans/ directory itself, so the
later `!docs/superpowers/plans/*.md` negation couldn't take effect.
Added `!docs/superpowers/plans/` to un-ignore the directory first.1 parent 094cffd commit ee8dd9b
2 files changed
Lines changed: 834 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
110 | 115 | | |
0 commit comments