Fix/issue 770 matrix swallows errors - #1165
Draft
mborodii-prog wants to merge 4 commits into
Draft
Conversation
matrix.write() and matrix.run() submitted each permutation's sub-recipe to a ThreadPoolExecutor but never appended the returned Future to the futures list, so the "wait for all futures" loop always iterated over an empty list. Future.result() was never called, so any exception raised inside a worker thread (e.g. a missing column) was captured on the Future and silently discarded when the executor's `with` block exited, making the matrix write/run appear to succeed. Fixes #770 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Fd6Bm79CWu2ohhNdZD48Dz
Covers the fix for #770: a custom function that always raises inside a matrix run action, inside a matrix write action, and inside just one of several write permutations (partial failure) - all previously swallowed silently, now correctly propagate as exceptions. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Fd6Bm79CWu2ohhNdZD48Dz
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Fd6Bm79CWu2ohhNdZD48Dz
OpenAI's Responses API now returns 404 (model_not_found) for an unrecognized model instead of 400, so the per-row error string propagated by extract.ai reports status=404, not status=400. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KexjhJSpCUe24n5wjWihTW
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
matrixwrite/run silently swallowing worker-thread errors:executor.submit(...)futures were never appended to thefutureslist, so.result()was never called and any exception raised inside a permutation (missing column, bad write target, etc.) was silently discarded — the matrix write/run appeared to succeed even when it failed.matrix run, a full failure inmatrix write, and a partial failure (one of several permutations fails)in
matrix write.Fixes #770
Test plan
pytest tests/connectors/test_matrix.py— 24 passed