[PR #179] [MERGED] Improve checkpoint and post-commit performance #311

Closed
opened 2026-03-02 04:13:16 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/git-ai-project/git-ai/pull/179
Author: @acunniffe
Created: 11/2/2025
Status: Merged
Merged: 11/4/2025
Merged by: @acunniffe

Base: mainHead: feat/fix-checkpoints-empty


📝 Commits (10+)

  • a5fd83b wip checkpoint improvements
  • 8faedcd get inital files into checkpoint
  • 5035a83 remove odl code
  • c02f641 substantially faster post-commit
  • 71db638 checkpoints work with mockai
  • d98e4bd human manual checkpoints check everything changed in head
  • a87617e disable performance logging in tests. broke blame
  • e00c86a remove ignored tests
  • edc84a8 remove comment
  • 30a4b14 speed up rebase

📊 Changes

20 files changed (+994 additions, -1184 deletions)

View changed files

📝 src/authorship/authorship_log_serialization.rs (+92 -359)
📝 src/authorship/post_commit.rs (+59 -310)
📝 src/authorship/pre_commit.rs (+2 -0)
📝 src/authorship/rebase_authorship.rs (+32 -33)
📝 src/authorship/virtual_attribution.rs (+126 -48)
📝 src/commands/checkpoint.rs (+271 -358)
📝 src/commands/git_ai_handlers.rs (+52 -39)
📝 src/commands/hooks/reset_hooks.rs (+15 -4)
📝 src/commands/mod.rs (+0 -1)
📝 src/commands/stats_delta.rs (+51 -8)
📝 src/git/repo_storage.rs (+1 -0)
📝 src/git/status.rs (+73 -4)
📝 src/git/test_utils/mod.rs (+3 -0)
📝 src/utils.rs (+6 -4)
📝 tests/amend.rs (+2 -4)
📝 tests/initial_attributions.rs (+88 -0)
📝 tests/repos/test_repo.rs (+8 -0)
tests/repos_test.rs (+0 -12)
tests/snapshots/initial_attributions__initial_attributions_in_subsequent_checkpoint.snap (+5 -0)
📝 tests/squash_merge.rs (+108 -0)

📄 Description

This PR fixes a few bugs

  • Checkpoints were not using the edited_files optimizations for commits with no AI edits.
  • Post commit was still creating initial checkpoints instead of an INITIAL attestation entry. On Chromium we went from 2600ms to 242ms
  • Expensive calls to git diff that weren't needed

Still todo

  • Some Amend and reset tests are failing. need to debug

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/git-ai-project/git-ai/pull/179 **Author:** [@acunniffe](https://github.com/acunniffe) **Created:** 11/2/2025 **Status:** ✅ Merged **Merged:** 11/4/2025 **Merged by:** [@acunniffe](https://github.com/acunniffe) **Base:** `main` ← **Head:** `feat/fix-checkpoints-empty` --- ### 📝 Commits (10+) - [`a5fd83b`](https://github.com/git-ai-project/git-ai/commit/a5fd83bd224af025ded513fadc2d4816c6f1d978) wip checkpoint improvements - [`8faedcd`](https://github.com/git-ai-project/git-ai/commit/8faedcdfc1196fdc99631edfb11d7aac184ed035) get inital files into checkpoint - [`5035a83`](https://github.com/git-ai-project/git-ai/commit/5035a834261c0704882e122bda9ee45ba4494334) remove odl code - [`c02f641`](https://github.com/git-ai-project/git-ai/commit/c02f6411296568c60c43f963efa6da092f0b52dc) substantially faster post-commit - [`71db638`](https://github.com/git-ai-project/git-ai/commit/71db6380ae4cc59e6f307b30775e1ad89475278d) checkpoints work with mockai - [`d98e4bd`](https://github.com/git-ai-project/git-ai/commit/d98e4bd6b77039c0a021050b8e146e58e088543e) human manual checkpoints check everything changed in head - [`a87617e`](https://github.com/git-ai-project/git-ai/commit/a87617e8233a3cbaf042518623eda285dfe23ae6) disable performance logging in tests. broke blame - [`e00c86a`](https://github.com/git-ai-project/git-ai/commit/e00c86acf6670ded40ba9bc835a72d123100b942) remove ignored tests - [`edc84a8`](https://github.com/git-ai-project/git-ai/commit/edc84a86b9b064d359107d0550a47e65438af1f4) remove comment - [`30a4b14`](https://github.com/git-ai-project/git-ai/commit/30a4b1432a31997eeb67c9a9621a8bf4bf95b99b) speed up rebase ### 📊 Changes **20 files changed** (+994 additions, -1184 deletions) <details> <summary>View changed files</summary> 📝 `src/authorship/authorship_log_serialization.rs` (+92 -359) 📝 `src/authorship/post_commit.rs` (+59 -310) 📝 `src/authorship/pre_commit.rs` (+2 -0) 📝 `src/authorship/rebase_authorship.rs` (+32 -33) 📝 `src/authorship/virtual_attribution.rs` (+126 -48) 📝 `src/commands/checkpoint.rs` (+271 -358) 📝 `src/commands/git_ai_handlers.rs` (+52 -39) 📝 `src/commands/hooks/reset_hooks.rs` (+15 -4) 📝 `src/commands/mod.rs` (+0 -1) 📝 `src/commands/stats_delta.rs` (+51 -8) 📝 `src/git/repo_storage.rs` (+1 -0) 📝 `src/git/status.rs` (+73 -4) 📝 `src/git/test_utils/mod.rs` (+3 -0) 📝 `src/utils.rs` (+6 -4) 📝 `tests/amend.rs` (+2 -4) 📝 `tests/initial_attributions.rs` (+88 -0) 📝 `tests/repos/test_repo.rs` (+8 -0) ➖ `tests/repos_test.rs` (+0 -12) ➕ `tests/snapshots/initial_attributions__initial_attributions_in_subsequent_checkpoint.snap` (+5 -0) 📝 `tests/squash_merge.rs` (+108 -0) </details> ### 📄 Description This PR fixes a few bugs - [x] Checkpoints were not using the edited_files optimizations for commits with no AI edits. - [x] Post commit was still creating initial checkpoints instead of an `INITIAL` attestation entry. On Chromium we went from 2600ms to 242ms - [x] Expensive calls to `git diff` that weren't needed Still todo - [x] Some Amend and reset tests are failing. need to debug --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-02 04:13:16 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/git-ai#311
No description provided.