Make macOS memory assertions process-isolated - #88
Merged
Conversation
17 tasks
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
Run the macOS memory assertions in fresh interpreter processes instead of measuring deltas inside the long-lived pytest worker. This removes allocator-history and arm-ordering dependence while strengthening the child-isolation checks.
This is intended to make the macOS correctness gate reliable before the separate fix for #86.
Type of change
Affected areas
Testing
pytestpasses locallyruff check src/ tests/cleanExact pull-request gate reproduced locally on macOS with Python 3.12.13 and Rust 1.87.0:
pytest --timeout=600 -m "not perf and not slow and not live"Result: 5508 passed, 106 skipped, 111 deselected, 4 xfailed, 0 failed.
pip wheel . --no-depsalso completed successfully.The repository-wide ruff baseline is not currently clean. The new helper and watchdog test are clean, and the edited test files introduce no new diagnostics relative to
origin/main.Benchmarks
Not applicable: this PR changes test measurement only and does not modify production retrieval, capture, or consolidation behaviour.
Notes for reviewers
Each comparison arm now runs in its own fresh interpreter with identical seeded data.
Observed peak RSS:
Both assertions require the isolated arm to remain at least 5% below the in-parent arm. No test is skipped, marked xfail, or weakened.