Skip to content

itdove/devaiflow#191: Add model information to commit message attribution#396

Merged
itdove merged 1 commit into
mainfrom
191
May 31, 2026
Merged

itdove/devaiflow#191: Add model information to commit message attribution#396
itdove merged 1 commit into
mainfrom
191

Conversation

@itdove
Copy link
Copy Markdown
Owner

@itdove itdove commented May 31, 2026

The changed files are in a different repo. I'll fill in the template based on the commit messages and context provided.

Jira Issue:

Description

Adds model-aware attribution to commit messages and PR descriptions. Previously, the Co-Authored-By line used a generic assistant name. This change introduces a model_provider utility (devflow/utils/model_provider.py) that detects the active AI model and includes its name in the Co-Authored-By trailer, giving clearer provenance for AI-assisted contributions.

Changes:

  • devflow/utils/model_provider.py — New utility to resolve the current model name for attribution
  • devflow/cli/commands/complete_command.py — Use model-aware Co-Authored-By line when creating commits
  • devflow/cli/commands/export_command.py — Use model-aware Co-Authored-By line when generating PR descriptions
  • tests/test_model_attribution.py — Unit tests for model attribution logic

Resolves: #191

Assisted-by: Claude

Testing

Steps to test

  1. Pull down the PR
  2. Run the test suite: pytest tests/test_model_attribution.py -v
  3. Start a session with a known model (e.g., Claude), make changes, and run daf complete
  4. Inspect the resulting commit message — verify the Co-Authored-By line includes the model name
  5. Run daf export and verify the PR description also contains the model-aware attribution
  6. Test with different model configurations to confirm the provider utility resolves correctly

Scenarios tested

  • Commit attribution includes model name when model info is available
  • PR export includes model-aware Co-Authored-By line
  • Fallback behavior when model information is unavailable
  • Unit tests for model provider resolution logic

Deployment considerations

  • This code change is ready for deployment on its own
  • This code change requires the following considerations before being deployed:

- Add get_co_authored_by_line() utility that resolves model name and
  provider from session profile and config
- Replace hardcoded "Co-Authored-By: Claude <noreply@anthropic.com>"
  with dynamic attribution across complete, export, and PR flows
- Add tests for model attribution logic covering provider resolution,
  fallback behavior, and line formatting

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@itdove itdove marked this pull request as ready for review May 31, 2026 20:50
@itdove itdove merged commit d7aac1c into main May 31, 2026
7 checks passed
@itdove itdove deleted the 191 branch May 31, 2026 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add model information to commit message attribution

1 participant