You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add Darwin build, loader, plugin, filesystem-watch, and mailbox polling support while retaining Linux inotify behavior.
Use kqueue for native macOS filesystem notifications, adapt dynamic-library conventions and Homebrew dependency paths, and cover macOS watcher/plugin behavior in tests. Restore the Linux mailbox path unchanged to avoid platform regressions.
Mount the local ONNX embedding model into the reusable Linux test container so the embedding test runs there, and propagate per-test failures through the test and test-container targets.
Add Darwin build, loader, plugin, filesystem-watch, and mailbox polling support while retaining Linux inotify behavior.
Use kqueue for native macOS filesystem notifications, adapt dynamic-library conventions and Homebrew dependency paths, and cover macOS watcher/plugin behavior in tests. Restore the Linux mailbox path unchanged to avoid platform regressions.
Mount the local ONNX embedding model into the reusable Linux test container so the embedding test runs there, and propagate per-test failures through the test and test-container targets.
Signed-off-by: Jhon Honce <jhonce@redhat.com>
Adds macOS/Darwin support for builds, filesystem watching, plugins, polling, and related tests while preserving Linux behavior.
Changes:
Adds Darwin build, linking, plugin, subprocess, journal, and polling support.
Implements kqueue filesystem watching and macOS test coverage.
Updates ONNX model discovery and reusable test-container handling.
File
Summary
tests/test_tool_plugin_dlopen.c
Uses platform-specific plugin extensions.
tests/test_onnx_embed.c
Supports current and legacy model paths.
tests/test_fswatch.c
Extends filesystem watcher coverage for macOS.
src/tools.c
Preserves plan-link compatibility and replay behavior.
src/tool_plugin.c
Adds .dylib plugin recognition.
src/telegram.c
Adds non-Linux polling behavior.
src/subprocess.c
Adds macOS-compatible pipe and descriptor handling.
src/matrix.c
Adds Darwin polling and credential clearing; critical:explicit_bzero may conflict with the SDK declaration.
src/main.c
Integrates native watcher readiness and draining.
src/mailbox.c
Adds macOS mailbox polling.
src/journal.c
Uses fsync on macOS with error handling.
src/fswatch_noop.c
Restricts the no-op backend to unsupported platforms.
src/fswatch_kqueue.c
Adds kqueue watching; critical: stale deleted/renamed entries prevent re-registration. Moderate: non-recursive watches become recursive, hidden directories are not skipped, and directory events rescan entire subtrees.
Makefile
Adds Darwin builds and container testing; critical: Homebrew linker paths appear too late. Moderate: reusable containers may lack the model mount, and plugins lack a resolvable Darwin runpath.
Apply the fixes identified by Copilot review: place Homebrew linker paths before dependent libraries, use a project-specific secure-zero helper, and recreate reusable test containers when their ONNX model mount is missing or stale.
Harden the kqueue watcher by removing invalidated vnode entries before re-registration and preserving shallow-watch semantics. Add macOS regressions for recreated paths and non-recursive directory watches.
Signed-off-by: Jhon Honce <jhonce@redhat.com>
Recursive kqueue scan can exhaust file descriptors
src/fswatch_kqueue.c:117
This recursive scan opens one kqueue vnode fd for every file and directory, with no depth or watch-count bound. The TUI calls this on the whole workspace, so a sufficiently large/deep tree can exhaust macOS file descriptors (after which watch_tree() silently skips paths) or recurse excessively; add bounds/resource handling comparable to the Linux backend or use a strategy that does not require one fd per file.
Canonicalize watch paths before generating callbacks
src/fswatch_kqueue.c:177
The public callback contract requires absolute paths, and the Linux backend canonicalizes the input with realpath, but this backend stores path verbatim. Calling fswatch_add with a relative path therefore produces relative callback paths and can break consumers that compare callbacks with canonical workspace paths. Resolve the input before passing it to watch_tree/add_watch.
Apply the latest Copilot review fixes: add an install-relative Darwin run path, keep kqueue event userdata valid through a drain batch, and seed shallow watcher file entries without emitting false create events.
Add macOS regressions for existing direct files and recursive tree removal.
Signed-off-by: Jhon Honce <jhonce@redhat.com>
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
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.
Add Darwin build, loader, plugin, filesystem-watch, and mailbox polling support while retaining Linux inotify behavior.
Use kqueue for native macOS filesystem notifications, adapt dynamic-library conventions and Homebrew dependency paths, and cover macOS watcher/plugin behavior in tests. Restore the Linux mailbox path unchanged to avoid platform regressions.
Mount the local ONNX embedding model into the reusable Linux test container so the embedding test runs there, and propagate per-test failures through the test and test-container targets.