Skip to content

feat(review): surface files excluded from review coverage - #2589

Merged
naorpeled merged 8 commits into
The-PR-Agent:mainfrom
yefuyou:agent/review-coverage-footer
Aug 6, 2026
Merged

naorpeled merged 8 commits into
The-PR-Agent:mainfrom
yefuyou:agent/review-coverage-footer

Conversation

@yefuyou

@yefuyou yefuyou commented Aug 2, 2026 •

Copy link
Copy Markdown
Contributor

Background

get_pr_diff already returns remaining_files_list when the token budget excludes files, but /review discarded it. Reviewers therefore could not see which files were omitted.

Implementation

  • /review now calls get_pr_diff(..., return_remaining_files=True).
  • The returned remaining_files_list is stored while preserving compatibility with both tuple returns and the legacy full-diff string return.
  • Files skipped by the hard token stop are now added to remaining_files_list.
  • A coverage footer is appended when files remain, listing their full paths.
  • The footer is configurable through enable_review_coverage_footer in the [pr_reviewer] section and is enabled by default.
  • The configuration option is documented in docs/docs/tools/review.md.
  • The footer displays at most 50 files and appends ... and N more when additional files are omitted.
  • The footer uses <hr> to match the existing help-text formatting and remains positioned before the help-text block.
  • The original review content remains unchanged when no files are omitted or when the footer is disabled.
  • generate_full_patch is shared by /review and /describe. When large_pr_handling=true, pr_generate_compressed_diff carries remaining_files_list into subsequent large-PR processing iterations, so files retained after a hard token stop can be retried later and may ultimately appear in /describe's “Additional unprocessed files” list.
  • A regression test now verifies that a hard-stopped file is retained and processed in the next large-PR iteration without duplication or omission.

Tests

  • Focused test suite: 44 passed.
  • Full unit suite: 1577 passed, 1 skipped, 1 xfailed.
  • Pre-commit hooks and git diff --check passed.

Scope

This first cut does not implement reviewed partially tracking or large_patch_policy="clip" truncation tracking. It also does not add coverage percentages, thresholds, exclusion-reason categories, or unrelated refactoring.

Partially addresses #2565

@IsmaelMartinez

Copy link
Copy Markdown
Collaborator

Exactly the shape I meant. Two notes.

Keep the isinstance(output, tuple) branch — get_pr_diff returns a bare string from its under-budget early return (pr_processing.py:73-76) even with the flag set, so it is necessary, not defensive noise.

The gap: generate_full_patch has two exclusion paths but records only one. Too-large patches go into remaining_files_list_new (pr_processing.py:298-305); the hard token stop above (:292-295) does continue without recording. So on the biggest PRs the footer lists some excluded files and silently omits others — the false-confidence problem #2565 is about.

Minor: /describe caps the same list at 50 with "... and N more" (pr_description.py:289-296); worth mirroring.

@yefuyou

yefuyou commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

@IsmaelMartinez Thanks for the detailed feedback. I’ve addressed both points:

  • Files skipped by the hard token stop are now added to remaining_files_list, so both exclusion paths retain the omitted file names.
  • The coverage footer is capped at 50 files and displays ... and N more when the list is longer.

I kept the existing isinstance(output, tuple) branch to preserve compatibility with both tuple and legacy string return values, and added regression tests for both exclusion paths and the footer limit.

The focused test suite passes (41 passed), as does the full unit suite (1574 passed, 1 skipped, 1 xfailed). Pre-commit hooks and git diff --check also pass.

Another look whenever convenient would be appreciated.

@yefuyou
yefuyou marked this pull request as ready for review August 5, 2026 09:14
@qodo-free-for-open-source-projects

Copy link
Copy Markdown
Contributor

PR Summary by Qodo

Surface omitted files in /review output when token budget clips the diff

✨ Enhancement 🐞 Bug fix 🧪 Tests 🕐 20-40 Minutes

