Repository navigation
Description
Problem Description
A comprehensive review of Phases 3 & 4 against the consolidated requirements and review checklist identified several discrepancies, missing deliverables, and bugs:
-
Missing Chunk-and-Summarize Execution for Large Diffs:
WhenTokenBudgetManager.assess()returnsBudgetStrategy.NEEDS_CHUNKING,generate_commit_messageinsrc/gitmate/fallback.pypreviously short-circuited directly to a template-based fallback (is_fallback=True), skipping LLM generation entirely. As specified inplan.mdand the Phase 4 review checklist, Phase 4 must consumeBudgetDecision.omitted_diffs(which preserves the untruncated original patches), summarize each chunk viaactive_provider.generate(), merge the summaries into the prompt'ssummary_note, and generate the final commit message (with graceful degradation if the provider fails). -
Missing
gemini-3.5-flashinDEFAULT_MODEL_CONTEXT_WINDOWS:
DEFAULT_MODEL_CONTEXT_WINDOWSinsrc/gitmate/config.pycontainedgemini-3.5-flash-lite,gemini-3-flash, andgemini-flash, but omittedgemini-3.5-flash(non-lite) and lacked an explanatory comment clarifying thatgemini-3.5-flash-literemains the configured default. Users settingmodel = "gemini-3.5-flash"receivedUnknownModelError. -
Missing
RetryableErrorAlias inproviders/base.py:
The transient error marker was namedRetryableProviderError, but the review checklist and callers expectRetryableError. -
Stale SDK and Provider References in
plan.md:
plan.mdretained stale references toAnthropicProvider(Phase 4, line 90) andAnthropic SDK token counting(Phase 2, lines 57 & 63, and design decision table line 15), contradicting the locked-in decision inAGENTS.mdspecifying Gemini as default. -
template_overheadCalibration:
The 500 token default estimate was evaluated against the actual template files (commit_conventional.txt: ~329 tokens,commit_plain.txt: ~210 tokens,pr_summary.txt: ~206 tokens), confirming 500 tokens provides a safe upper bound with ~170+ tokens of headroom for dynamic notes.
Proposed Resolution
- Implement
_chunk_patch_textandsummarize_omitted_diffsinsrc/gitmate/fallback.pyto execute chunk-and-summarize onNEEDS_CHUNKING, merging notes into the final prompt while retaining graceful degradation on provider failure. - Add
"gemini-3.5-flash": 1_048_576toDEFAULT_MODEL_CONTEXT_WINDOWSinsrc/gitmate/config.pywith explanatory comments. - Export
RetryableError = RetryableProviderErrorinsrc/gitmate/providers/base.py. - Update
plan.mdto eliminate stale Anthropic SDK references in favor of the Google GenAI SDK and document Phase 4 chunk-and-summarize delivery. - Add test coverage across
tests/test_orchestrator.py,tests/test_config.py, andtests/test_providers.py.
Activity
fix: address PR #12 review feedback on exit codes, stderr routing, an…