feat(macos): Working watchdog + Metal build fix#24
Open
gedcaeneus wants to merge 1 commit into
Open
Conversation
- watchdog.rs: Replace non-Linux no-op stub with real macOS process checking via `pgrep -x`. The health watchdog is now functional on macOS (was always returning true before). - metal_backend.rs: Populate all 9 Memory struct fields added in Phase 8+ (drift_velocity, superposition_depth, zedos_tag, alpha_a, alpha_d, aabb_min, aabb_max, explain, l2_norm_residual). Without this fix, `cargo check` fails with E0063 on macOS Metal builds. Tested: cargo check -p engram-server passes on M4 Pro (macOS 15).
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.
What This Does
Two fixes that make Engram actually work on macOS:
1. Health Watchdog — Now Functional on Mac 🍎
The
is_process_alive()function inwatchdog.rswas a no-op on non-Linux. It always returnedtrue, meaning the health watchdog literally did nothing on macOS.Fix: Added a
#[cfg(target_os = "macos")]block that usespgrep -xto actually check if processes are running. Now the 5-minute health check loop works on Mac the same way it works on Linux.2. Metal Backend — Build Was Broken 🔧
The
Memorystruct inengram-coregained 9 new fields during Phase 8+ (drift_velocity, superposition_depth, zedos_tag, etc). The Metal backend'squery()was still constructingMemorywith only 4 fields, socargo checkfails withE0063on macOS.Fix: Populated all missing fields from the block's physics data.
Tested
cargo check -p engram-server— passes on M4 Pro, macOS 15Files Changed
crates/engram-server/src/watchdog.rs(+11 lines)crates/engram-gpu/src/metal_backend.rs(+9 lines)No breaking changes. No Linux behavior affected.