Skip to content

feat(macos): Working watchdog + Metal build fix#24

Open
gedcaeneus wants to merge 1 commit into
masterfrom
platform/macos
Open

feat(macos): Working watchdog + Metal build fix#24
gedcaeneus wants to merge 1 commit into
masterfrom
platform/macos

Conversation

@gedcaeneus
Copy link
Copy Markdown
Collaborator

What This Does

Two fixes that make Engram actually work on macOS:

1. Health Watchdog — Now Functional on Mac 🍎

The is_process_alive() function in watchdog.rs was a no-op on non-Linux. It always returned true, meaning the health watchdog literally did nothing on macOS.

Fix: Added a #[cfg(target_os = "macos")] block that uses pgrep -x to 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 Memory struct in engram-core gained 9 new fields during Phase 8+ (drift_velocity, superposition_depth, zedos_tag, etc). The Metal backend's query() was still constructing Memory with only 4 fields, so cargo check fails with E0063 on macOS.

Fix: Populated all missing fields from the block's physics data.

Tested

  • cargo check -p engram-server — passes on M4 Pro, macOS 15
  • Only 2 pre-existing warnings (unrelated: unused import + unused mut)

Files 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.

- 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).
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