Grey Divider

AI Description

• Preserve and propagate the list of files omitted due to token-budget diff clipping.
• Append a review-coverage footer listing excluded file paths (capped at 50 entries).
• Add unit tests for hard-stop skipping, oversized patches, and footer rendering/limits.
Diagram

graph TD
A["PRReviewer"] --> B["get_pr_diff(return_remaining_files)"] --> C["generate_full_patch"] --> D("remaining_files_list")
A --> E["_prepare_pr_review"] --> F["Coverage footer"]
D --> F
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Count-only coverage notice
  • ➕ Avoids long comments on large PRs
  • ➕ Lower risk of exposing sensitive paths in public contexts
  • ➖ Reviewers still can't tell which areas were skipped
  • ➖ Harder to decide whether a rerun with higher budget is needed
2. Attach omitted list as a separate artifact/log output
  • ➕ Keeps the review comment concise
  • ➕ Can store full list without truncation
  • ➖ Less discoverable than inline review output
  • ➖ Provider/CI-specific UX; harder for non-CI usage
3. Structured metadata field in review payload (UI-specific rendering)
  • ➕ Cleaner separation of content vs. diagnostics
  • ➕ Allows richer categorization (hard stop vs. too-large vs. ignored)
  • ➖ Requires more plumbing across providers/outputs
  • ➖ May not display in plain markdown outputs without extra work

Recommendation: The current inline footer is the best first-step: it is immediately visible to reviewers, preserves backward compatibility with legacy get_pr_diff return types, and bounds output via a 50-file cap with an overflow count. Consider evolving toward structured metadata later if multiple exclusion categories or UI integrations become a priority.

Files changed (4) +197 / -10

Enhancement (1) +27 / -6
pr_reviewer.pyPropagate remaining-files from get_pr_diff and append coverage footer +27/-6

Propagate remaining-files from get_pr_diff and append coverage footer

• Updates /review prediction prep to call get_pr_diff(..., return_remaining_files=True) and handle both tuple and legacy string return types. Adds a review-coverage footer listing omitted files (max 50) and reporting how many additional files were excluded.

pr_agent/tools/pr_reviewer.py

Bug fix (1) +5 / -3
pr_processing.pyRecord skipped file when hard token limit forces a full-file skip +5/-3

Record skipped file when hard token limit forces a full-file skip

• When the hard token threshold is exceeded and a file is fully skipped, the file name is now appended to the remaining-files list. This prevents losing coverage information for files omitted due to the hard stop.

pr_agent/algo/pr_processing.py

Tests (2) +165 / -1
test_pr_processing_core.pyAdd tests for hard-stop omission and oversized patch omission behavior +50/-0

Add tests for hard-stop omission and oversized patch omission behavior

• Introduces unit tests ensuring generate_full_patch records files skipped after a hard token stop. Adds coverage for tracking files omitted due to an individual patch being too large while still including later files.

tests/unittest/test_pr_processing_core.py

test_pr_reviewer_core.pyAdd tests for tuple/string diff compatibility and coverage footer rendering +115/-1

Add tests for tuple/string diff compatibility and coverage footer rendering

• Adds async tests verifying _prepare_prediction requests remaining-files and supports both tuple and full-diff string returns. Adds footer tests for presence/absence, 50-file truncation, and overflow count formatting.

tests/unittest/test_pr_reviewer_core.py

@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Aug 5, 2026 •

