Repository navigation
fix: chunk-and-summarize execution, gemini-3.5-flash context window, and Phase 3/4 checklist fixes - #9
Merged
Conversation
added 2 commits
September 17, 2026 13:29
…ecklist discrepancies - Implement _chunk_patch_text and summarize_omitted_diffs in fallback.py to chunk and summarize BudgetDecision.omitted_diffs when strategy is BudgetStrategy.NEEDS_CHUNKING, merging summaries into the final commit prompt - Add gemini-3.5-flash to DEFAULT_MODEL_CONTEXT_WINDOWS in config.py with comment noting gemini-3.5-flash-lite remains default - Add RetryableError alias for RetryableProviderError in providers/base.py - Calibrate DEFAULT_TEMPLATE_OVERHEAD (500 tokens) against shipped templates (~206-330 tokens) - Update plan.md to remove stale Anthropic references and align with AGENTS.md and Phase 4 chunk-and-summarize delivery - Add tests in test_config.py, test_orchestrator.py, and test_providers.py - Closes #8
…hunking.py - Move chunk_patch_text and summarize_omitted_diffs to src/gitmate/chunking.py to cleanly separate LLM-dependent chunking logic from deterministic zero-LLM fallback.py - Re-export helpers in fallback.py for backward compatibility - Add dedicated test suite in tests/test_chunking.py (4 new tests, 163 total passing)
getdownandcode
added a commit
that referenced
this pull request
Sep 19, 2026
…d orchestrator consolidation - #1 (Blocker): Fail loud with exit code 1 on git errors, budget cap breaches, and gh CLI errors across pr-summary and changelog CLI commands. - #2: Prevent duplicate printing when no changes/commits exist by early returning None. - #3: Route diagnostic warnings, budget alerts, and error messages to stderr console (err_console) to keep stdout clean for Unix piping. - #4: Correctly parse and surface breaking changes (exclamation mark and BREAKING CHANGE: footers) in conventional commits and templates. - #5: Bump changelog template to version 2, including from_ref..to_ref range and explicit release headers. - #6: Support --title (-t) flag in pr-summary and propagate gh pr create failures. - #7: Remove dead head argument from fallback PR summary. - #8: Consolidate duplicate budget checking, safe telemetry recording, and heuristic token counters into orchestrator.py. - #9: Enforce strict type hints with CommitLogEntry in fallback.py.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR addresses all outstanding items from the consolidated Phase 3 & 4 review checklist and resolves issue #8.
Checklist Status & Direct Answers to Review
1. Phase 3 Review Items (PR #5)
Confirmed landed on
mainin commit9e6721f(PR #5) prior to this PR:GeminiProvider._generate_with_retry(resp.text == NoneraisesProviderUnavailablewithfinish_reasonthreaded) andCachedProvider.generate(if response.text.strip(): cache.set(...)).cli.py(config showandconfig set) derives settable/showable fields dynamically viadataclasses.fields(config_mod.GitmateConfig).test_cache_consulted_before_generateassertslen(provider.calls) == 1.fast_retriesfixture setswait_none()to avoid delays in unit tests.2. Live
template_versionCache Key Wiringfallback.py:L299-312,CachedProvideris instantiated withtemplate_version=active_template.version_key.version_keydynamically reads theversion: <v>header from the live template file (e.g.commit_conventional:v1) viaPromptTemplate.version_key(prompt.py:L39-41).test_template_version_bump_invalidates_cache_keyintests/test_prompt.pyandtest_template_version_bump_misses_old_entryintests/test_providers.py.3. Module Boundary Separation (
chunking.pyvsfallback.py)chunk_patch_text) and chunk summarization (summarize_omitted_diffs) into a dedicatedsrc/gitmate/chunking.pymodule.src/gitmate/fallback.pymaintains its original responsibility: pure, deterministic zero-LLM heuristic fallback generation (generate_fallback_message) plus the top-level orchestration workflow (generate_commit_message).tests/test_chunking.py.4.
plan.mdHistory &.gitignoregit log:plan.mdwas accidentally placed into.gitignorein the repository's initial scaffold commit0c8cc10bd1. Because of this, previous phase updates toplan.mdexisted only on the local filesystem and were never committed to git.plan.mdfrom.gitignoreand committed it into the repo, updating all stale Anthropic SDK references (lines 15, 57, 63, 90) to align withAGENTS.mdand Gemini default.5.
gemini-3.5-flashContext Window & Aliases"gemini-3.5-flash": 1_048_576inDEFAULT_MODEL_CONTEXT_WINDOWSwith a clarifying comment notinggemini-3.5-flash-liteis the default.RetryableError = RetryableProviderErroralias insrc/gitmate/providers/base.py.DEFAULT_TEMPLATE_OVERHEAD = 500calibration (~206–330 tokens measured from real templates).Test Suite
Closes #8