π Bug Report: --auto flag bypasses safety check when AI generation fails
Summary
When running gitbun --auto, the tool is supposed to commit immediately without preview. However, if the AI model (Ollama or remote API) fails to respond β due to network issues, model not being pulled, or Ollama not running β Gitbun silently falls back to the rule-based engine but still proceeds with git commit automatically.
The problem: the rule-based fallback sometimes generates overly generic or malformed messages (e.g. feat(src): add index) and there is zero warning to the user that AI was skipped. In a CI/CD pipeline, this silently poisons the commit history.
Steps to Reproduce
- Install gitbun globally:
npm install -g gitbun
- Make sure Ollama is not running (so AI is unavailable)
- Stage some files:
git add .
- Run with auto flag:
gitbun --auto
- Observe that a commit is made with a fallback-generated message, with no warning printed
Actual Behaviour
- Gitbun detects AI is unavailable
- Silently switches to rule-based fallback
- Generates a generic message like
feat(src): add index
- Commits immediately with
--auto β no warning, no prompt, no abort
Why This Is a Problem
The --auto flag is documented as "DANGEROUS" in the README itself. That warning implies the user consciously accepts AI-quality output. But if AI silently fails and a degraded fallback message is committed in a CI pipeline, the commit history becomes noisy and the user has no idea why.
Environment
- OS: macOS 14 / Ubuntu 22.04
- Node.js: 20.x
- gitbun version: v1.13.0
- Ollama: not running (simulated failure)
Expected Behaviour
When --auto is used and AI generation fails:
- Gitbun should print a clear warning:
β AI unavailable β falling back to rule-based engine. Commit message quality may be reduced.
- If the fallback message confidence is below a threshold (e.g. generic single-word noun), Gitbun should abort the commit and exit with code 1 rather than committing silently.
- A
--allow-fallback flag should be introduced to explicitly opt into fallback behaviour in CI pipelines:
gitbun --auto --allow-fallback
This ensures --auto remains safe to use in automated workflows without hiding degraded output.
π Bug Report:
--autoflag bypasses safety check when AI generation failsSummary
When running
gitbun --auto, the tool is supposed to commit immediately without preview. However, if the AI model (Ollama or remote API) fails to respond β due to network issues, model not being pulled, or Ollama not running β Gitbun silently falls back to the rule-based engine but still proceeds withgit commitautomatically.The problem: the rule-based fallback sometimes generates overly generic or malformed messages (e.g.
feat(src): add index) and there is zero warning to the user that AI was skipped. In a CI/CD pipeline, this silently poisons the commit history.Steps to Reproduce
npm install -g gitbungit add .gitbun --autoActual Behaviour
feat(src): add index--autoβ no warning, no prompt, no abortWhy This Is a Problem
The
--autoflag is documented as "DANGEROUS" in the README itself. That warning implies the user consciously accepts AI-quality output. But if AI silently fails and a degraded fallback message is committed in a CI pipeline, the commit history becomes noisy and the user has no idea why.Environment
Expected Behaviour
When
--autois used and AI generation fails:β AI unavailable β falling back to rule-based engine. Commit message quality may be reduced.--allow-fallbackflag should be introduced to explicitly opt into fallback behaviour in CI pipelines:gitbun --auto --allow-fallbackThis ensures
--autoremains safe to use in automated workflows without hiding degraded output.