Copy link
Copy Markdown
Contributor

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (1) 📎 Requirement gaps (3) 🎨 UX issues (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Action required

1. Review coverage lacks file counts 📎 Requirement gap ◔ Observability
Description
When diff compression occurs, the footer only lists excluded files and omits the required coverage
summary counts (total changed files and full/partial/skipped breakdown). This can mislead users
about how much of the PR was actually reviewed.
Code

pr_agent/tools/pr_reviewer.py[R301-303]

+                "\n\n---\n\n"
+                "⚠️ **Review coverage:** The following files were not included in this review "
+                "because of the token budget:\n"
Evidence
PR Compliance ID 6 requires a coverage summary with total changed-file count and
full/partial/skipped breakdown when diff compression occurs. The new footer text only states that
some files were not included due to token budget and does not provide the required counts/breakdown.

Review output includes explicit review coverage summary when PR diff is compressed
pr_agent/tools/pr_reviewer.py[298-308]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The review output footer added for token-budget compression does not include the required coverage summary counts: total number of changed files and a breakdown of reviewed-in-full, reviewed-partially, and skipped files.
## Issue Context
Compliance requires an explicit coverage summary when the PR diff is compressed so reviewers do not assume the entire PR was reviewed.
## Fix Focus Areas
- pr_agent/tools/pr_reviewer.py[298-309]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

2. ` footer ignores gfm_markdown` 📎 Requirement gap ☼ Reliability
Description
The review coverage footer in PRReviewer._prepare_pr_review() always appends an HTML `` separator
even when the git provider does not support gfm_markdown, which can cause the coverage disclosure
to render incorrectly or be suppressed on non-GFM providers (e.g., Bitbucket/Bitbucket
Server/CodeCommit). This risks violating the compliance requirement to clearly disclose review
coverage whenever files are omitted due to token budget limits.
Code

pr_agent/tools/pr_reviewer.py[R285-292]

+        if self.remaining_files_list and get_settings().pr_reviewer.enable_review_coverage_footer:
+            displayed_files = self.remaining_files_list[:MAX_REVIEW_COVERAGE_FILES]
+            markdown_text += (
+                "\n\n<hr>\n\n"
+                "⚠️ **Review coverage:** The following files were not included in this review "
+                "because of the token budget:\n"
+                + "\n".join(f"- `{file}`" for file in displayed_files)
+            )
Evidence
PR Compliance ID 6 requires the review output to explicitly disclose coverage when files are
omitted, but the newly added coverage footer unconditionally injects an HTML `` separator without
checking provider capabilities. Multiple providers explicitly declare gfm_markdown unsupported,
and elsewhere the codebase already conditions markdown/HTML output (including HTML help blocks) on
gfm_supported / git_provider.is_supported("gfm_markdown"), as seen in the use of
convert_to_markdown_v2(..., gfm_supported=...); by appending HTML after that conversion, the
footer bypasses the existing capability gating and may render raw HTML or inconsistently, making the
required disclosure unreliable.

Review output surfaces PR review coverage when compression skips or clips files
pr_agent/tools/pr_reviewer.py[285-296]
pr_agent/algo/utils.py[166-171]
pr_agent/tools/pr_reviewer.py[280-301]
pr_agent/git_providers/bitbucket_provider.py[231-237]
pr_agent/git_providers/bitbucket_server_provider.py[205-208]
pr_agent/git_providers/codecommit_client.py[57-60]
pr_agent/tools/pr_questions.py[69-75]
pr_agent/algo/utils.py[169-210]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The review-coverage footer appended by `PRReviewer._prepare_pr_review()` unconditionally injects an HTML `<hr>` separator even when `gfm_markdown` is unsupported. This can degrade or suppress the visibility of the coverage disclosure on non-GFM providers, undermining the compliance requirement to clearly disclose omitted files.
## Issue Context
- The main review body is generated via `convert_to_markdown_v2(..., gfm_supported=...)`, which already avoids HTML when `gfm_supported` is false.
- The new footer currently bypasses that safety by appending an HTML `<hr>` after conversion.
- Some providers explicitly report `gfm_markdown` unsupported (e.g., Bitbucket Cloud/Server, CodeCommit), and the codebase pattern is to emit HTML blocks only when `git_provider.is_supported("gfm_markdown")` is true.
- Implement a capability-aware separator: if GFM is supported, keep `"\n\n<hr>\n\n"`; otherwise use a markdown-only separator such as `"\n\n---\n\n"`.
- Update/adjust unit tests (notably `tests/unittest/test_pr_reviewer_core.py`) so expectations match provider capability.
## Fix Focus Areas
- pr_agent/tools/pr_reviewer.py[280-301]
- pr_agent/tools/pr_questions.py[69-75]
- pr_agent/git_providers/bitbucket_provider.py[231-237]
- pr_agent/git_providers/bitbucket_server_provider.py[205-208]
- pr_agent/git_providers/codecommit_client.py[57-60]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


3. Missing per-file exclusion reasons 📎 Requirement gap ◔ Observability
Description
The footer provides a single generic reason (token budget) and does not provide per-file exclusion
reasons or clipped-vs-skipped categorization. This reduces auditability of what needs manual
inspection.
Code

pr_agent/tools/pr_reviewer.py[R302-304]

+                "⚠️ **Review coverage:** The following files were not included in this review "
+                "because of the token budget:\n"
+                + "\n".join(f"- `{file}`" for file in displayed_files)
Evidence
PR Compliance ID 7 requires listing clipped/skipped file names along with an exclusion reason for
each. The new footer lists file names but provides only a single blanket reason (`because of the
token budget`) and no per-file reason/categorization.

Coverage summary lists clipped/skipped file names and exclusion reasons
pr_agent/tools/pr_reviewer.py[298-305]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The coverage footer lists excluded file names but does not provide an exclusion reason per entry (and does not distinguish clipped vs skipped).
## Issue Context
Compliance requires enumerating affected file names *and* providing a reason for each excluded entry to improve auditability.
## Fix Focus Areas
- pr_agent/tools/pr_reviewer.py[298-309]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


4. MAX_REVIEW_COVERAGE_FILES hardcoded 📘 Rule violation ⚙ Maintainability
Description
The new coverage footer limit is hard-coded to 50, rather than being controlled via Dynaconf
settings. This reduces configurability and violates the requirement to implement behavioral config
via settings files.
Code

pr_agent/tools/pr_reviewer.py[31]

+MAX_REVIEW_COVERAGE_FILES = 50
Evidence
PR Compliance ID 10 requires behavioral configuration to be controlled via Dynaconf settings rather
than hard-coded in code. The new constant MAX_REVIEW_COVERAGE_FILES = 50 introduces a hard-coded
behavior limit.

CLAUDE.md; AGENTS.md: Configuration Must Be Controlled via Dynaconf Settings Files (Not Hardcoded): CLAUDE.md; AGENTS.md: Configuration Must Be Controlled via Dynaconf Settings Files (Not Hardcoded): CLAUDE.md; AGENTS.md: Configuration Must Be Controlled via Dynaconf Settings Files (Not Hardcoded): CLAUDE.md; AGENTS.md: Configuration Must Be Controlled via Dynaconf Settings Files (Not Hardcoded): CLAUDE.md; AGENTS.md: Configuration Must Be Controlled via Dynaconf Settings Files (Not Hardcoded): CLAUDE.md; AGENTS.md: Configuration Must Be Controlled via Dynaconf Settings Files (Not Hardcoded): CLAUDE.md; AGENTS.md: Configuration Must Be Controlled via Dynaconf Settings Files (Not Hardcoded): CLAUDE.md; AGENTS.md: Configuration Must Be Controlled via Dynaconf Settings Files (Not Hardcoded): CLAUDE.md; AGENTS.md: Configuration Must Be Controlled via Dynaconf Settings Files (Not Hardcoded): CLAUDE.md; AGENTS.md: Configuration Must Be Controlled via Dynaconf Settings Files (Not Hardcoded): CLAUDE.md; AGENTS.md: Configuration Must Be Controlled via Dynaconf Settings Files (Not Hardcoded): CLAUDE.md; AGENTS.md: Configuration Must Be Controlled via Dynaconf Settings Files (Not Hardcoded): CLAUDE.md; AGENTS.md: Configuration Must Be Controlled via Dynaconf Settings Files (Not Hardcoded): CLAUDE.md; AGENTS.md: Configuration Must Be Controlled via Dynaconf Settings Files (Not Hardcoded): CLAUDE.md; AGENTS.md: Configuration Must Be Controlled via Dynaconf Settings Files (Not Hardcoded): CLAUDE.md; AGENTS.md: Configuration Must Be Controlled via Dynaconf Settings Files (Not Hardcoded): CLAUDE.md; AGENTS.md: Configuration Must Be Controlled via Dynaconf Settings Files (Not Hardcoded): CLAUDE.md; AGENTS.md: Configuration Must Be Controlled via Dynaconf Settings Files (Not Hardcoded): CLAUDE.md; AGENTS.md: Configuration Must Be Controlled via Dynaconf Settings Files (Not Hardcoded): CLAUDE.md; AGENTS.md: Configuration Must Be Controlled via Dynaconf Settings Files (Not Hardcoded): CLAUDE.md; AGENTS.md: Configuration Must Be Controlled via Dynaconf Settings Files (Not Hardcoded): CLAUDE.md; AGENTS.md: Configuration Must Be Controlled via Dynaconf Settings Files (Not Hardcoded): CLAUDE.md; AGENTS.md: Configuration Must Be Controlled via Dynaconf Settings Files (Not Hardcoded): CLAUDE.md; AGENTS.md: Configuration Must Be Controlled via Dynaconf Settings Files (Not Hardcoded): CLAUDE.md; AGENTS.md: Configuration Must Be Controlled via Dynaconf Settings Files (Not Hardcoded): CLAUDE.md; AGENTS.md: Configuration Must Be Controlled via Dynaconf Settings Files (Not Hardcoded): CLAUDE.md; AGENTS.md: Configuration Must Be Controlled via Dynaconf Settings Files (Not Hardcoded): CLAUDE.md; AGENTS.md: Configuration Must Be Controlled via Dynaconf Settings Files (Not Hardcoded): CLAUDE.md; AGENTS.md: Configuration Must Be Controlled via Dynaconf Settings Files (Not Hardcoded): CLAUDE.md; AGENTS.md: Configuration Must Be Controlled via Dynaconf Settings Files (Not Hardcoded): CLAUDE.md; AGENTS.md: Configuration Must Be Controlled via Dynaconf Settings Files (Not Hardcoded): CLAUDE.md; AGENTS.md: Configuration Must Be Controlled via Dynaconf Settings Files (Not Hardcoded)
pr_agent/tools/pr_reviewer.py[31-31]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`MAX_REVIEW_COVERAGE_FILES = 50` hard-codes a behavioral configuration value (how many excluded files are shown in the review coverage footer).
## Issue Context
Repository standards require configuration to be routed through Dynaconf settings (defaults under `pr_agent/settings/` and repo overrides via `.pr_agent.toml`) rather than being hard-coded in code.
## Fix Focus Areas
- pr_agent/tools/pr_reviewer.py[31-32]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


View more (1)
5. Unescaped filenames in footer 🐞 Bug ⛨ Security
Description
PRReviewer._prepare_pr_review interpolates remaining_files_list entries into Markdown using
single backticks without escaping, so filenames containing backticks/newlines can break formatting
and inject misleading extra lines into the published review comment. This can cause review output
spoofing/confusion (e.g., hiding which files were actually omitted).
Code

pr_agent/tools/pr_reviewer.py[R302-305]

+                "⚠️ **Review coverage:** The following files were not included in this review "
+                "because of the token budget:\n"
+                + "\n".join(f"- `{file}`" for file in displayed_files)
+            )
Evidence
The footer directly joins remaining_files_list entries into Markdown list items using inline code
spans, and the file list is derived from file.filename (PR-controlled) when building the
compressed diff output.

pr_agent/tools/pr_reviewer.py[298-309]
pr_agent/algo/pr_processing.py[221-247]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The review-coverage footer renders `remaining_files_list` values directly into Markdown code spans (`` `...` ``). Git filenames can legally contain backticks and newlines, which can terminate the code span or create additional Markdown lines, resulting in misleading/spoofed review output.
### Issue Context
`remaining_files_list` originates from the git provider’s diff metadata (`file.filename`) and is therefore PR-controlled input.
### Fix Focus Areas
- pr_agent/tools/pr_reviewer.py[298-309]
- pr_agent/algo/pr_processing.py[221-247]
### Suggested fix
1. Add a small helper to safely render filenames as Markdown code spans by:
- replacing newlines with a visible escape (e.g., `\\n`) or spaces
- wrapping with a backtick fence longer than any backtick run inside the filename (Markdown code-span rule), or alternatively using `<code>` with proper HTML escaping when `gfm_markdown` is supported.
2. Use the helper when building the footer list items.
3. Add/adjust a unit test covering a filename containing a backtick and a newline to ensure the footer remains well-formed.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


  • Author self-review: I have reviewed the code review findings, and addressed the relevant ones.

To customize comments, go to the Qodo configuration screen, or learn more in the docs.

Qodo Logo

Comment thread pr_agent/tools/pr_reviewer.py Outdated
Comment on lines +301 to +303
"\n\n---\n\n"
"⚠️ **Review coverage:** The following files were not included in this review "
"because of the token budget:\n"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

