Skip to content

Studio: make three RAG tests hold on Windows - #10530

Merged
danielhanchen merged 2 commits into
mainfrom
studio-rag-windows-suite
Sep 8, 2026
Merged

danielhanchen merged 2 commits into
mainfrom
studio-rag-windows-suite

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

The Document upload compatibility workflow 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_subdirectory asserted resolved.endswith("F16/bge-small.gguf"). _resolve_cached_gguf returns 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 second mkdir raises FileExistsError. The pair the case contrasts cannot exist on Windows, so that parametrization skips there.
  • test_a_real_crashing_child_moves_the_load_to_cpu had its probe child dereference null through ctypes. ctypes installs a structured exception handler on Windows, so that surfaces as an ordinary OSError, the child exits like any child that ran and reported, and device_can_allocate correctly reads that as a usable device. The test then saw cuda instead of cpu. On Windows it now calls os.abort(), which leaves the CRT exit status 3 that _died_by_signal already 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.

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.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 8, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-08T16:39:27.030049Z 3eff074 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 8, 2026
@danielhanchen
danielhanchen merged commit 5177a5b into main Sep 8, 2026
75 of 80 checks passed
@danielhanchen
danielhanchen deleted the studio-rag-windows-suite branch September 8, 2026 17:08
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant