Handle PR checks with no status contexts #242

Merged
stephen merged 1 commit from fix/241-null-pr-check-statuses into main 2026-08-09 00:54:16 +00:00
Owner

Fixes #241.

Summary

  • Treat CombinedStatus.statuses: null as an empty status list.
  • Print no checks reported on <sha> and return success for PRs whose head has no reported checks.
  • Keep JSON output as a normal combined-status object with statuses: [].

Null-list scan

Top-level list endpoints already go through client::decode_list, which normalizes a whole response body of null to Vec::new(). Existing nested list fields that Forgejo commonly returns as null already use deserialize_null_to_default (labels, assignees, requested_reviewers, branch-protection contexts). The unprotected list field matching this issue was CombinedStatus.statuses.

Verification

  • cargo test combined_status -- --nocapture
  • cargo run -- pr checks --repo rasterstate/assay-research 1 now exits 0 and prints no checks reported on 52c1f5a47d25b97a8b05690b3ba47ab3fa847046.
Fixes #241. ## Summary - Treat `CombinedStatus.statuses: null` as an empty status list. - Print `no checks reported on <sha>` and return success for PRs whose head has no reported checks. - Keep JSON output as a normal combined-status object with `statuses: []`. ## Null-list scan Top-level list endpoints already go through `client::decode_list`, which normalizes a whole response body of `null` to `Vec::new()`. Existing nested list fields that Forgejo commonly returns as `null` already use `deserialize_null_to_default` (`labels`, `assignees`, `requested_reviewers`, branch-protection contexts). The unprotected list field matching this issue was `CombinedStatus.statuses`. ## Verification - `cargo test combined_status -- --nocapture` - `cargo run -- pr checks --repo rasterstate/assay-research 1` now exits 0 and prints `no checks reported on 52c1f5a47d25b97a8b05690b3ba47ab3fa847046`.
Handle empty PR check status lists
All checks were successful
Forseti review / forseti review (advisory) (pull_request_target) Successful in 20s
ci / check (pull_request) Successful in 10m43s
ci / live-e2e (pull_request) Successful in 2m7s
ci / coverage (pull_request) Successful in 2m53s
8deb8a9da4

Forseti review

No blocking findings from the lead reviewer.

No inline findings.

  • PR: rasterstate/fj#242
  • Head SHA: 8deb8a9da44c
  • Review job: sha256:52b3f37c8627fc646b662f2a46eb6a657b9d83bda33bd73ac0a47584b3eb3c79
  • Provider pair: openai:gpt-5.5+anthropic:claude-haiku-4-5-20251001
  • Blocking findings: 0
  • Inline findings: 0
  • Model tokens: 31962 in / 1531 out (17202 from cache) ≈ $0.0837
  • Token source: GITHUB_TOKEN
  • Runner: 81126912a356
  • Run: https://rasterhub.com/rasterstate/fj/actions/runs/434
<!-- forseti:review {"version":2,"repo":"rasterstate/fj","pr":242,"head_sha":"8deb8a9da44cd1746a00c7c0e53f3f496f84b125","provider_pair":"openai:gpt-5.5+anthropic:claude-haiku-4-5-20251001","policy_version":"stub-policy-v1","prompt_version":"prompt-v2","context_fingerprint":"fnv64:63964ff839bd99ed","review_job_key":"sha256:52b3f37c8627fc646b662f2a46eb6a657b9d83bda33bd73ac0a47584b3eb3c79","base_sha":"6678442872e5de71b3fe5d14cb325bcc62cf60c6","role":"summary","status":"current"} --> ## Forseti review No blocking findings from the lead reviewer. _No inline findings._ - PR: `rasterstate/fj#242` - Head SHA: `8deb8a9da44c` - Review job: `sha256:52b3f37c8627fc646b662f2a46eb6a657b9d83bda33bd73ac0a47584b3eb3c79` - Provider pair: `openai:gpt-5.5+anthropic:claude-haiku-4-5-20251001` - Blocking findings: `0` - Inline findings: `0` - Model tokens: `31962 in / 1531 out` (`17202` from cache) ≈ `$0.0837` - Token source: `GITHUB_TOKEN` - Runner: `81126912a356` - Run: https://rasterhub.com/rasterstate/fj/actions/runs/434
forgejo-actions left a comment

Forseti review

No blocking findings from the lead reviewer.

No inline findings.

  • PR: rasterstate/fj#242
  • Head SHA: 8deb8a9da44c
  • Review job: sha256:52b3f37c8627fc646b662f2a46eb6a657b9d83bda33bd73ac0a47584b3eb3c79
  • Provider pair: openai:gpt-5.5+anthropic:claude-haiku-4-5-20251001
  • Blocking findings: 0
  • Inline findings: 0
  • Model tokens: 31962 in / 1531 out (17202 from cache) ≈ $0.0837
  • Token source: GITHUB_TOKEN
  • Runner: 81126912a356
  • Run: https://rasterhub.com/rasterstate/fj/actions/runs/434
<!-- forseti:review {"version":2,"repo":"rasterstate/fj","pr":242,"head_sha":"8deb8a9da44cd1746a00c7c0e53f3f496f84b125","provider_pair":"openai:gpt-5.5+anthropic:claude-haiku-4-5-20251001","policy_version":"stub-policy-v1","prompt_version":"prompt-v2","context_fingerprint":"fnv64:63964ff839bd99ed","review_job_key":"sha256:52b3f37c8627fc646b662f2a46eb6a657b9d83bda33bd73ac0a47584b3eb3c79","base_sha":"6678442872e5de71b3fe5d14cb325bcc62cf60c6","role":"summary","status":"current"} --> ## Forseti review No blocking findings from the lead reviewer. _No inline findings._ - PR: `rasterstate/fj#242` - Head SHA: `8deb8a9da44c` - Review job: `sha256:52b3f37c8627fc646b662f2a46eb6a657b9d83bda33bd73ac0a47584b3eb3c79` - Provider pair: `openai:gpt-5.5+anthropic:claude-haiku-4-5-20251001` - Blocking findings: `0` - Inline findings: `0` - Model tokens: `31962 in / 1531 out` (`17202` from cache) ≈ `$0.0837` - Token source: `GITHUB_TOKEN` - Runner: `81126912a356` - Run: https://rasterhub.com/rasterstate/fj/actions/runs/434
stephen deleted branch fix/241-null-pr-check-statuses 2026-08-09 00:54:16 +00:00
Sign in to join this conversation.
No description provided.