1. review coverage lacks file counts 📎 Requirement gap ◔ Observability

When diff compression occurs, the footer only lists excluded files and omits the required coverage
summary counts (total changed files and full/partial/skipped breakdown). This can mislead users
about how much of the PR was actually reviewed.
Agent Prompt
## Issue description
The review output footer added for token-budget compression does not include the required coverage summary counts: total number of changed files and a breakdown of reviewed-in-full, reviewed-partially, and skipped files.

## Issue Context
Compliance requires an explicit coverage summary when the PR diff is compressed so reviewers do not assume the entire PR was reviewed.

## Fix Focus Areas
- pr_agent/tools/pr_reviewer.py[298-309]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

@IsmaelMartinez IsmaelMartinez left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both points addressed and the coverage list is complete now. Full unit suite passes on the branch (1574).

The bot's MAX_REVIEW_COVERAGE_FILES complaint doesn't hold — /describe hardcodes the same 50 (MAX_EXTRA_FILES_TO_PROMPT, pr_description.py:289). Two small notes inline.

# Hard Stop, no more tokens
if total_tokens > max_tokens_model - OUTPUT_BUFFER_TOKENS_HARD_THRESHOLD:
get_logger().warning(f"File was fully skipped, no more tokens: {filename}.")
remaining_files_list_new.append(filename)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also changes /describe. With large_pr_handling=true (pr_description.py:218), pr_generate_compressed_diff feeds remaining_files_list back into the next generate_full_patch iteration, so hard-stopped files now get retried in a later patch and show up in the "Additional unprocessed files" list. I think that's the right behaviour, but it's a cross-tool change with no test on that path — worth a line in the description.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also changes /describe. With large_pr_handling=true (pr_description.py:218), pr_generate_compressed_diff feeds remaining_files_list back into the next generate_full_patch iteration, so hard-stopped files now get retried in a later patch and show up in the "Additional unprocessed files" list. I think that's the right behaviour, but it's a cross-tool change with no test on that path — worth a line in the description.

