Skip to content

Fix post-commit stats not showing with git aliases#801

Closed
svarlamov wants to merge 1 commit intomainfrom
fix/async-mode-alias-post-commit-stats
Closed

Fix post-commit stats not showing with git aliases#801
svarlamov wants to merge 1 commit intomainfrom
fix/async-mode-alias-post-commit-stats

Conversation

@svarlamov
Copy link
Copy Markdown
Member

@svarlamov svarlamov commented Mar 25, 2026

Summary

  • The async (wrapper-daemon) code path in handle_git parsed CLI args but never resolved git aliases before checking whether the command was "commit". When a user had e.g. alias.cm = commit, parsed.command was "cm" which didn't match the Some("commit") gate, so post-commit stats were silently skipped.
  • Added resolve_alias_invocation call in the async path (matching what the non-async wrapper path at line 190 already does).
  • Added a regression test (async_mode_post_commit_shows_stats_with_commit_alias) that configures alias.cm = commit, commits AI content via the alias, and asserts the stats bar appears.

Test plan

  • New test async_mode_post_commit_shows_stats_with_commit_alias passes
  • All existing async_mode_post_commit_* tests still pass (6/6)

🤖 Generated with Claude Code


Open with Devin

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 1 additional finding.

Open in Devin Review

The async (wrapper-daemon) code path parsed CLI args but never resolved
git aliases before checking whether the command was "commit". When a
user had e.g. `alias.cm = commit`, the parsed command was "cm" which
didn't match, so post-commit stats were silently skipped.

Add alias resolution in the async path (matching what the non-async
wrapper path already does) and add a regression test that commits via
an alias and asserts the stats bar appears.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@svarlamov svarlamov force-pushed the fix/async-mode-alias-post-commit-stats branch from 0a6f385 to f952517 Compare March 25, 2026 21:32
devin-ai-integration bot added a commit that referenced this pull request Mar 27, 2026
- Revert Clap removal from main.rs to preserve help/usage behavior
- Restore is_repo_creating early-exit for clone/init in async mode that
  was dropped during the refactor, preventing the daemon from receiving
  misleading wrapper state for repo-creating commands
- Port async_mode_post_commit_shows_stats_with_commit_alias test from
  PR #801 which is now subsumed by this PR's alias resolution changes
- Fix clippy match_like_matches_macro warning in is_read_only_notes_invocation

Co-Authored-By: Sasha Varlamov <sasha@sashavarlamov.com>
@devin-ai-integration
Copy link
Copy Markdown
Contributor

Closing this PR — #809 subsumes this fix. The alias resolution was moved before the async/sync branch point in #809, so commit aliases (like alias.cm = commit) are now resolved early enough for post-commit stats to work. The regression test from this PR has been ported to #809 as well.

@devin-ai-integration devin-ai-integration bot deleted the fix/async-mode-alias-post-commit-stats branch March 27, 2026 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant