Skip to content
Notifications
Clear all

Rolled out Codeium to 50 developers - what actually broke

3 Posts
3 Users
0 Reactions
1 Views
(@devops_barbarian_v3)
Reputable Member
Joined: 3 months ago
Posts: 132
Topic starter   [#18053]

Just rolled out Codeium to the whole dev crew. Predictably, the git history is now on fire.

The main breakage wasn't in the code—it was in the process. Our PR descriptions turned into AI-generated novels that explain nothing. Saw a 300-line PR described as "Added feature." Thanks, I guess. The other big one was the assistant defaulting to the newest, shiniest libraries in every suggestion, creating dependency conflicts with our current LTS stack.

We had to slam in some guardrails. Most crucial one was a pre-commit hook to sanitize PR descriptions. It strips the generic fluff and forces a conventional commit format.

```bash
#!/bin/bash
# pre-commit hook: clean-ai-pr-message
MSG_FILE="$1"
CURRENT_MSG=$(cat "$MSG_FILE")
# Remove common AI intro/outro boilerplate
CLEANED_MSG=$(echo "$CURRENT_MSG" | sed -e '/^This change/d' -e '/^The implementation/d' -e '/^In summary/d' -e '/^Overall,/d')
# Enforce a simple prefix check
if ! echo "$CLEANED_MSG" | grep -qE "^(feat|fix|chore|docs|style|refactor|test|perf): "; then
echo "ERROR: Commit message must start with conventional commit type (feat, fix, etc.)."
exit 1
fi
echo "$CLEANED_MSG" > "$MSG_FILE"
```

Also pushed team rules: no AI suggestions for `package.json`/`go.mod`/`pom.xml` without explicit approval. Rollback strategy was simple: kill the IDE extensions via our config management if chaos escalated. It didn't. This time.



   
Quote
(@carlr)
Estimable Member
Joined: 1 week ago
Posts: 92
 

The hook is a decent band-aid, but it's treating the symptom, not the infection. That regex will silently eat any commit message that happens to start with "This change" for legitimate reasons. I've seen AI-generated messages that were actually useful as a starting point until someone overengineered a sanitizer that nuked the one useful line.

The real problem you haven't solved yet is the library versioning. You're going to find that the AI's suggestion engine is trained on the latest PyPI or npm releases, so even if you pin constraints in your config, the AI will still propose `import foo` from a version that overlaps with your LTS only by accident. The only way we've dealt with that is to run a linting step that checks every import or dependency mention against a whitelist of allowed versions. That's a lot more work than a pre-commit hook, but the alternative is watching your CI break randomly because it suggested `kafka-python-ng` instead of the old `kafka-python` you're actually using.


Your fancy demo doesn't scale.


   
ReplyQuote
 ianb
(@ianb)
Trusted Member
Joined: 1 week ago
Posts: 52
 

That PR description problem hits home. We saw the same thing, but our fix was a bit lighter touch - we just added a comment in the PR template that says "Write a summary in your own words. If you used AI to draft the initial description, rewrite it." It puts the onus on the dev, not a script, and usually results in something more human that actually explains the "why."

The library issue is the real killer, though. Your pre-commit hook can't catch that. We ended up doing something similar to what user810 hinted at - a simple CI check that compares suggested imports in the diff against our internal wiki's approved libraries list. It's stopped so many "ooh shiny" distractions.


ian


   
ReplyQuote