Added a note to the PR description documenting the /describe behavior when large_pr_handling=true.

Comment thread pr_agent/tools/pr_reviewer.py Outdated
# Add custom labels from the review prediction (effort, security)
self.set_review_labels(data)

if self.remaining_files_list:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The footer is appended after the help text and show_relevant_configurations, so it renders below the collapsed "Tool usage guide". Moving it above the help-text block keeps the warning next to the review.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The footer is appended after the help text and show_relevant_configurations, so it renders below the collapsed "Tool usage guide". Moving it above the help-text block keeps the warning next to the review.

Moved the coverage footer above the help-text block and added a regression test to keep the warning next to the main review output.

@qodo-free-for-open-source-projects

Copy link
Copy Markdown
Contributor

Code review by qodo was updated up to the latest commit fdba934

@IsmaelMartinez

Copy link
Copy Markdown
Collaborator

Thanks for turning that around so quickly. Both fixes verified, suite green here.

Two things left, and apologies for not catching the first one on my previous pass. The footer needs a new config option in the [pr_reviewer] section of configuration.toml, something like enable_review_coverage_footer: every other optional block in the review body has one, and always-on additions to the comment tend to get pushed back on. That needs a matching row in docs/docs/tools/review.md too.

The other is that the hard-stop fix quietly changes /describe, since skipped files now carry into the next iteration and get retried. Good change, but worth a test so it's deliberate rather than incidental.

