Skip to content

fix(macos): release model verification buffers between chunks - #143

Merged
ekho merged 1 commit into
masterfrom
codex/fix-idle-memory
Dec 5, 2026
Merged

ekho merged 1 commit into
masterfrom
codex/fix-idle-memory

Conversation

@ekho

@ekho ekho commented Dec 5, 2026

Copy link
Copy Markdown
Owner

Summary

Model readiness checks retained whole files in the main thread's autorelease pool, leaving the idle app near 1 GiB. Drain temporary Foundation buffers after each chunk in model verification and audio hashing, while preserving full SHA256 and size checks.

 read each 1 MiB chunk
+  inside a local autorelease pool
   update SHA256
+  release temporary NSData before the next read

Evidence

  • Before: regression tests retained 33,573,616 bytes for a 32 MiB audio hash and 107,029,024 bytes for corrupt model verification.
    After: both retain less than 8 MiB; expected audio digest and rejection of corrupt weights remain verified.
  • Full macOS suite: 1,555 tests / 214 suites passed. Targeted model/memory suite: 24 tests passed; final updated fixture: 2 memory tests passed. Product-independence guard passed.
  • Isolated startup: copied published 0.29.2 binary 925.8 MiB footprint / 987.3 MiB peak; fixed debug binary 50.3–50.4 MiB / 51.9 MiB peak, same synthetic model and isolated home. This is not a universal idle-memory guarantee or published-build acceptance.
  • Read-only review found no blocking issues. Detailed scope and reproducible evidence: docs/testing/2026-12-05-idle-memory.md.

Merge Danger

Door: two-way

No persistent data or configuration migrations.

Blast Radius: macOS

File hashing and model verification only. Windows source is unchanged. Real-audio and Windows GUI acceptance were not run; common release CI still tests/builds both platforms.

Bound autoreleased Foundation file buffers during model verification and audio hashing. Add retained-memory regressions and record isolated startup measurements.

Co-Authored-By: Codex <noreply@openai.com>
@ekho
ekho marked this pull request as ready for review December 5, 2026 20:44
@ekho
ekho merged commit 2db0750 into master Dec 5, 2026
8 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.

1 participant