feat: add DSH source for searching ~/.dsh session history - #112
Closed
catoncat wants to merge 5 commits into
Closed
Conversation
Support --source dsh for shlog by indexing zstd-compressed DSH session JSONL under ~/.dsh/sessions. The adapter accepts only real user turns (data.source.kind == "user") and assistant text blocks, rejecting injected runtime/plugin context, reasoning, and tool payloads. Includes zstd JSONL helpers, full-only projection, catalog wiring, config/identity updates, TS oracle stub, docs, and Rust integration tests.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Owner
Author
|
Review follow-up: all findings from two review rounds are fixed in the working tree (commits incoming). Round 1 — initial review (8 findings)
Round 2 — deep integration review (5 findings)
Verification
Deliberately not changed
Merge-readiness: review-side this is sufficient. Procedurally the fixes need to land as commits + push, then CI green on the new head. |
- catalog: reject plain .jsonl for dsh so format drift skips instead of failing strict sync - dsh: require createdAt/time per SOURCE_CONTRACTS; latest-wins title/model; parent-dir fallback native id - jsonl: tolerate torn final zstd frame (UnexpectedEof + incomplete frame); share one decode loop - sync: stop duplicating the operation prefix in scan failure messages - eval: checked acceptance fixture root lookup instead of a silent cast - skill: revert Chinese trigger list (no invocation-eval evidence) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The legacy TS oracle wraps non-fresh coverage into a check_coverage_then_retry find nextAction; native v8 emits find nextAction only for zero-result diagnosis and surfaces the same state via coverageBySource. The dsh oracle stub can never be synced in the fixture, so the oracle always emitted the advice for the all-source and unscoped find cases, failing the gate since e40df2f. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Owner
Author
Owner
Author
pull Bot
pushed a commit
to CrazyForks/sherlog
that referenced
this pull request
Aug 17, 2026
Replay reviewed PR catoncat#112 onto current main: rust/src → src, drop the deleted TypeScript oracle edits, add dsh to eval/types, keep zstd decode and native tests.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new public source
dshto Sherlog soshlog sync --source dshcan index zstd-compressed DSH session transcripts under~/.dsh/sessions, then search them withfind,read-page,read-range,list, andstats.What changed
SourceId::Dshwith--source dshanddsh:<native-id>session refs~/.dsh/sessionsrust/src/sources/dsh.rsadapter:user/messageonly whendata.source.kind == "user"assistant/messagetext blocks onlyDeltaUnsupported) like the Pi adapterfindremains consistentTests
cargo fmt --all -- --checkcargo test --workspace --all-targets --all-features --lockedcargo clippy --workspace --all-targets --all-features --locked -- -D warningscargo build --release --locked --bin shlognpm run check