Description:
Problem
In code_review_graph/incremental.py:343-349, when the dependent file expansion
exceeds _MAX_DEPENDENT_FILES (500), the result list is silently truncated. A
warning is logged, but the caller receives a plain list with no indication
that it's incomplete:
if len(all_dependents) > _MAX_DEPENDENT_FILES:
logger.warning("Dependent expansion capped at %d files for %s", ...)
return list(all_dependents)[:_MAX_DEPENDENT_FILES]
The caller (_expand_dependents_for_build) processes the list as if it were
complete, meaning impact analysis may miss affected files without any signal
to the user.
Proposed Solution
Return a structured result or add a second return value indicating truncation,
so callers can propagate this information to the user (e.g., in MCP tool
responses or CLI output).
Alternatively, at minimum, surface the truncation warning in the build/update
output so the user knows the analysis may be incomplete.
Impact
Users running incremental updates on large repos may get incomplete impact
analysis without knowing it, potentially missing files that should be
re-parsed.
Description:
Problem
In code_review_graph/incremental.py:343-349, when the dependent file expansion
exceeds _MAX_DEPENDENT_FILES (500), the result list is silently truncated. A
warning is logged, but the caller receives a plain list with no indication
that it's incomplete:
if len(all_dependents) > _MAX_DEPENDENT_FILES:
logger.warning("Dependent expansion capped at %d files for %s", ...)
return list(all_dependents)[:_MAX_DEPENDENT_FILES]
The caller (_expand_dependents_for_build) processes the list as if it were
complete, meaning impact analysis may miss affected files without any signal
to the user.
Proposed Solution
Return a structured result or add a second return value indicating truncation,
so callers can propagate this information to the user (e.g., in MCP tool
responses or CLI output).
Alternatively, at minimum, surface the truncation warning in the build/update
output so the user knows the analysis may be incomplete.
Impact
Users running incremental updates on large repos may get incomplete impact
analysis without knowing it, potentially missing files that should be
re-parsed.