Skip to content

Detect Replit trailers in commit messages, use confidence levels#26

Merged
MoralCode merged 3 commits into
chaoss:mainfrom
omkar-foss:add-msgdetect-replit
Apr 25, 2026
Merged

Detect Replit trailers in commit messages, use confidence levels#26
MoralCode merged 3 commits into
chaoss:mainfrom
omkar-foss:add-msgdetect-replit

Conversation

@omkar-foss
Copy link
Copy Markdown
Contributor

Closes #23.

Currently Replit has 2 main AI products producing git commits - Agent for from scratch, and Assistant for extending existing projects. More info see: https://blog.replit.com/new-ai-assistant-announcement

Replit adds Replit-Commit-Author trailer for commits generated by both Assistant or Agent, where we have following cases:

  • Agent commits always have the trailer as all code in commit is gen and owned by agent
  • Assistant commits have the trailer when: (a) asst was used to summarize commit message only or (b) asst was used to write all code in commit or (c) asst wrote or changed only some code in commit
  • Assistant commits don't have the trailer when entire code and commit message is manual and committed using Replit ui.

So we can check and use Replit-Commit-Author trailer as follows:

  • if its Agent then medium confidence
  • if its Assistant then low confidence

Additionally we increase (+1) confidence if Replit-Commit-Session-Id, which denotes that commit was generated as part of an AI conversation or workflow.

Closes chaoss#23.

Currently Replit has 2 main AI products producing git commits - Agent
for from scratch, and Assistant for extending existing projects. More
info see: https://blog.replit.com/new-ai-assistant-announcement

Replit adds Replit-Commit-Author trailer for commits generated by both
Assistant or Agent, where we have following cases:
- Agent commits always have the trailer as all code in commit is gen and
owned by agent
- Assistant commits have the trailer when:
  (a) asst was used to summarize commit message only or
  (b) asst was used to write all code in commit or
  (c) asst wrote or changed only some code in commit
- Assistant commits don't have the trailer when entire code and commit
message is manual and committed using Replit ui.

So we can check and use Replit-Commit-Author trailer as follows:
- if its Agent then medium confidence
- if its Assistant then low confidence

Additionally we increase (+1) confidence if Replit-Commit-Session-Id,
which denotes that commit was generated as part of an AI conversation
or workflow.

Signed-off-by: Omkar P <45419097+omkar-foss@users.noreply.github.com>
Signed-off-by: Omkar P <45419097+omkar-foss@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@andrew andrew left a comment

Choose a reason for hiding this comment

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

Would be good to get a mention of this in the readme as well

Signed-off-by: Omkar P <45419097+omkar-foss@users.noreply.github.com>
@omkar-foss
Copy link
Copy Markdown
Contributor Author

Would be good to get a mention of this in the readme as well

Done

Copy link
Copy Markdown
Contributor

@MoralCode MoralCode left a comment

Choose a reason for hiding this comment

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

LGTM

@MoralCode MoralCode merged commit 497c2fb into chaoss:main Apr 25, 2026
2 checks passed
@omkar-foss omkar-foss deleted the add-msgdetect-replit branch April 25, 2026 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

Detect Replit commit trailers

3 participants