Skip to content

fix(review): record coverage gaps on base read failures and accept empty diffs - #2326

Merged
dan-petty merged 1 commit into
mainfrom
fix/1907-failed-base-read-empty-diff
Oct 26, 2026
Merged

dan-petty merged 1 commit into
mainfrom
fix/1907-failed-base-read-empty-diff

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

Record an explicit coverage gap when base revision file reads fail during review instead of treating them as absent files. Remove broad exception handlers in static scanning and review evidence stages to avoid swallowing unexpected errors. Accept empty pull request diff bodies without raising errors, returning an empty string. Deduplicate pull request changed file listing in the command layer to use GitHubClient.get_pull_files.

Closes #1907

Change:
openspec/changes/archive/2026-10-26-1907-failed-base-read-empty-diff/

Fail-to-pass verification

Verified with devops ci fail-to-pass --base origin/main:

  • tests.test_github_client::test_get_pr_diff_empty_diff_returns_empty_string
  • tests.test_pr_cmd::test_the_changed_files_are_read_from_every_linked_page
  • tests.test_pr_cmd::test_a_malformed_files_entry_is_a_read_failure[no-status]
  • tests.test_pr_cmd::test_a_malformed_files_entry_is_a_read_failure[non-object]
  • tests.test_review_scope::test_a_base_revision_file_read_failure_records_a_coverage_gap

…pty diffs

Record an explicit coverage gap when base revision file reads fail during review instead of treating them as absent files. Remove broad exception handlers in static scanning and review evidence stages to avoid swallowing unexpected errors. Accept empty pull request diff bodies without raising errors, returning an empty string. Deduplicate pull request changed file listing in the command layer to use GitHubClient.get_pull_files.

Closes #1907

Change:
openspec/changes/archive/2026-10-26-1907-failed-base-read-empty-diff/

## Fail-to-pass verification
Verified with `devops ci fail-to-pass --base origin/main`:
- tests.commands.test_pr::test_a_pull_request_touching_a_suppressed_file_names_the_suppression
- tests.commands.test_pr::test_a_pull_request_touching_no_suppressed_file_prints_nothing
- tests.test_github_client::test_get_pr_diff_empty_diff_returns_empty_string
- tests.test_pr_cmd::test_a_malformed_files_entry_is_a_read_failure[no-status]
- tests.test_pr_cmd::test_a_malformed_files_entry_is_a_read_failure[non-object]
- tests.test_pr_cmd::test_the_changed_files_are_read_from_every_linked_page
- tests.test_review_scope::test_a_base_revision_file_read_failure_records_a_coverage_gap
@dan-petty
dan-petty force-pushed the fix/1907-failed-base-read-empty-diff branch from 4e61651 to 8cef06f Compare October 26, 2026 19:44
@dan-petty
dan-petty marked this pull request as ready for review October 26, 2026 19:51
@dan-petty
dan-petty merged commit a307ac0 into main Oct 26, 2026
16 checks passed
@dan-petty
dan-petty deleted the fix/1907-failed-base-read-empty-diff branch October 26, 2026 19:51
dan-petty pushed a commit that referenced this pull request Oct 26, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.6.5](v0.6.4...v0.6.5)
(2026-10-26)


### Bug Fixes

* **ai:** analyze pr previews under --dry-run and contacts no service
([#2327](#2327))
([c402b6d](c402b6d))
* **dashboard:** reject unknown tab option values and remove refresh_all
([#2310](#2310))
([27f8c60](27f8c60)),
closes [#1904](#1904)
* **deps:** renovate updates the image tags in k8s/ manifests
([#2325](#2325))
([b0ebce0](b0ebce0))
* **devcontainer:** isolate image build metadata from workspace settings
([#2309](#2309))
([7672c71](7672c71))
* **output:** remove duplicated check marks from success messages
([#2313](#2313))
([db7c3c4](db7c3c4))
* **review:** record coverage gaps on base read failures and accept
empty diffs
([#2326](#2326))
([a307ac0](a307ac0))
* **roadmap:** the roadmap runs on a rebuilt board, because GitHub
refuses to add 149 issues to board 2
([#2320](#2320))
([48c78ca](48c78ca))
* **security:** cloudflared 2026.10.4 replaces 2026.9.3, which trusts
eight compromised eMudhra certificates
([#2324](#2324))
([e6750be](e6750be))
* **security:** prevent directory traversal in response cache and
isolate storage
([#2321](#2321))
([1967695](1967695))
* **telemetry:** send project gauges through OTLP only
([#2288](#2288))
([#2315](#2315))
([aeaa52e](aeaa52e))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(review): a failed base-file read counts as an absent file, and an empty pull request diff raises is no diff

1 participant