Skip to content

Make macOS memory assertions process-isolated - #88

Merged
CodeAbra merged 1 commit into
CodeAbra:mainfrom
Marsu6996:fix/macos-ci-memory-tests
Jul 25, 2026
Merged

Make macOS memory assertions process-isolated#88
CodeAbra merged 1 commit into
CodeAbra:mainfrom
Marsu6996:fix/macos-ci-memory-tests

Conversation

@Marsu6996

Copy link
Copy Markdown
Contributor

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

  • Bug fix
  • New feature
  • Refactor (no behaviour change)
  • Documentation
  • Build / tooling

Affected areas

  • Capture path
  • Recall / retrieval
  • Consolidation / sleep cycles
  • Daemon lifecycle / FSM
  • Storage / encryption at rest
  • MCP wrapper (TypeScript)
  • Bench harness
  • CLI / doctor
  • Other: macOS CI test infrastructure

Testing

  • pytest passes locally
  • ruff check src/ tests/ clean
  • New tests added for changed behaviour, or rationale below for why not

Exact 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-deps also 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:

  • Detection: 295.9 MB in-parent vs 248.5 MB isolated (~16% lower)
  • Centrality: 366.8 MB in-parent vs 267.7 MB isolated (~27% lower)

Both assertions require the isolated arm to remain at least 5% below the in-parent arm. No test is skipped, marked xfail, or weakened.

@CodeAbra
CodeAbra merged commit 0633fc4 into CodeAbra:main Jul 25, 2026
2 checks passed
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.

2 participants