← Back to Pull requests

Use get_ext_fullpath instead of get_outputs in ffiplatform._build #273

Closed
unknown closed this pull request without merging on Oct 05, 2026 12:58 UTC
View on GitHub
unknown unknown commented on Aug 30, 2026 00:08 UTC
Author

Closes #246. Related to #229, which hit the same underlying crash.

_build() compiles a single extension and then unpacks its output with [soname] = cmd_obj.get_outputs(). That works as long as build_ext reports exactly one output, but get_outputs() reflects everything the command built, not just the extension we asked for. #246 shows a project with another native extension already registered ending up with two entries there, so the unpacking raises a bare ValueError: too many values to unpack instead of anything actionable. #229 is a beginner hitting the identical crash with no clue what went wrong, which is basically the same request: give a real answer instead of an opaque unpack failure.

build_ext.get_ext_fullpath(name) is the standard way to ask for the output path of one specific extension, so swapping to that sidesteps the whole problem: we get back exactly the file for the extension we passed in, regardless of what else get_outputs() would have reported.

Added a regression test in testing/cffi0/test_platform.py that monkeypatches build_ext.get_outputs to return an extra, nonexistent path (simulating the multi-extension situation from #246) and checks that ffi.verify() still compiles and loads correctly. Confirmed it reproduces the exact reported ValueError: too many values to unpack (expected 1) against the unpatched _build(), and passes with the fix. Ran the full testing/cffi0/test_platform.py, test_zdistutils.py, test_verify.py and test_verify2.py suites locally, all green.

Diff: 192 lines (+144 / -48) across 2 files Reviewer: afonsojanu Review duration: 52609m
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.36) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.36 · 192 lines diff across 2 files
0.36
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
56%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.315
Shallow Review Depth shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #273"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 56.8% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 35.9% (MEDIUM) · Higher = larger blast radius
35.9%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 56.8% · Lower = rushed or shallow review
56.8%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 15.5% · Safe to merge
15.5%