feat: informative commit messages with file names and change stats#149
Open
strix-tkellogg wants to merge 10 commits into
Open
feat: informative commit messages with file names and change stats#149strix-tkellogg wants to merge 10 commits into
strix-tkellogg wants to merge 10 commits into
Conversation
Add a `dura status` subcommand that shows daemon liveness and lists watched repositories, addressing issue #94. Features: - Shows whether `dura serve` is running with PID - Lists all watched repositories from config - Displays config file and cache directory paths - `--json` flag for machine-readable output - Exit code 0 when running, 1 when not running - Cross-platform PID liveness check via sysinfo crate Changes: - Cargo.toml: add sysinfo dependency - src/database.rs: add RuntimeLock::is_alive() with sysinfo-based process detection (replaces need for platform-specific code) - src/main.rs: add status subcommand, --json flag, status() handler - tests/status_test.rs: 6 integration tests covering all scenarios - tests/util/dura.rs: add run_output() helper for capturing full output Closes #94
When a repository has been initialized but has no commits yet, repo.head() returns ErrorCode::UnbornBranch. Previously this propagated as an error, causing noisy log spam every poll cycle. Now capture() handles unborn branches by: - Using "dura/unborn" as the branch name - Diffing against an empty tree (all files are new) - Creating the initial commit with no parents - Transitioning to normal branch naming once the user commits Also removes a leftover dbg!() macro from poll_guard.rs that printed to stderr on every change detection. Fixes #128 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- actions/checkout@v3 → v4 - actions/upload-artifact@v3 → v4 - actions-rs/toolchain@v1 → dtolnay/rust-toolchain@stable (actions-rs is archived) - actions-rs/cargo@v1 → direct cargo commands (actions-rs is archived) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Allow dead_code on Stats struct (log.rs) - Use next_back() instead of last() on DoubleEndedIterator (metrics.rs) - Use is_some_and() instead of map_or(false, ...) (snapshots.rs) - Add explicit lifetime annotation on GitRepoIter return (config.rs)
- non_minimal_cfg: #[cfg(all(unix))] → #[cfg(unix)] - needless_borrow: remove & from default_value arg - redundant_closure: unwrap_or_else(|| fn()) → unwrap_or_else(fn) - iter_kv_map: .iter().map(|(k,_)|...) → .keys().map(|k|...) - for_kv_map: for (k, _) in &map → for k in map.keys()
ntapi 0.3.6 has misaligned references to packed struct fields (E0793) which Rust 1.94 now rejects as a hard error. The 0.3.7 release fixes this. Transitive dep via tokio → mio 0.7.14. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ntapi 0.3.7 still had E0793 (misaligned packed struct references). Updating tokio pulls mio 0.8 which drops the ntapi 0.3.x dependency entirely, leaving only ntapi 0.4.3 which compiles clean. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replaces the generic "dura auto-backup" commit message with useful context: file count, insertions/deletions, and base file names. Example: "dura: 3 files (+45/-12) model.py, config.rs, utils.rs" Branch names stay hash-based (stable across snapshots). The commit message is where users actually look when recovering, per #91. File names truncate at 72 chars to stay readable in git log. Closes #91 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
tkellogg
approved these changes
Mar 28, 2026
Owner
tkellogg
left a comment
There was a problem hiding this comment.
Let's update the merge conflicts and then ship it
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
Replaces the generic
"dura auto-backup"commit message with useful context for recovery:Before: Every dura commit says
"dura auto-backup"— no way to distinguish snapshots without diffing each one.After: Commit messages show file count, insertions/deletions, and base file names (truncated at 72 chars for
git logreadability).Design choices
git log --oneline"dura auto-backup"Closes #91
Test plan
cargo check— compiles cleancargo clippy -- -D warnings— no warningscargo test— 29/29 passing (2 new tests for commit message content)🤖 Generated with Claude Code