Repository navigation
Conversation
Replaces the three-line summary with a richer report:
- Per-source file counts during the scan phase
- Live progress bar (TTY-only, 100ms throttle, sub-char eighth-block fill)
- Splits skipped into already_ingested / empty / duplicate_id so the
number is actionable instead of opaque
- Total messages ingested + elapsed time
Before:
Scanning 2 source(s)...
Found 4650 session file(s)
Ingested: 4313, Skipped: 337, Errors: 0
After:
Scanning 2 source(s)...
4,294 in /Users/me/.claude/projects
356 in /Users/me/.codex/sessions
Found 4,650 session file(s)
[████████████████████] 100% · 4,650/4,650
Ingested 4,313 session(s) (812,540 messages) in 47.2s
Skipped 337: 337 empty
…inc#16, prime-radiant-inc#18) # Conflicts: # src/summarize.ts
…ime-radiant-inc#19 merge prime-radiant-inc#16 replaced ingest's single `skipped` counter with alreadyIngested / empty / duplicateId, deriving `skipped` from their sum, and dropped the no-start-time guard. prime-radiant-inc#19 keeps that guard and still increments `skipped`. Git merges the two cleanly: prime-radiant-inc#16's counters plus prime-radiant-inc#19's guard, referencing a variable that no longer exists. Tests pass; `tsc` does not: src/ingest.ts(108,9): error TS2304: Cannot find name 'skipped'. A session with no start time cannot be placed on a date, so it is as unusable as one with no messages and is counted as empty, which flows into the derived `skipped`. Keeping the guard rather than dropping it as prime-radiant-inc#16 did: without it a session with no timestamp is inserted with an empty started_at and misgroups. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Heads-up: this and #19 merge cleanly into code that does not compileFound while rebasing my own work onto this PR. Not a defect in #16 — it is an interaction, and it will land on whoever merges second. What happens This PR replaces the single Git merges the two without a conflict: #16's counters plus #19's guard, incrementing a variable that no longer exists. Why it will look like the other PR's fault The full test suite passes on the merged result — only Reproduce git checkout -b conflict-check origin/main
git merge <this-branch> && git merge <pr-19-branch>
bun test # passes
bun run typecheck # TS2304It cannot be pre-fixed in either PR. On #19 alone the counter is still The resolution I used, keeping the guard: count it as |
Summary
Replaces the three-line summary at the end of
engineering-notebook ingestwith a richer, scannable report. Same command, no flags, no behavior changes — only the output is different.Before:
After:
What changed
skippedcounter is now split intoalready_ingested/empty/duplicate_id. The aggregateskippedfield is preserved on the return object so existing tests still pass. Turns an opaque number into something you can act on (e.g. "all 337 skipped wereemptysessions, not duplicates").Implementation notes
ingestSessionsgains an optional 4th argumentonProgress?: (done, total) => void. Default omitted → existing call sites unchanged.skipped++now feed individual reasons; the returnedskippedis computed as their sum soingest.test.tskeeps passing without modification.process.stderr.isTTYso piped output (CI,>file) stays clean.process.stdout.columns, clamped to 20–40 chars.Test plan
bun test— all 92 tests pass (no test changes needed; existingingest.test.tsexercises the preservedingested/skipped/errorsfields)bun run typecheckcleanbun src/index.ts ingestagainst a 4,650-file dataset and confirmed the new output