Skip to content

ci+docs(perf-gate): Phase D — enrich memory regression gate + OOM-fix evidence#148

Merged
aksOps merged 1 commit into
mainfrom
perf/enrich-oom-phase-d
May 13, 2026
Merged

ci+docs(perf-gate): Phase D — enrich memory regression gate + OOM-fix evidence#148
aksOps merged 1 commit into
mainfrom
perf/enrich-oom-phase-d

Conversation

@aksOps
Copy link
Copy Markdown
Contributor

@aksOps aksOps commented May 13, 2026

Summary

Phase D of the 2026-05-13 OOM-fix plan. Locks in the empirical gains from Phases A-C and documents the verified memory profile.

What lands

1. CI memory regression gate (.github/workflows/perf-gate.yml)

New "Enrich memory gate" step in the existing perf-gate job:

  • After the index gate runs, `/usr/bin/time -v` measures `codeiq enrich` peak RSS on fixture-multi-lang.
  • Asserts `peak RSS <= 307200 KB` (300 MB) — ~2.7× over the current 108 MB baseline. Tight enough to surface real regressions, loose enough to absorb CI runner variance.
  • Renders a markdown summary table on the workflow run page.

2. CLAUDE.md memory section

Records the verified ceilings post-fix:

  • fixture-multi-lang (22 files): ~108 MB (CI-gated at 300 MB)
  • airflow (9,151 files): 1.27 GB
  • ~/projects/ (49,076 files): 3.12 GB (vs pre-fix OOM exit 137)

Documents the three landed fixes (per-file tree parse, bounded goroutine pool, Kuzu buffer pool cap) and the tunable knobs (`--memprofile`, `--max-buffer-pool`, `--copy-threads`).

Plan completion

This is the fourth and final phase PR. After merge, every item in §"Completion promise" of the plan is satisfied:

Criterion Status
All Phase Tasks complete ✅ A1-A4, B1, C, D
4 phase PRs merged #145 (A), #146 (B), #147 (C), this one (D)
`time -v codeiq enrich ~/projects/` peak RSS < 4 GiB ✅ 3.12 GB empirically
`codeiq stats ~/projects/` returns non-empty graph ✅ 350k nodes, 33k files
`go test ./... -count=1 -race` green ✅ verified locally
perf-gate CI green gated by this PR's CI

Test plan

  • `go test ./... -count=1` — 877 pass
  • `go test ./... -race -count=1` — green
  • Local `codeiq enrich testdata/fixture-multi-lang` measured at 108 MB peak RSS via `/usr/bin/time -v` (well under the 300 MB CI gate)
  • CI on this PR — including the new enrich memory gate

…(Phase D)

Phase D of the 2026-05-13 OOM-fix plan — locks in the empirical
gain from Phases A-C with a CI gate plus documents the verified
memory profile in CLAUDE.md.

Adds to .github/workflows/perf-gate.yml a new step "Enrich memory
gate" that:
- /usr/bin/time -v's `codeiq enrich /tmp/fm-perf` after the existing
  index gate runs.
- Parses Maximum resident set size from the time output.
- Asserts peak RSS <= MAX_ENRICH_RSS_KB (300 MB / ~2.7x over the
  local 108 MB baseline). Tight enough to surface real regressions,
  loose enough to absorb CI runner variance.

Doc update — CLAUDE.md "### Performance" section now records:
- Pre-fix airflow peak: 3.8 GB → post-Phase-A+B+C: 1.27 GB
- Pre-fix ~/projects/ peak: OOM (exit 137) → post-fix: 3.12 GB
- Tunable knobs: --memprofile, --max-buffer-pool, --copy-threads

Plan: docs/superpowers/plans/2026-05-13-enrich-oom-fix.md Phase D.

Verification:
- go test ./... -count=1: 877 pass
- go test ./... -race -count=1: green (verified locally pre-PR)
- perf-gate workflow yml lints clean
@aksOps aksOps enabled auto-merge (squash) May 13, 2026 14:05
@aksOps aksOps merged commit 7313a0a into main May 13, 2026
13 checks passed
@aksOps aksOps deleted the perf/enrich-oom-phase-d branch May 13, 2026 14:06
aksOps added a commit that referenced this pull request May 14, 2026
Stale doc references after Phase 6 (Java deletion, #132) and the Kuzu
0.7.1 → 0.11.3 bump (#155 + #159).

- CLAUDE.md / PROJECT_SUMMARY.md: bump Kuzu 0.7.1 → 0.11.3,
  go-sqlite3 1.14.22 → 1.14.44, cobra to 1.10.2; note native FTS.
- AGENTS.md: rewrite "What this repo is" (no more "REST API");
  flip `mvn -B -ntp clean verify` → `go test ./...`; clarify that
  REST + React SPA were deleted in Phase 6 and won't return.
- SECURITY.md: rewrite scope. Drop the dead JAR / serve / REST API /
  React UI / H2 / Neo4j Embedded references. New in-scope list covers
  every codeiq subcommand, the 10 MCP tools (with `run_cypher` mutation
  gate called out), `.codeiq/cache/` (SQLite) + `.codeiq/graph/`
  (Kuzu), and `read_file` path sandboxing. Add the security CI
  workflows (CodeQL, Semgrep, OSV-Scanner, Trivy, Gitleaks, SBOM,
  Socket Security) + perf-gate to the hardening references.
- CHANGELOG.md: populate [Unreleased] with the OOM-fix saga
  (PRs #145-#148), the five correctness fixes (#149-#153), the
  Kuzu 0.7.1 → 0.11.3 bump (#155-#158), the FTS migration (#159),
  the Dependabot config rewrite (#154), and the enrich CLI knobs.

No code changes.

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant