codeburn/tests
Resham Joshi b72e51e538
Support CLAUDE_CONFIG_DIRS for scanning multiple Claude data dirs (#208) (#288)
Adds an OS-delimited list env var so a user with more than one
Claude account or profile can scan all of them in a single run.
Sessions across every configured dir merge into one ProjectSummary
per project, matching the option-1 design agreed on the issue
thread (no per-account splitting in the data model or the UI).

Format: `CLAUDE_CONFIG_DIRS=~/.claude-work:~/.claude-personal`
on POSIX, `;`-separated on Windows. Precedence is
CLAUDE_CONFIG_DIRS > CLAUDE_CONFIG_DIR > ~/.claude. Empty entries
in the list are skipped, duplicates are deduped on resolved path,
and a missing or unreadable dir does not abort the scan of the
others. If the user explicitly set CLAUDE_CONFIG_DIRS but every
listed entry is unreadable, a one-line stderr hint identifies the
attempted paths and the platform's expected delimiter, so a
Windows user typing the POSIX `:` does not get a silent zero-row
result. `~` is now also expanded in CLAUDE_CONFIG_DIR for
consistency.

Implementation is intentionally narrow: only `claude.ts` changes,
plus a small parser-cache key update so a stale cache from one
config does not bleed into a run with a different config (matters
for the macOS menubar and GNOME extension which run as long-lived
processes). The merge happens for free in
`src/parser.ts:scanProjectDirs`, which keys ProjectSummary entries
by canonical cwd (or the sanitized slug as a fallback). Two
SessionSource entries with the same `project` field land under the
same key and combine their sessions, regardless of which dir they
came from. No new fields on SessionSource / SessionSummary /
ProjectSummary, and no UI changes.

Tests: 12 fixture-based cases covering the unset path (default
~/.claude), single-dir override via CLAUDE_CONFIG_DIR, multi-dir
override via CLAUDE_CONFIG_DIRS, ~ expansion, dedup of repeated
entries, leading/trailing/doubled delimiters, missing dir
tolerated, file-not-directory entry tolerated, empty
CLAUDE_CONFIG_DIRS falls back to single-dir env, and two
parser-level integration tests asserting (a) two sessions from
two dirs sharing one cwd produce one ProjectSummary with combined
totals and no `account`/`accountPath` fields anywhere, and (b)
two sessions sharing a slug but with different canonical cwds
still merge by slug at the project-rollup layer (option 1
behavior pinned so a future refactor cannot quietly swap to
cwd-aware merging without an explicit opt-in).

Supersedes the alternative implementation in #227, which builds
per-account attribution (option 2) instead.
2026-05-09 22:04:45 -07:00
..
fixtures/security test(security): add failing test for HIGH-1 prototype pollution 2026-04-17 08:32:18 +02:00
providers Support CLAUDE_CONFIG_DIRS for scanning multiple Claude data dirs (#208) (#288) 2026-05-09 22:04:45 -07:00
security feat(mac): native Swift menubar app + one-command install 2026-04-17 16:55:56 -07:00
bash-commands.test.ts chore: hoist Pi model sort + cover bash-utils edge cases 2026-04-16 02:02:32 -07:00
classifier.test.ts fix(classifier): surface skill name as subCategory for general turns (#203) 2026-05-04 06:26:45 +08:00
cli-date.test.ts Reject invalid --format and --period values instead of silently falling back (#258) 2026-05-06 23:03:41 -07:00
cli-export-date-range.test.ts feat(export): support custom date ranges 2026-05-05 23:18:48 -07:00
cli-json-daily.test.ts Expose per-day one-shot data in daily JSON output (#279) (#280) 2026-05-09 21:01:05 -07:00
cli-plan.test.ts feat(plan): subscription plan tracking with usage progress bar 2026-04-21 04:20:50 -07:00
compare-stats.test.ts fix(classifier): surface skill name as subCategory for general turns (#203) 2026-05-04 06:26:45 +08:00
currency-rounding.test.ts Menubar and CLI hardening from multi-agent audit (#257) 2026-05-06 22:15:11 -07:00
daily-cache.test.ts Validator hardenings on the bug-hunt batch (#254) 2026-05-06 19:50:40 -07:00
dashboard.test.ts fix(classifier): surface skill name as subCategory for general turns (#203) 2026-05-04 06:26:45 +08:00
date-range-filter.test.ts Menubar and CLI hardening from multi-agent audit (#257) 2026-05-06 22:15:11 -07:00
day-aggregator.test.ts fix(classifier): surface skill name as subCategory for general turns (#203) 2026-05-04 06:26:45 +08:00
export.test.ts feat(report): add per-model efficiency metrics 2026-05-05 23:36:59 -07:00
fs-utils.test.ts fix: pricing accuracy, stream leak, CSV injection hardening 2026-04-21 04:20:46 -07:00
mcp-coverage.test.ts Fix cache-write pricing and shell-quote server names in fix commands 2026-05-04 20:11:50 -07:00
menubar-json.test.ts feat(mac): native Swift menubar app + one-command install 2026-04-17 16:55:56 -07:00
minimax.test.ts feat: add MiniMax-M2.7 and MiniMax-M2.7-highspeed model pricing 2026-04-21 05:50:52 -07:00
model-efficiency.test.ts feat(report): add per-model efficiency metrics 2026-05-05 23:36:59 -07:00
models-hoist.test.ts Validator hardenings on the bug-hunt batch (#254) 2026-05-06 19:50:40 -07:00
models-report.test.ts Add codeburn models per-model + per-task breakdown command (#287) 2026-05-09 20:45:21 -07:00
models.test.ts fix: pricing accuracy, stream leak, CSV injection hardening 2026-04-21 04:20:46 -07:00
optimize-fs.test.ts fix: switch scanJsonlFile and parseSessionFile to readSessionLines to prevent OOM 2026-04-22 10:11:13 +00:00
optimize.test.ts Label optimize suggestions by destination (#281) 2026-05-08 23:30:53 -07:00
parser-claude-cwd.test.ts fix(parser): use Claude cwd for Windows project paths 2026-05-05 23:53:31 -07:00
parser-filter.test.ts test: cover filterProjectsByName include/exclude semantics 2026-04-16 15:49:57 -07:00
parser-mcp-inventory.test.ts feat(optimize): MCP tool coverage detector with cache-aware costing 2026-05-05 04:13:04 +03:00
plan-usage.test.ts feat(plan): subscription plan tracking with usage progress bar 2026-04-21 04:20:50 -07:00
plans.test.ts feat(plan): subscription plan tracking with usage progress bar 2026-04-21 04:20:50 -07:00
provider-registry.test.ts Add gpt-5.5 model display name for Codex 2026-05-02 08:57:44 -07:00