Create log mechanism - #48
Conversation
…le stats when creating a snapshot.
…ked using dstrack.
…create-log-mechanism
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
|
Warning Review limit reached
Next review available in: 17 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughChangesDataset history command
Documentation site content
Animated documentation logo
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant User
participant LogCommand
participant CacheIndex
participant Store
participant RichTimeline
User->>LogCommand: Run dstrack log target
LogCommand->>CacheIndex: Synchronize index
CacheIndex->>Store: Read changed log.jsonl and HEAD
LogCommand->>CacheIndex: Query committed lineage
LogCommand->>RichTimeline: Render history
RichTimeline-->>User: Display snapshot timeline
Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (1)
docs/gen_logo.py (1)
14-20: 🧹 Nitpick | 🔵 TrivialConsider guarding the gen_logo.py ↔ logo-animation.js constant sync in CI.
These grid/projection constants (and the
LAYERSpalette below) are duplicated fromdocs/javascripts/logo-animation.js, and the header comment notes they must stay in sync or the animation's first frame diverges from the emitted SVG. I verified they currently match exactly, but nothing enforces it. Running this script in CI and diffing the committeddocs/assets/*(or asserting the constants against the JS source) would catch silent drift.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/gen_logo.py` around lines 14 - 20, Update the CI validation around gen_logo.py to regenerate the committed docs/assets output and fail when the generated files differ, or otherwise assert that its grid/projection constants and LAYERS palette match logo-animation.js. Keep the check focused on detecting drift between these two sources.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/index.md`:
- Around line 16-20: Remove the earlier duplicate “Why dstrack?” section from
docs/index.md, including its heading and copy, and retain the later canonical
section unchanged.
- Around line 18-20: Update the introductory description in docs/index.md to
remove the claim that dstrack can reproduce past data states. Replace it with
wording that accurately limits the capability to reconstructing recorded dataset
metadata or history, while preserving the surrounding explanation of auditing
and detecting changes.
In `@src/dstrack/_log.py`:
- Around line 84-95: Extend the exception handling around cache.sync,
_resolve_target, and cache.query_history to catch OSError and the SQLite
database error type used by the cache layer. Route these failures through the
existing console.error(str(e)) and typer.Exit(code=1) path, preserving the
current handling for DatasetNotFoundError, StoreCorruptionError, and ValueError.
---
Nitpick comments:
In `@docs/gen_logo.py`:
- Around line 14-20: Update the CI validation around gen_logo.py to regenerate
the committed docs/assets output and fail when the generated files differ, or
otherwise assert that its grid/projection constants and LAYERS palette match
logo-animation.js. Keep the check focused on detecting drift between these two
sources.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: f1e28096-5b88-47d8-b654-24541afce7c9
⛔ Files ignored due to path filters (3)
docs/assets/dstrack-favicon.pngis excluded by!**/*.pngdocs/assets/dstrack-logo.pngis excluded by!**/*.pngdocs/assets/dstrack-logo.svgis excluded by!**/*.svg
📒 Files selected for processing (18)
README.mddocs/API/paths.mddocs/API/store.mddocs/decisions/0003-local-snapshot-store-layout.mddocs/gen_logo.pydocs/getting_started.mddocs/index.mddocs/javascripts/logo-animation.jsdocs/roadmap.mdsrc/dstrack/_cli.pysrc/dstrack/_log.pysrc/dstrack/_log_render.pysrc/dstrack/cache.pysrc/dstrack/console.pysrc/dstrack/errors.pysrc/dstrack/store.pytests/test_log.pyzensical.toml
… cache sql database after syncing
Summary
Creates the mechanism to show the logs of a tracked dataset. Users are able to pass a dataset ID or path to display the changes over time for the given dataset if it has been tracked already.
Changes
Test plan
uv run pytestpassesSummary by CodeRabbit
New Features
dstrack logfor viewing dataset snapshot history by path or dataset ID.Documentation
Style