Repository navigation
fix(iq_rating): unguarded OpenAI call, null message content, and type coercion (#13980) - #14708
Conversation
|
Thanks @dwaddle - I verified the guards in plugins/iq_rating/main.py
plugins/iq_rating/tests/test_iq_rating.py
Nice work on the per-batch isolation - that's the real fix in this change. The two items above are non-blocking; leaving merge sign-off to the human maintainers. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
… hermetic test_main.py, and register in checks-manifest (BasedHardware#13980)
|
Thanks @Git-on-my-level for the feedback! I've updated PR #14708 to resolve both review notes:
|
kodjima33
left a comment
There was a problem hiding this comment.
Good fix, but new test_main.py's Hygiene CI check fails with ModuleNotFoundError: requests - not actually hermetic as claimed; approve only, needs-tests label confirms.
… dummy requests module
|
Updated PR #14708 to ensure 100% hermetic stdlib execution under Hygiene CI:
|
|
Follow-up verification on the current head — both items from the earlier automated review are resolved, confirmed independently:
Also confirmed the production code is unchanged since kodjima33's approval — the follow-up commit only touched the two test files. Two small residual nits, both non-blocking:
Thanks @dwaddle for the quick, complete turnaround on the review notes. Dropping by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
aryanorastar
left a comment
There was a problem hiding this comment.
Verified on f411e8e.
Name-filter and IQ-score OpenAI paths now guard null message.content, non-dict score rows, and empty 200s (retain the batch). iq-rating-app-tests is registered. Complementary to merged #14682 (score-array parse), not a later copy.
Branch is CONFLICTING. kodjima APPROVE is size-gate. I am not merging.
kodjima33
left a comment
There was a problem hiding this comment.
Genuine bug fix for iq_rating: isolates per-batch network calls, guards null OpenAI message content, validates empty choices and coerces IQ/name types instead of crashing the whole batch. Resolves #13980, tests added, CI green. Confidence 5/5.
Summary
Resolves issue #13980 in the
iq_ratingplugin:requests.postcalls into per-batchtry...exceptblocks so network timeouts/errors retain existing batch items and allow remaining batches to proceed rather than aborting the entire function.AttributeErroronmessage.get('content').strip()when OpenAI returns choices withcontent: null.len(choices) > 0before indexing, and wrapsint(iq)andscore.get('name')in safe type coercions with fallback defaults.Quality Assurance & Pre-Push Verification
git diff --check: Passed with exact 0 formatting/whitespace errors.plugins/iq_rating/tests/test_iq_rating.pycovering null message content, empty choices, invalid IQ type coercion, and network exception isolation (100% pass rate).Failure-Class: none