Repository navigation
Studio: make three RAG tests hold on Windows - #10530
Merged
Merged
Conversation
The document upload compatibility workflow runs the RAG suite on Windows for the first time, and three cases there fail on the test's own assumptions rather than on the code under test. - The cached GGUF lookup returns a filesystem path, so its assertion compared against a forward slash and could never match a Windows path. - The directory lease case builds a directory whose name ends in a space and a second one without it. Win32 strips the trailing space, so both names refer to one directory and the second mkdir fails; skip that parametrization there. - The crashing device probe child dereferenced null through ctypes, which installs a structured exception handler on Windows and turns that into an ordinary OSError. The child then exited like any reporting child and the probe called the device usable. abort() leaves the CRT exit status 3 the probe already recognises.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
pre-commit-ci
Bot
requested review from
Imagineer99,
LeoBorcherding and
oobabooga
as code owners
September 8, 2026 16:57
This was referenced Sep 8, 2026
danielhanchen
added a commit
that referenced
this pull request
Sep 8, 2026
tests/test_deliberate_crashes_suppress_cores.py fails on main: the child script in studio/backend/tests/test_rag_embeddings.py crashes on purpose without suppressing its core. The suppression is present, but #10530 added a Windows os.abort() branch above it while making these tests hold on Windows, so the abort path no longer had prctl(PR_SET_DUMPABLE, 0) dominating it. The guard does AST path analysis over every branch, and it is right: that path has no suppression in front of it. Both readings hold, which is why the fix is a move rather than a change of behaviour. #10530 is correct that a null read on Windows surfaces as an ordinary OSError and abort() is the real shape there. The guard is correct that a crash must not reach the host core_pattern handler. Hoisting the prctl call above the platform split satisfies both: it already sits in a try/except, prctl is Linux-only so it is a no-op on Windows, and Windows has no core_pattern to suppress. Verified: tests/test_deliberate_crashes_suppress_cores.py 73 passed, studio/backend/tests/test_rag_embeddings.py 52 passed, and putting the abort back above the suppression fails the guard again.
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.
The
Document upload compatibilityworkflow now runs the RAG suite on a Windows runner, and its first complete run reported three failures. All three are the tests' own assumptions about the platform, not defects in the code under test.test_cached_gguf_is_found_in_a_subdirectoryassertedresolved.endswith("F16/bge-small.gguf")._resolve_cached_ggufreturns a filesystem path, so on Windows it comes back with backslashes and the assertion could never match. Compares path components now.test_directory_lease_contract_preserves_path_and_purpose[source ]creates a directory whose name ends in a space and a sibling without it, to prove the resolver keeps the name it was given. Win32 strips a trailing space from a path component, so both names are the same directory there and the secondmkdirraisesFileExistsError. The pair the case contrasts cannot exist on Windows, so that parametrization skips there.test_a_real_crashing_child_moves_the_load_to_cpuhad its probe child dereference null through ctypes. ctypes installs a structured exception handler on Windows, so that surfaces as an ordinaryOSError, the child exits like any child that ran and reported, anddevice_can_allocatecorrectly reads that as a usable device. The test then sawcudainstead ofcpu. On Windows it now callsos.abort(), which leaves the CRT exit status 3 that_died_by_signalalready recognises, and which is the shape a ROCm library death actually takes there.Evidence: staging run of the compatibility workflow on windows-latest,
3 failed, 840 passed, 22 skipped, the three above.Local:
test_rag_linked_folders.py,test_rag_embed_llama_server.py,test_rag_embeddings.py= 227 passed. Full runner on Linux (tests/studio/rag_upload_ci.py) = backend 844 passed / 21 skipped, frontend unit and typecheck clean, 63/63 browser cases across chromium, firefox and webkit.