Stabilize cross-file usage accounting and verification#1
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b6169e3a65
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| let ts = entry.timestamp?; | ||
| let msg = entry.message?; |
There was a problem hiding this comment.
Preserve project attribution when including sidechain entries
This change makes parse_entry_with_debug accept every sidechain record, but parse_claude_file_with_debug still derives project_path from the immediate parent directory, so records from ~/.claude/projects/<project>/subagents/*.jsonl are now attributed to a synthetic subagents project instead of <project>. In environments that have subagent logs, project/session outputs will split totals incorrectly and undercount the real project after this commit.
Useful? React with 👍 / 👎.
|
/gemini review |
Scope session identity and Claude deduplication to the source log file so unrelated files no longer collapse into the same session or message bucket. Also correct offline GPT-5.4 fallback pricing, downgrade currency lookup failures to a USD fallback, and bring CLI/package/docs copy in line with the current Claude + Codex surface while cleaning pedantic clippy issues. Constraint: Existing workspace already contained local parser and integration-test edits; preserve them while landing the accounting fixes Constraint: Keep user-facing session_id output stable while fixing internal session identity Rejected: Replace session_id with full file paths in output | would fix collisions but degrade CLI readability and downstream JSON/CSV expectations Rejected: Keep currency conversion failure as a fatal error | makes offline and first-run usage unnecessarily brittle Confidence: high Scope-risk: moderate Directive: session_key is an internal scoping field only; do not expose it in user-facing output without an explicit migration plan Tested: cargo fmt -- --check; cargo clippy --all-targets --all-features -- -D warnings; cargo test Not-tested: Live LiteLLM schema drift and live exchange-rate fetch behavior
ff2a66f to
118ac4d
Compare
Summary
Testing