The non-macOS debouncer-full error callback was classifying all errors
as WatcherError, missing the empty-paths check that identifies rescan
requests. The default error handler treats RescanRequired as recoverable
(log + continue) but WatcherError as fatal (process::exit). This meant
inotify queue overflows would kill the process instead of triggering
a recoverable rescan.
macOS: raw notify with custom 50ms debounce thread. FSEvents provides
complete event kinds (Create/Remove/Modify) without needing a file
cache, avoiding the debouncer-full's Create+Remove cancellation bug.
Windows/Linux: notify-debouncer-full with RecommendedCache. RDCW needs
the file cache to detect cross-directory moves and renames. The cache
also handles RDCW's limited event granularity.
Both platforms share the same convert_event logic for mapping notify
EventKinds to VfsEvents.
All 489 tests passing locally (macOS).
notify-debouncer-full cancelled FSEvents Create+Remove pairs (breaking
macOS file deletion detection). notify-debouncer-mini lacked event kind
information (breaking Windows rename detection).
Use raw notify::RecommendedWatcher with a simple 50ms debounce thread
that preserves full event kinds (Create/Write/Remove/Rename). This
matches upstream Rojo's approach (notify v4 built-in debouncer) while
staying on notify v8.
All 489 tests passing on macOS. No debouncer dependencies needed.
Root cause: notify-debouncer-full with macos_kqueue caused 25K+
directory watch registrations to take >170s on large projects.
Changes:
- Replace notify-debouncer-full with notify-debouncer-mini to avoid
FSEvents Create+Remove event cancellation and heavy per-watch overhead
- Remove macos_kqueue feature; use FSEvents (matches upstream Rojo)
- Fix VFS read guard: watch_enabled && watch_recursive -> watch_enabled
so recording mechanism works when watch_recursive is false
- Build RefPathIndex from patch_apply data instead of redundant 4.8s
WalkDir + 5,854 file re-reads (populate_from_dir)
- Use ServeSession::new_oneshot() for sourcemap without --watch
- Restore simple synchronous watch setup (implicit during reads)
Serve: >180s (never completed) -> ~8s to Listening
Sourcemap: 14.3s -> ~9s
All 489 tests passing.
- Introduced a new .gitignore file to exclude log files from version control.
- Modified the `init_tree` function in `ServeSession` to return `path_roots`, enhancing the function's utility.
- Cleaned up commented-out code in `sourcemap.rs`, `patch_apply.rs`, and `tree.rs` for better readability and maintainability.
Implemented asynchronous log compression in the logging initialization process. A new function, `lower_thread_priority`, adjusts the thread priority to below normal for the compression task, improving overall application performance during logging operations.
Updated logging levels in the syncback loop to debug for orphan scan performance metrics, reducing verbosity and improving performance during normal operations.
- Replaced the previous greedy matching approach with the Hungarian (Kuhn-Munkres) algorithm for improved accuracy in instance pairing, especially in ambiguous groups with multiple same-named instances.
- Introduced a new Hungarian.lua module to encapsulate the algorithm's logic.
- Updated the reconciler to utilize the new optimal assignment function, enhancing overall matching performance.
- Documented changes in the CHANGELOG for clarity on the new implementation.
- Introduced a sentinel column to replace 0-indexing from the Rust version, simplifying potential assignments.
- Updated array initializations to accommodate the new indexing scheme, enhancing clarity and consistency in the algorithm.
- Adjusted logic for potential updates and augmenting paths to align with the new structure.
- Added a new function for minimum-cost bipartite matching via the Hungarian algorithm to improve the efficiency of the matching process.
- Refactored existing matching logic to utilize the new algorithm, replacing the previous greedy assignment approach.
- Updated relevant documentation to reflect changes in the matching strategy.
- Enhanced performance in ambiguous group matching scenarios.
Bugbot flagged that the pre-walked fast path bypassed collect_alternate_files
and instigating_source checks. Fixed by extracting both into shared helpers
called before the if/else branch, so both paths use the same logic.
The `refresh_git_index` function is now a no-op, as the previous implementation added unnecessary latency without meaningful benefits. Additionally, logging levels for performance metrics have been changed from info to debug across various modules to reduce verbosity and improve performance during normal operations.
Bugbot flagged two issues with the pre-walked orphan paths:
1. cache.is_file.keys() included shallow project-folder entries (README.md,
rokit.toml, etc.) that would be incorrectly flagged as orphans.
Fixed by filtering to only paths under walked $path roots.
2. syncbackRules.ignorePaths was not applied to pre-walked paths.
Fixed by running is_valid_path() on the pre-walked set before use.
Syncback on a 132K-file project dropped from ~32s to ~18s by:
- Skipping hash_tree computation in clean (non-incremental) mode,
since hashes are only consulted when incremental=true (-6s)
- Reusing prefetch walkdir results for orphan detection instead of
walking the filesystem a second time (-1.7s)
- Rewriting collect_all_paths from O(n*d) bottom-up ancestor walks
to O(n) top-down BFS (-0.7s)
- Adding file-size-first comparison in write_to_vfs_parallel to
avoid reading files that differ in size
- Scoping git ls-files --stage to project directory prefix
- Adding [PERF] instrumentation at info level for every pipeline phase
- Changed VFS event logging from INFO to DEBUG level for better performance and reduced verbosity during normal operations.
- Removed unnecessary project folder variable and redundant watch calls in ServeSession, enhancing clarity and efficiency in the watch setup process.
- Changed the way TestEZ and Rojo are required by using WaitForChild for better reliability.
- Updated subproject commits for Flipper, Promise, Roact, and TestEZ to their latest versions.
- Introduced `glob_ignore_rules` to manage instance removal based on glob patterns, allowing for more granular control over which instances are retained.
- Updated the logic in `compute_patch_set_internal` and `compute_children_patches` to check against these rules before removing unmatched instances.
- Refactored related tests to ensure correct behavior when instances are matched or ignored based on their paths, improving the robustness of instance synchronization.
The guard was placed after the early return, so when
ignoreUnknownInstances was false the function exited at line 39
before ever reaching the globIgnoredChildren check. Project nodes
and meta files can override ignoreUnknownInstances independently,
causing incorrect deletions of glob-ignored instances.
- Renamed `ignore_unknown_instances` to `suppress_removals` in patch computation logic for clarity.
- Updated tests to reflect the new naming and behavior, ensuring correct handling of instance removals based on `glob_ignored_children`.
- Enhanced API and interface definitions to include `glob_ignored_children`, improving metadata management for instance synchronization.
- Added `globIgnoredChildren` to `ApiInstanceMetadata` to manage child deletion behavior based on glob patterns.
- Updated `shouldDeleteChild` function to suppress deletions when `globIgnoredChildren` is true, differentiating from scripts-only mode.
- Enhanced tests to verify correct behavior of instance deletion based on the new metadata, ensuring robust handling of unknown scripts.
- Refactored snapshot handling to incorporate `globIgnoredChildren` in metadata, improving clarity and maintainability.
- Enhanced the VFS watch setup in ServeSession to differentiate between macOS and other platforms, ensuring proper handling of file and directory watches.
- Improved clarity by restructuring the logic for watching paths, addressing platform-specific requirements and optimizing resource usage.
- Maintained non-recursive watching for ignored directories while ensuring all relevant files are monitored effectively.
- Added a new entry in TODO.txt to follow up with Coelho on outstanding tasks.
- Simplified VFS watch logic to ensure both files and directories are monitored, addressing potential conflicts on macOS and improving overall watch reliability.
- Updated snapshot_dir_no_meta to set ignore_unknown_instances based on the presence of glob-ignored children.
- Added tests to verify that directories with glob-ignored children correctly flag ignore_unknown_instances as true, while those without do not.
- Improved clarity and maintainability of the snapshot logic by incorporating child filtering rules.
- Simplified the VFS watch setup by removing the directory type check, allowing all entries to be watched directly.
- Improved code clarity and reduced complexity in the watching mechanism for project files.
- Added a task to address the luau-lsp sourcemap generator command configuration.
- Documented a problem with the plugin not respecting two-way sync for glob ignored scripts, highlighting the need for a fix.
- Updated Cargo.toml to conditionally configure the notify dependency for macOS and other platforms.
- Improved ServeSession's VFS watch logic to filter out ignored directories based on glob patterns, optimizing resource usage and watch handle count.
- Introduced PathIgnoreRule handling to streamline directory watching, enhancing overall performance and maintainability.
- Introduced a new method `path_ignore_rules` in the Project struct to streamline the creation of PathIgnoreRule instances.
- Updated ServeSession and snapshot middleware to utilize the new method, improving code clarity and reducing duplication.
- Removed redundant PathIgnoreRule mapping from multiple locations, enhancing maintainability.
- Updated various dependencies in Cargo.lock and Cargo.toml, including aws-lc-rs, aws-lc-sys, tokio, and uuid to their latest versions.
- Refactored the memofs crate to simplify the notify dependency configuration.
- Introduced path ignore rules in ChangeProcessor and ServeSession to filter VFS events based on glob patterns, improving event handling efficiency.
- Updated CloneCommand to support multiple place IDs, allowing the creation of multi-place projects with individual project files for each place.
- Refactored the initialization logic in InitCommand to streamline project setup and ensure proper handling of project templates.
- Added a new function to fetch place names from the Roblox API, improving the user experience during project creation.
- Updated TODO.txt with a new entry for fixing the luau-lsp sourcemap generator command.
- Added a new entry in TODO.txt to remove atlas-project.mdc from shared agent rules and migrate it to manual cloning for new projects.
- Updated init.rs to include atlas-project.mdc in the project initialization process, ensuring it is created in the appropriate rules directory.
- Optimized project file prefetching with shallow folder walk and depth-limited traversal for `$path` roots, improving efficiency.
- Implemented non-recursive watching for project folders while maintaining recursive watches for `$path` roots, reducing watch handle count.
- Added `is_watch_enabled` method to VFS for querying file watching status.
- Fixed issues with prefetch path canonicalization and `walked_roots` tracking to ensure accurate path storage.
- Introduced guard tests for `INIT_FILE_PRIORITY` and `DEFAULT_PROJECT_NAMES` synchronization, along with prefetch cache integration tests for metadata retrieval.
- Added a new entry under [syncback] to optimize the syncback process, referencing previous improvements made to the serve functionality.
- This update aims to enhance the efficiency of the syncback feature in line with ongoing project enhancements.
- Introduced `is_watch_enabled` method to check the status of automatic file watching in the VFS.
- Added a new test for prefetch cache to validate metadata retrieval and error handling for walked roots and external paths.
- Updated the `watch` method in `StdBackend` for cleaner logic.
- Enhanced the `dir_init` field in `PrefetchCache` to store resolved init-file information for directories, improving prefetch operations.
- Simplified the condition for checking if a path is within the walked roots by removing unnecessary variable assignments.
- This change enhances the clarity and efficiency of the metadata retrieval process in the VFS.