Nit: <hr> instead of ---, to match the help-text block. #2565 stays open.

@qodo-free-for-open-source-projects

Copy link
Copy Markdown
Contributor

Code review by qodo was updated up to the latest commit 29d7b93

@yefuyou

yefuyou commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for turning that around so quickly. Both fixes verified, suite green here.

Two things left, and apologies for not catching the first one on my previous pass. The footer needs a new config option in the [pr_reviewer] section of configuration.toml, something like enable_review_coverage_footer: every other optional block in the review body has one, and always-on additions to the comment tend to get pushed back on. That needs a matching row in docs/docs/tools/review.md too.

The other is that the hard-stop fix quietly changes /describe, since skipped files now carry into the next iteration and get retried. Good change, but worth a test so it's deliberate rather than incidental.

Nit: <hr> instead of ---, to match the help-text block. #2565 stays open.

Thanks for catching these.

I added enable_review_coverage_footer under [pr_reviewer], enabled by default, and documented it in docs/docs/tools/review.md. The footer now uses <hr> and still renders before the help-text block while preserving the existing 50-file limit and ... and N more behavior.

I also added a deterministic regression test for the large-PR /describe path using the real pr_generate_compressed_diff and generate_full_patch flow. It verifies that a file skipped by the hard token stop is retained and processed in the next iteration without duplication or omission.

The focused tests pass with 44 tests, and the full unit suite passes with 1577 passed, 1 skipped, and 1 xfailed. Pre-commit and git diff --check also pass.

#2565 remains open, and this PR continues to partially address it. Thanks again for the detailed review.

@naorpeled

naorpeled commented Aug 6, 2026 •

Copy link
Copy Markdown
Member

LGTM, thanks @yefuyou, you rock 🔥

@naorpeled
naorpeled merged commit 90a3537 into The-PR-Agent:main Aug 6, 2026
1 check passed
IsmaelMartinez added a commit to IsmaelMartinez/pr-agent that referenced this pull request Aug 7, 2026
…ocker test image

The three `_prepare_prediction` tests added in The-PR-Agent#2589 rely on `asyncio_mode = "auto"`
from pyproject.toml, but the docker `test` target never copies that file (it adds only
requirements-dev.txt, pr_agent, tests and docker/mosaico). Inside the image pytest
therefore falls back to strict mode and fails all three with "async def functions are
not natively supported", turning main's build-and-test job red for every open PR.

Add the explicit `@pytest.mark.asyncio` marker the rest of the suite already uses.
Verified by running the suite with `-o asyncio_mode=strict`, which reproduces the CI
failure exactly before the change and is fully green after it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@qodo-code-review qodo-code-review Bot mentioned this pull request Aug 28, 2026
3 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants