test(conftest): force ENGRAPHIS_EXTRACTOR=none for the offline gate - #166
Merged
Conversation
setdefault kept a real shell export working, so an owner machine exporting ENGRAPHIS_EXTRACTOR=llm_structured leaked a live LLM extractor into every ingest-path test. Under tests/conftest.py's DNS stub the extraction call hangs instead of failing fast, deterministically timing out test_session_close_linearizes_before_delayed_memory_write[ingest]. Force the variable to "none" like ENGRAPHIS_UPDATE_CHECK; tests that exercise extraction already opt back in explicitly via monkeypatch.setenv.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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
Single cherry-picked commit (originally
7503e2eon a local branch): the rootconftest.pyoffline gate now forcesENGRAPHIS_EXTRACTOR=noneinstead of usingsetdefault.Why:
setdefaultdeferred to any exported shell variable, so an owner machine exporting e.g.ENGRAPHIS_EXTRACTOR=llm_structuredleaked a live LLM extractor into every ingest-path test. Undertests/conftest.py's DNS stub, extraction calls hang rather than fail fast — deterministically timing outtest_session_close_linearizes_before_delayed_memory_write[ingest]. Tests that exercise extraction already opt back in explicitly viamonkeypatch.setenv, so nothing legitimate is lost.Verification
ENGRAPHIS_EXTRACTOR=llm_structuredexported, the previously flaky test passes deterministicallypytest tests/test_session_idempotent.py tests/test_cloud_features.py -q— 70 passedruff check .clean