Use get_ext_fullpath instead of get_outputs in ffiplatform._build #273
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
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
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
afonsojanu
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 asbuild_extreports exactly one output, butget_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 bareValueError: too many values to unpackinstead 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 elseget_outputs()would have reported.Added a regression test in
testing/cffi0/test_platform.pythat monkeypatchesbuild_ext.get_outputsto return an extra, nonexistent path (simulating the multi-extension situation from #246) and checks thatffi.verify()still compiles and loads correctly. Confirmed it reproduces the exact reportedValueError: too many values to unpack (expected 1)against the unpatched_build(), and passes with the fix. Ran the fulltesting/cffi0/test_platform.py,test_zdistutils.py,test_verify.pyandtest_verify2.pysuites locally, all green.