Commit graph

2112 commits

Author SHA1 Message Date
CoderJoey
e40e952298
Merge pull request #12 from UserGeneratedLLC/fixmac
feat: add .gitignore for logs and refactor ServeSession to include pa…
2026-03-12 21:21:42 -05:00
Joe
74f7ce26ec style: cargo fmt rojo_ref.rs 2026-03-12 21:06:47 -05:00
Joe
122602df8a refactor: deduplicate is_meta_or_model into shared helper
Bugbot flagged identical copies in patch_apply.rs and rojo_ref.rs.
Extracted to pub(crate) is_meta_or_model_name() in rojo_ref.rs.
2026-03-12 21:04:43 -05:00
Joe
3c87b408cc ci: enable Clippy warnings as errors in linting step
- Updated the Clippy command in both `ci.ps1` and `ci.sh` to include the `-D warnings` flag, ensuring that all warnings are treated as errors during the linting process. This change enhances code quality by enforcing stricter linting rules.
2026-03-12 21:02:31 -05:00
Joe
7289f51e83 ci: add GIT_CONFIG_NOSYSTEM environment variable to submodule initialization
- Updated CI workflows in `ci.yml` and `release.yml` to set the `GIT_CONFIG_NOSYSTEM` environment variable during the initialization of the rbx-dom submodule, ensuring consistent behavior across environments.
2026-03-12 20:54:25 -05:00
Joe
48f64f7157 fix: gate macOS-only imports behind cfg(target_os = "macos")
CI clippy runs with -D warnings on Linux where `thread` and `Watcher`
are unused (only used in the macOS raw-notify path).
2026-03-12 20:53:47 -05:00
Joe
b16f3bf500 ci: retry (previous failure was Windows git permission denied infra flake) 2026-03-12 20:51:56 -05:00
Joe
1f5dacd218 chore: update CI configuration and Rust settings
- Added support for `lld-link` as the linker for both x86_64 and aarch64 Windows targets in `.cargo/config.toml`.
- Updated CI workflows to use `Swatinem/rust-cache` for caching Rust dependencies, improving build efficiency.
- Consolidated build and test steps in CI workflows, enhancing clarity and reducing redundancy.
- Introduced a step to disable Windows Defender during CI runs on Windows to prevent interference with builds.
2026-03-12 20:41:34 -05:00
Joe
7e3e58a003 ci: retry windows-latest (ref_through_deduped_instance timing) 2026-03-12 20:40:48 -05:00
Joe
361b4a30ec fix: tighten stress_rename_operations assertion to check relevant paths
Bugbot flagged `has_create || has_remove || !events.is_empty()` as
trivially true. Replace with a check that at least one event references
either the original or renamed path, regardless of event type (FSEvents
on macOS reports renames as Write/Metadata, not always Create/Remove).
2026-03-12 20:27:08 -05:00
Joe
22808e6140 feat: add is_empty method to GitIndexCache and refactor Hungarian algorithm loop
- Introduced `is_empty` method in `GitIndexCache` to check if the cache has any entries.
- Refactored the loop in the `min_cost_assignment` function in `hungarian.rs` to use `enumerate` for improved readability and efficiency.
2026-03-12 20:25:21 -05:00
Joe
a901848861 refactor: optimize file watching and sourcemap generation
- Enhanced performance by replacing kqueue with FSEvents on macOS and implementing a lazy watch setup.
- Introduced platform-specific file watchers for improved event handling on macOS, Linux, and Windows.
- Updated sourcemap generation to use a oneshot session for non-watch scenarios.
- Cleaned up the ServeSession's init_tree function by removing the path_roots return value, streamlining the codebase.
2026-03-12 20:19:30 -05:00
Joe
34375d1339 fix: restore RescanRequired classification in debouncer-full error handler
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.
2026-03-12 19:48:17 -05:00
Joe
a727881e6f fix: platform-specific watcher for macOS FSEvents + Windows RDCW
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).
2026-03-12 18:48:43 -05:00
Joe
b8bc7dda5b fix: replace notify-debouncer-full/mini with raw notify + custom debounce
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.
2026-03-12 18:28:37 -05:00
Joe
9cf4cea936 fix: optimize serve/sourcemap startup from >180s to ~8s
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.
2026-03-12 18:02:45 -05:00
Joe
4ddc4a3e31 feat: add .gitignore for logs and refactor ServeSession to include path_roots in init_tree return
- 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.
2026-03-12 16:35:44 -05:00
Joe
6325935557 8.5.6
- Add asynchronous log file compression with lowered thread priority
- Reduce orphan scan logging verbosity (info -> debug)
2026-03-08 18:05:36 -05:00
Joe
b1e2bee52a feat: add asynchronous log compression with thread priority adjustment
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.
2026-03-08 15:55:45 -05:00
Joe
c3af985026 refactor: change logging level from info to debug for orphan scan performance metrics
Updated logging levels in the syncback loop to debug for orphan scan performance metrics, reducing verbosity and improving performance during normal operations.
2026-03-07 21:30:12 -06:00
Joe
863d8f1de1 8.5.5 2026-03-07 21:05:03 -06:00
CoderJoey
daac1112e3
Merge pull request #11 from UserGeneratedLLC/dedup_fix
Dedup fix
2026-03-07 21:02:04 -06:00
Joe
b3732acae5 fix: push pad-cost row for None snapshots in match_forward 2026-03-07 18:15:04 -06:00
Joe
372e6bc739 feat: implement Hungarian algorithm for optimal instance pairing in reconciler
- 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.
2026-03-07 18:13:19 -06:00
Joe
3f469d615b refactor: enhance minCostAssignment function with sentinel column for improved indexing
- 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.
2026-03-07 18:01:35 -06:00
Joe
d26f82b4f2 feat: implement optimal assignment using Hungarian algorithm in matching process
- 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.
2026-03-07 17:55:50 -06:00
CoderJoey
43ede3bc0e
Merge pull request #10 from UserGeneratedLLC/syncback-perf-optimize
Optimize syncback performance for large projects (~42% faster)
2026-03-07 17:14:48 -06:00
Joe
90ad6c0f37 chore: update subproject commit reference in shared skills 2026-03-07 17:14:34 -06:00
Joe
e06e9f7594 fix: extract orphan helpers so pre-walked path reuses them without duplication
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.
2026-03-07 16:56:24 -06:00
Joe
a2c7968c60 refactor: update git index refresh to a no-op and change logging level to debug
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.
2026-03-07 16:55:20 -06:00
Joe
3666c2a5e1 fix: scope pre-walked paths to $path roots and apply syncback filters
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.
2026-03-07 16:35:47 -06:00
Joe
53c0567153 Update CHANGELOG.md for syncback performance optimization PR 2026-03-07 16:03:24 -06:00
Joe
cd465a90a2 Optimize syncback performance for large projects (~42% faster)
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
2026-03-07 16:01:51 -06:00
Joe
338f97040c 8.5.4
- Add multi-place clone support
- Fix globIgnorePaths meta file leak and deletion behavior
- Add globIgnorePaths VFS event and prefetch filtering
- Fix macOS VFS watch setup (kqueue per-file watches)
2026-03-07 15:10:25 -06:00
Joe
345d36cda5 Refactor VFS event logging and streamline ServeSession watch setup
- 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.
2026-03-07 14:41:17 -06:00
Joe
9ed8cf3f37 Refactor run-tests.server.lua to improve package loading and update subproject dependencies
- 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.
2026-03-07 14:17:32 -06:00
CoderJoey
2d9f5aef6d
Merge pull request #9 from UserGeneratedLLC/macos_fix
Update dependencies and enhance path ignore functionality
2026-03-07 13:43:24 -06:00
Joe
1871a0b4c9 update-rules 2026-03-07 13:42:56 -06:00
Joe
dad5320aaf Enhance patch computation to support glob-ignored children
- 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.
2026-03-07 13:25:49 -06:00
Joe
73ac94c67c Stop setting ignore_unknown_instances from glob filtering to prevent meta file leak 2026-03-07 12:20:54 -06:00
Joe
8772077ed1 Move globIgnoredChildren guard before shouldDeleteUnknownInstances
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.
2026-03-07 12:10:35 -06:00
Joe
1406c1a1b7 Refactor instance metadata handling to incorporate glob-ignored children
- 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.
2026-03-07 12:02:34 -06:00
Joe
12bccf91c5 Enhance instance metadata and reconciliation logic for glob-ignored children
- 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.
2026-03-07 11:44:07 -06:00
Joe
4b38c070fb Refactor VFS watch logic for macOS and Linux/Windows compatibility
- 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.
2026-03-07 10:40:32 -06:00
Joe
c19b249657 Update TODO.txt and refine VFS watch logic in ServeSession
- 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.
2026-03-07 10:30:09 -06:00
Joe
372b605fb5 Enhance snapshot handling to account for glob-ignored children
- 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.
2026-03-06 23:50:12 -06:00
Joe
1ab347f498 Refactor VFS watch logic in ServeSession
- 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.
2026-03-06 23:43:06 -06:00
Joe
e79691012e Update TODO.txt with new entries for luau-lsp sourcemap fix and two-way sync issue
- 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.
2026-03-06 23:27:14 -06:00
Joe
8acbfc0cf8 Refactor notify dependency configuration and enhance VFS watch setup
- 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.
2026-03-06 23:22:54 -06:00
Joe
0243181731 Refactor path ignore rule handling in Project and ServeSession
- 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.
2026-03-06 23:12:28 -06:00