generate_fallback_commit_message

Function generate_fallback_commit_message 

Source
pub fn generate_fallback_commit_message(diff: &str) -> String
Expand description

Generate a deterministic fallback commit message from diff metadata.

This is the last resort when:

  1. Agent output extraction failed
  2. Salvage attempt failed

§Arguments

  • diff - The git diff content

§Returns

A valid commit message based on changed files. The message is designed to:

  • Use “chore” type with an appropriate scope
  • Describe the change semantically (not just file names)
  • Pass validation (avoids bad patterns like file lists)