Repository navigation
Fix GitHub Check creation failing to parse response (#894) - #902
Conversation
bencher run --github-actions creates a Bencher Report GitHub Check on the PR head commit. Creating the check succeeded (HTTP 201), but octocrab 0.51 failed to deserialize the response: its CheckRun model parses the response pull_requests array into the full PullRequest type, whose node_id was a required String, while GitHub returns a minimal pull request representation without node_id. This surfaced as a misleading failure: Failed to create GitHub Check: JSON Error in pull_requests[0]: missing field node_id at line 1 column 4954 octocrab 0.52 relaxed PullRequest fields to Option to accept GitHub's SimplePullRequest payload, so the minimal check-run pull_requests objects now deserialize. Bump octocrab to 0.53. None of the octocrab APIs in use changed, and Bencher does not read PullRequest fields directly. Add a regression test that deserializes GitHub's minimal check-run pull_requests payload, and log on successful check creation.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
🤖 Claude Code ReviewPR: #902 This is a small, focused PR. Here's my review. Review: Fix GitHub Check creation failing to parse response (#894)SummaryThe PR fixes a parsing failure when creating GitHub Checks by bumping Strengths
Observations / Minor
VerdictLow-risk, well-scoped fix with a sensible regression guard. No bugs, security, or performance concerns. Recommend running Model: claude-opus-4-8 |
|
| Branch | claude/github-actions-workflow-docs-dzr53c |
| Testbed | intel-v1 |
Click to view all benchmark results
| Benchmark | Latency | Benchmark Result microseconds (µs) (Result Δ%) | Upper Boundary microseconds (µs) (Limit %) |
|---|---|---|---|
| Adapter::Json | 📈 view plot 🚷 view threshold | 4.69 µs(+2.32%)Baseline: 4.59 µs | 4.82 µs (97.28%) |
| Adapter::Magic (JSON) | 📈 view plot 🚷 view threshold | 4.56 µs(+2.17%)Baseline: 4.47 µs | 4.68 µs (97.56%) |
| Adapter::Magic (Rust) | 📈 view plot 🚷 view threshold | 25.56 µs(+0.43%)Baseline: 25.45 µs | 26.42 µs (96.72%) |
| Adapter::Rust | 📈 view plot 🚷 view threshold | 3.49 µs(+0.69%)Baseline: 3.47 µs | 3.59 µs (97.38%) |
| Adapter::RustBench | 📈 view plot 🚷 view threshold | 3.49 µs(+0.67%)Baseline: 3.47 µs | 3.58 µs (97.56%) |
Problem
bencher run --github-actionscreates aBencher ReportGitHub Check on the PR head commit. The check was actually created (GitHub returns201 Created), but octocrab0.51failed to deserialize the response, surfacing as a misleading failure:Reported in #894 (#894 (comment)) and reproduced at NomicFoundation/slang#1873.
Root cause
octocrab's
CheckRunmodel deserializes the responsepull_requestsarray into the fullmodels::pulls::PullRequesttype. In octocrab0.51,PullRequest.node_idwas a requiredString, but GitHub's create-check-run response returns only a minimal pull request representation (nonode_id), so deserialization failed. Thepull_requestsarray is only populated when the check is attached to a PR, which is why a plain push never surfaced it.Bug: XAMPPRocky/octocrab#902
Fix
octocrab
0.52relaxedPullRequestfields toOptionto accept GitHub'sSimplePullRequestpayload, so the minimal check-runpull_requestsobjects now deserialize. This bumps octocrab0.51->0.53.1; the existingcreate_check_run().send()path then just works.0.51->0.53.1(builder,create_check_run, issue comments,CommentId,CheckRunConclusion/CheckRunOutput). The one relevant breaking change (PR fields ->Option) does not touch Bencher, which never readsPullRequestfields directly. The only new transitive dependency ishttp-serde 2.1.1(MIT/Apache-2.0).pull_requestspayload, guarding against an octocrab downgrade reintroducing the bug.Release with fix: https://github.com/XAMPPRocky/octocrab/releases/tag/v0.52.0
Verification
cargo build -p bencher_cli(no breaking API changes)cargo test -p bencher_cli(17 pass, including the new test; doc tests pass)cargo clippy --no-deps -p bencher_cli --all-targets --all-features -- -Dwarnings(clean)cargo clippyonbencher_github_client(the other octocrab consumer; clean)cargo fmt(no changes)cargo deny checkwas not run locally (cargo-denynot installed in this environment); worth confirming in CI for the newhttp-serdedependency.