Repository navigation
Conversation
Read final assistant messages from plain and zstd session histories, including legacy and versioned logs with concatenated compressed frames. Deduplicate messages by session, preserve cache token categories, and resolve provider model names through existing pricing. Wire focused and unified reports, configuration, help, docs, and the Nix build layer. Cover parsing and report output with regression fixtures and snapshots. Co-authored-by: oksure <[email protected]>
|
Caution Review failedThe pull request is closed. Walkthrough
Merge Risk:
|
|
@coderabbitai @cubic-dev-ai Please review the DSH adapter on d4d9780, especially legacy/versioned plain and concatenated zstd logs, final-message deduplication, provider pricing, and unified report integration. Local formatting, type/lint checks, full Rust/Node tests, Clippy, Hawk, and host flake checks pass. |
@ryoppippi I have started the AI code review. It will take a few minutes to complete. |
ccusage performance comparisonPR SHA: This compares the Rust PR release binary against the configured base package on the same CI runner. Package runtime diagnosticsCompares the PR package wrapper, the installed native optional dependency binary, and the workspace release binary on the same large fixture. This identifies whether slow package results come from JavaScript wrapper overhead, the published native binary build, or the Rust core itself. Fixtures: Claude
Committed fixture performanceCommitted small fixtures for stable PR-to-PR feedback and explicit Claude/Codex command coverage. Fixtures: Claude
Large real-world-shaped fixture performanceGenerated fixtures shaped from aggregate local log statistics: thousands of JSONL files, many small sessions, and a long tail of larger sessions. No real prompts, paths, or outputs are stored in the fixtures. Fixtures: Claude
Artifact size
Lower medians and smaller artifacts are better. CI runner noise still applies; use same-run ratios as directional PR feedback, not release guarantees. |
ccusage performance comparisonPR SHA: This compares the PR package against the configured base package on the same CI runner. Package runtime diagnosticsCompares the PR package wrapper, the installed native optional dependency binary, and the workspace release binary on the same large fixture. This identifies whether slow package results come from JavaScript wrapper overhead, the published native binary build, or the Rust core itself. Fixtures: Claude
Committed fixture performanceCommitted small fixtures for stable PR-to-PR feedback and explicit Claude/Codex command coverage. Fixtures: Claude
Large real-world-shaped fixture performanceGenerated fixtures shaped from aggregate local log statistics: thousands of JSONL files, many small sessions, and a long tail of larger sessions. No real prompts, paths, or outputs are stored in the fixtures. Fixtures: Claude
Artifact size
Lower medians and smaller artifacts are better. CI runner noise still applies; use same-run ratios as directional PR feedback, not release guarantees. |
|
I’ll treat the reported local checks as supporting context, not as independent verification. 🧠 Learnings used
|
There was a problem hiding this comment.
ℹ️ No blocking issues found — mergeable as-is.
Reviewed changes
- New
ccusage-adapter-dshcrate loading${DSH_HOME:-~/.dsh}/sessions/**/session{,.vN}.jsonl{.zstd}histories into usage entries, skippingassistant/chunkstreaming events and deduplicating finalassistant/messagerecords by(session_id, message_id)with newest filename generation winning. - Pricing keeps provider-qualified identities (
together_ai/...,ollama/...) with exact-plus-fallback lookup, while directdeepseekmodels resolve through the existing timestamped DeepSeek schedule; unknown models retain usage with zero cost and a missing-pricing marker. - Weekly buckets start Monday (matching OpenCode/Antigravity and the unified default), with daily/monthly/session shapes following the shared summarizers plus JSON and terminal-table snapshots.
- Full wiring:
dshCLI subcommand with daily/weekly/monthly/session reports, config schema anddshnamespace, unifiedadapter-allaggregation,BUILT_IN_AGENT_NAMES, last-window and timezone dispatch, Nix layer, docs, and npm schema artifact.
muse-spark-1.3-contributor (free via Pullfrog for OSS) | 𝕏

Adds DeepSeek Harness (
ccusage dsh daily,weekly,monthly, andsession) and includes DSH in unified reports. Reads legacy, v3, and v4 plain/zstd session logs, ignores streaming chunks, deduplicates final messages, and preserves cache token accounting. Provider model aliases resolve through bundled pricing, while direct DeepSeek models reuse the existing time-based rates.Includes CLI/help, config/schema, Nix build-layer wiring, documentation, and JSON/table snapshots. Regression fixtures cover concatenated and truncated zstd frames, repeated and cross-session message IDs, unversioned logs, unknown models, and weekly boundaries.
Validation:
direnv exec . just fmtdirenv exec . just typecheckdirenv exec . just testdirenv exec . cargo clippy --manifest-path rust/Cargo.toml --workspace --all-targets -- -D warningsdirenv exec . cargo hawk check --manifest-path rust/Cargo.toml -D warningsdirenv exec . just checkBuilds on the prior DSH adapter work by @oksure; the commit includes the requested co-author attribution.
Refs #1647
Summary by CodeRabbit
~/.dshor a custom location set withDSH_HOME.