Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2264 +/- ##
==========================================
+ Coverage 93.87% 93.89% +0.01%
==========================================
Files 182 182
Lines 13130 13140 +10
==========================================
+ Hits 12326 12338 +12
+ Misses 804 802 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…ethod The shared-memory regression test for `get_memory_info()` ran its children under an explicit `fork` context only. The start methods differ in how much memory the children share with the rest of the process tree, and the default changed from `fork` to `forkserver` in Python 3.14, so the test is now parametrized over `fork`, `forkserver` and `spawn`. The children are module-level functions so that every start method can pickle them. Start methods that launch long-lived helper processes on first use (the fork server, the resource tracker) get a warm-up before the measurements, since those processes would otherwise land in the first baseline reading and inflate it. The `fork` variant intentionally forks the multi-threaded test runner, so the deprecation warning that Python 3.12+ emits for it is filtered for this test. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TZuPLMf9Yf1NKZMqtGDS9J
Pijukatel
force-pushed
the
claude/fervent-curie-cwnadu
branch
from
October 1, 2026 12:51
74195a7 to
9260a17
Compare
This branch has not been deployed
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.


Description
The shared-memory regression test for
get_memory_info()ran its children under an explicitforkcontext only. The start methods differ in how much memory the children share with the rest of the process tree, which is what the PSS-based estimation has to account for, and the default on Linux changed fromforktoforkserverin Python 3.14.test_memory_estimation_does_not_overestimate_due_to_shared_memoryoverfork,forkserverandspawn.forkserver(and the resource tracker) launch long-lived helper processes on first use, which otherwise land in the first baseline reading and inflate it. Without the warm-up the first round underforkserveron 3.14 misses the tolerance (ratio about 0.34) and only the retry saves it.DeprecationWarningabout forking a multi-threaded process for this test. Theforkvariant forks the test runner on purpose, and the forked process uses no threads.Findings from running the estimation under all three methods, on 3.11 and 3.14, in a cgroup-limited container (the code path production takes after #2128): the de-duplication holds in every case, with a difference ratio below 0.05. The cgroup memory charge, which the kernel counts shared pages once for, matched the PSS deltas within a few MB throughout. Playwright browsers do not go through
multiprocessingat all, andsrc/has noProcessPoolExecutor, so the 3.14 default change does not affect production estimates. Details in the issue.Issues
Testing
uv run pytest tests/unit/_utils/test_system.py -k shared_memory -W defaultpasses all three variants on Python 3.11 and 3.14, with no warnings and no tracebacks from the children.ruff,tyclean on the file.Checklist
🤖 Generated with Claude Code
https://claude.ai/code/session_01TZuPLMf9Yf1NKZMqtGDS9J
Generated by Claude Code