[PR #46] save AI thrash metrics in authorship log #220

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

Original Pull Request: https://github.com/git-ai-project/git-ai/pull/46

State: closed
Merged: Yes


Authorship logs now save computed value in the PromptRecord strut, they default to 0 and are forwards compatible.

total_additions - total count of every line this prompt added to the codebase, across checkpoints. This will count subsequent rewrites / changes to AI authored code
total_deletions - same as above, but for deletion. Note: Rewritten lines count as +1 deleted and +1 added.
accepted_lines: u32 - sum of all AI authored lines in the commit. Ie 1000 lines generated, 20 made it into PR.

Caveat: total_additions not a substitute for token consumption. Often times models regenerate surrounding lines of code on the path to make 1-2 targeted changes. It undercounts total usage and should not be a token proxy.

https://github.com/acunniffe/git-ai/issues/39

**Original Pull Request:** https://github.com/git-ai-project/git-ai/pull/46 **State:** closed **Merged:** Yes --- Authorship logs now save computed value in the `PromptRecord` strut, they default to 0 and are forwards compatible. total_additions - total count of every line this prompt added to the codebase, across checkpoints. This will count subsequent rewrites / changes to AI authored code total_deletions - same as above, but for deletion. Note: Rewritten lines count as +1 deleted and +1 added. accepted_lines: u32 - sum of all AI authored lines in the commit. Ie 1000 lines generated, 20 made it into PR. Caveat: `total_additions` not a substitute for token consumption. Often times models regenerate surrounding lines of code on the path to make 1-2 targeted changes. It undercounts total usage and should not be a token proxy. https://github.com/acunniffe/git-ai/issues/39
kerem 2026-03-02 04:12:59 +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#220
No description provided.