What — Under a Python 3.14, 12-worker consumer suite, --receptor=llm reports a correct PASS but then prints repeated ResourceWarning: unclosed file ... /dev/null lines. The same suite with xdist and without pytest-receptor prints none.
How — pytest_receptor/plugin.py opens a discard stream in _silence_late_terminal() and keeps it in self._sink for pytest's late hooks, but never closes it. Reproduce with SMonitor's complete suite on Python 3.14.7, using a checkout based on uibcdf/smonitor@b00481d plus its local Python 3.14 candidate: run python -m pytest -q -n 12 -p xdist.plugin -p pytest_receptor.plugin --receptor=llm -p no:cacheprovider with plugin autoload disabled; then repeat without -p pytest_receptor.plugin and --receptor=llm. The first emits seven /dev/null warnings after PASS exit=0 | 465 passed, 2 skipped; the second emits none. A smaller pre-candidate suite showed the same warning shape after 461 passing tests.
Why — The warnings add noise and tokens after the bounded verdict, despite a successful test run. The fix must retain the late-terminal safety established by PR-PILOT-011: no trailing pytest banner, no closed-writer exception, and unchanged exit status, both with and without --receptor-stats and under xdist.
Record — devguide/pending_bugs/discard_stream_remains_unclosed_after_pytest.md
What — Under a Python 3.14, 12-worker consumer suite,
--receptor=llmreports a correct PASS but then prints repeatedResourceWarning: unclosed file ... /dev/nulllines. The same suite with xdist and without pytest-receptor prints none.How —
pytest_receptor/plugin.pyopens a discard stream in_silence_late_terminal()and keeps it inself._sinkfor pytest's late hooks, but never closes it. Reproduce with SMonitor's complete suite on Python 3.14.7, using a checkout based onuibcdf/smonitor@b00481dplus its local Python 3.14 candidate: runpython -m pytest -q -n 12 -p xdist.plugin -p pytest_receptor.plugin --receptor=llm -p no:cacheproviderwith plugin autoload disabled; then repeat without-p pytest_receptor.pluginand--receptor=llm. The first emits seven/dev/nullwarnings afterPASS exit=0 | 465 passed, 2 skipped; the second emits none. A smaller pre-candidate suite showed the same warning shape after 461 passing tests.Why — The warnings add noise and tokens after the bounded verdict, despite a successful test run. The fix must retain the late-terminal safety established by PR-PILOT-011: no trailing pytest banner, no closed-writer exception, and unchanged exit status, both with and without
--receptor-statsand under xdist.Record —
devguide/pending_bugs/discard_stream_remains_unclosed_after_pytest.md