Skip to content

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

Open
omkar-foss wants to merge 2 commits intochaoss:mainfrom
omkar-foss:add-msgdetect-replit
Open

Detect Replit trailers in commit messages, use confidence levels#26
omkar-foss wants to merge 2 commits intochaoss:mainfrom
omkar-foss:add-msgdetect-replit

Conversation

@omkar-foss
Copy link
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

Detect Replit commit trailers

1 participant