Skip to content

test(conftest): force ENGRAPHIS_EXTRACTOR=none for the offline gate - #166

Merged
Coding-Dev-Tools merged 1 commit into
mainfrom
test/conftest-extractor-hard-gate
Aug 25, 2026
Merged

test(conftest): force ENGRAPHIS_EXTRACTOR=none for the offline gate#166
Coding-Dev-Tools merged 1 commit into
mainfrom
test/conftest-extractor-hard-gate

Conversation

@Coding-Dev-Tools

Copy link
Copy Markdown
Owner

Summary

Single cherry-picked commit (originally 7503e2e on a local branch): the root conftest.py offline gate now forces ENGRAPHIS_EXTRACTOR=none instead of using setdefault.

Why: setdefault deferred to any exported shell variable, so an owner machine exporting e.g. ENGRAPHIS_EXTRACTOR=llm_structured leaked a live LLM extractor into every ingest-path test. Under tests/conftest.py's DNS stub, extraction calls hang rather than fail fast — deterministically timing out test_session_close_linearizes_before_delayed_memory_write[ingest]. Tests that exercise extraction already opt back in explicitly via monkeypatch.setenv, so nothing legitimate is lost.

Verification

  • Hostile-environment proof: with ENGRAPHIS_EXTRACTOR=llm_structured exported, the previously flaky test passes deterministically
  • pytest tests/test_session_idempotent.py tests/test_cloud_features.py -q — 70 passed
  • Full-suite collection clean; ruff check . clean

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

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@Coding-Dev-Tools
Coding-Dev-Tools merged commit 1ce18cf into main Aug 25, 2026
23 checks passed
@Coding-Dev-Tools
Coding-Dev-Tools deleted the test/conftest-extractor-hard-gate branch August 25, 2026 13:07
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