Repository navigation
Conversation
BrahmendraBachi
force-pushed
the
feat/cache-batch-cluster-response
branch
from
November 15, 2026 14:31
08c8027 to
872f954
Compare
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.
fix: cache batched LLM clustering responses for resume on failure
Summary
Large repositories often trigger multi-batch LLM module clustering: the dependency graph is split into several batches, and each batch gets its own clustering call. If a run fails partway through (network error, rate limit, process kill), earlier batches are wasted and must be re-requested from the LLM.
This change persists successful batch results on disk and reuses them on retry, then cleans up the cache once clustering finishes and the module tree is saved.
Problem
Solution
docs/temp/clustering_batch_cache.json.cluster_modulesinvocation (e.g.__root__,auth/login).cluster_moduleslooks up each batch before calling the LLM; cache hits are merged into the running module tree.first_module_tree.json/module_tree.json), delete the cache file (CLI adapter and backend documentation generator).