Skip to content

overview -p today still OOMs at 512MB after cache-load bounds (parse retention) #1505

Closed

Description

@iliaal

Problem

Follow-up to #1504. After the cache-load bounds (load retention 1.46GB -> 232MB), codeburn overview -p today still exits 134 at a 512MB heap cap after ~5.5 minutes. Heap-floor bisection puts the true requirement between 512MB and 1024MB (a 1GB run survives with heavy GC thrash).

Repro: same command/corpus as #1504.

Root cause (parse layer)

The same-day parse retains every provider's full turns co-resident through merge, day aggregation, and rendering: ParsedApiCall graphs (~600B serialized per call with tool sequences, dedup keys, per-call paths, name arrays) across ~1.2M calls. Per-field census on the reporter corpus: usage 114MB, toolSequence 105MB, deduplicationKey 50MB, per-call paths ~18MB (serialized, ~half corpus; heap is a multiple). Stripping alone is not sufficient while full sessions co-reside, so peak must track one provider instead of the corpus.

Fix

PR #1503 (stacked on #1502, branch fix/overview-aggregate-mode):

  • New opt-in stripForAggregate parse mode: per-call payloads the headline never reads are stripped per provider right after its summaries resolve (in place, single-owner); shell commands are extracted first (call.commands) for PR launch matching; userMessage stays (bounded, needed by prompts/corrections).
  • Engages only for the narrow shape needing no session payloads (today-only, all-provider, no project filters or day selection); every other caller keeps full sessions.
  • Shared parse memo bypassed in both directions; single-pass scope skipped, so stripped graphs never mix with full-session consumers.

Verification

  • overview -p today at 512MB: two consecutive exits 0 (was 134).
  • New lite-parity suite proves byte-identical rendered output and equal totals/days/models/categories on an isolated corpus; derivation-equivalence test covers the PR command extraction.
  • Uncapped lite vs full on the live corpus: identical row structure and mix-consistent totals.
  • Full suite + locks green, tsc clean.

Activity

  1. added
    bug
    area: cli
    status: has-pr
    on Sep 22, 2026
  2. iamtoruk commented on Sep 24, 2026

    @iamtoruk
    Member

    Fixed by #1542 and #1550: ranged loads keep only the cache members the range can use, and the session cache is stored in day pieces, so overview -p today reads only today's pieces. On a heavy synthetic corpus it now passes at a 384 MB heap cap (main failed at 1 GB). Thanks @iliaal for the diagnosis in #1503-#1509; it shaped this design.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: clibugstatus: has-pr

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions