- Introduced the `RefPathIndex` structure to map `Rojo_Ref_*` attribute values to their corresponding meta/model file paths, enabling O(affected_files) lookups during instance renaming.
- Updated `ChangeProcessor`, `ServeSession`, and `ApiService` to utilize the new index for managing reference paths, improving performance and reliability during rename operations.
- Enhanced the `update_ref_paths_after_rename` function to leverage the index for efficient file updates, reducing the need for full tree scans.
- Added comprehensive tests for `RefPathIndex` to ensure correct functionality and robustness against edge cases.
These changes significantly enhance the efficiency of reference path management in the synchronization system.
- Updated the audit guide to clarify the workflow and prerequisites for conducting a production-grade sync feature audit.
- Introduced a new plan file detailing fixes for critical issues identified in the two-way sync audit, including missing instance maps and stale paths after renames.
- Enhanced `ServeSession.lua` to correctly pass the instance map in patch updates, ensuring accurate handling of unresolved Ref properties.
- Implemented various fixes in `change_processor.rs` and `rojo_ref.rs` to address critical bugs related to Ref path handling and instance renaming.
- Added tests to verify the correct behavior of Ref properties and ensure robustness against edge cases.
These changes improve the reliability of the synchronization system and enhance the clarity of the audit process.
- Added `onInstanceInserted` callback to `InstanceMap` to notify when new instances are tracked, allowing `ChangeBatcher` to resolve pending unresolved Ref properties.
- Updated `createPatchSet` and `encodePatchUpdate` to support handling unresolved Ref properties, deferring their resolution until the target instance is available.
- Implemented logic in `ChangeBatcher` to manage pending unresolved Ref properties and re-queue them when the target instance is inserted.
- Introduced new tests to verify behavior with ambiguous paths and ensure stability when handling duplicate-named siblings.
These changes improve the handling of Ref properties in the system, enhancing synchronization reliability and robustness.
- Introduced a comprehensive audit guide for the production-grade sync feature, detailing the evaluation criteria for round-trip identity and code quality.
- Added a new plan for auditing the two-way sync Ref property feature, outlining specific tasks and expected behaviors.
- Updated `ServeSession.lua` to include the instance map in patch updates, ensuring accurate property encoding.
- Enhanced `encodeInstance.lua` to prevent encoding Ref properties during instance addition, delegating this to the patch update process.
- Implemented regression tests to highlight known limitations in Ref handling, ensuring better coverage and identification of existing bugs.
These changes improve the clarity of the sync feature's audit process and strengthen the handling of Ref properties in the system.
- Simplified the formatting of function calls in `encodePatchUpdate.spec.lua` for better readability.
- Added multiple new snapshot files to enhance end-to-end testing for reference path changes, including scenarios for adding, removing, and handling nonexistent attributes.
- Updated test cases in `apply.rs`, `compute.rs`, and `api.rs` to ensure consistent handling of reference properties and improve clarity in property updates.
These changes enhance the maintainability of the test suite and improve the robustness of snapshot testing.
- Introduced the `block_newline_gaps` setting and set it to "Never" to enforce consistent formatting in Lua files.
- This change enhances the code style configuration for better readability and maintainability.
- Fix tree drift from echo suppression eating VFS events for new instances
- Add periodic tree reconciliation for lost OS watcher events
- Add /api/validate-tree endpoint and WatcherCriticalError channel
- VFS staleness tests, chaos fuzzer, and tree freshness assertions
- Update protocol version to 6
Co-authored-by: Cursor <cursoragent@cursor.com>
- Updated snapshot files to reflect changes in IDs for consistency across connected mode tests.
- Improved VFS event processing in ChangeProcessor to handle multiple events more efficiently, ensuring consistent message structure across platforms.
- Added merging functionality for patch sets to consolidate changes from various VFS events, enhancing synchronization reliability.
These changes improve the accuracy of test snapshots and optimize VFS event management.
- Removed redundant logic for draining and discarding stale VFS events after reconciliation, streamlining the event processing flow.
- Simplified the handling of queued VFS events to improve performance and reduce potential backlog issues.
These changes enhance the efficiency of the ChangeProcessor by optimizing VFS event management.
- Fixed tree drift issues caused by echo suppression, ensuring new-instance file writes do not suppress watcher events.
- Implemented periodic tree reconciliation in the ChangeProcessor to recover from lost OS file notifications.
- Added a new API endpoint `/api/validate-tree` for verifying tree-filesystem consistency.
- Introduced `assert_tree_fresh()` test helper and enhanced tree freshness assertions in watcher tests.
- Added VFS staleness tests and a chaos fuzzer stress test to improve robustness.
- Tightened echo suppression test assertions for more precise validation.
- Exposed `WatcherCriticalError` channel for better event handling in the ChangeProcessor.
These changes significantly improve the reliability of the VFS and enhance testing coverage for tree synchronization scenarios.
- Introduced a new method `new_default_with_errors` in the VFS implementation to create a VFS instance with a critical error receiver for monitoring watcher health.
- Updated the `ServeSession` constructor to accept an optional critical error receiver, allowing for better error management during session initialization.
- Adjusted various calls to `ServeSession::new` across the codebase to accommodate the new parameter, ensuring consistent error handling.
- Improved logging in the API context and serve session files for better clarity during server operations.
These changes enhance the robustness of the VFS and session management, providing better tools for error detection and handling.
- Updated the `write_init_meta_json` method to include a new parameter for better control over initialization behavior.
- Removed unnecessary calls to `suppress_path` and `suppress_path_remove` in various sections to streamline file handling.
- Revised comments in the `two_way_sync` tests to clarify the behavior of echo suppression during API interactions, ensuring accurate expectations for VFS event handling.
These changes enhance the clarity and efficiency of the API service and improve the documentation for testing echo suppression.
- Updated several dependencies in Cargo.lock, including `clap`, `env_logger`, and `rand`, to their latest versions for improved functionality and security.
- Introduced a new API endpoint `/api/validate-tree` for checking tree freshness without applying corrections, enhancing the validation process.
- Added a `TreeFreshnessReport` struct to encapsulate the results of the tree freshness check, providing detailed insights into discrepancies.
- Completed multiple todos in the VFS staleness test plan, ensuring comprehensive coverage for various scenarios and improving the robustness of the testing framework.
These changes enhance the project's dependency management and testing capabilities, ensuring better alignment with the latest implementation standards.
- Incremented the protocol version from 5 to 6 in the Atlas API documentation, reflecting the latest changes in server/plugin compatibility.
- Added new API endpoints for live patch streaming and updated the server info response structure to include additional fields such as `unexpectedPlaceIds` and `gameId`.
- Improved the WebSocket protocol documentation to align with the new versioning.
- Enhanced metadata handling in the syncback rules and clarified the structure of meta files, including the introduction of new properties and adjustments to existing ones.
These updates improve clarity and maintainability of the API documentation and ensure better alignment with the latest implementation changes.
- Updated the connected mode test expansion plan, marking all todos as completed, including multi-step sequence tests and various phase implementations.
- Added a new plan for VFS staleness test fixtures, outlining the creation of a validation API, test helpers, and multiple staleness tests to improve detection of VFS event issues.
- Introduced new rules for the Atlas API and project file format specifications, enhancing the overall structure and documentation for better clarity and maintainability.
This update significantly improves testing coverage and addresses potential VFS synchronization issues.
- Promoted sync-related logging from Debug/Trace to Info level across multiple files, ensuring visibility of changes in the Studio output console.
- Added a new plan for expanding the connected mode test suite to cover multi-step scenarios and round-trip identity verification.
- Introduced a plan to fix stale tree desynchronization by implementing a validation mechanism on plugin connection.
- Created a plan to bump sync logging to Info level, detailing todos for various components in the plugin.
This update improves the clarity of logs and enhances testing coverage for connected mode scenarios.
- Introduced a new gitconfig.txt file with core settings for Git.
- Updated gitignore.txt to include entries for IDEs, environment files, and atlas executable.
- Modified init.rs to handle the new gitconfig file during project initialization.
- Changed the Luau LSP sourcemap project file from "plugin.project.json5" to "default.project.json5" in the VS Code configuration for the project template.
- Updated the vscode-rojo submodule to the latest commit.
- Added a new extension recommendation for better JSON5 support.
- Enhanced settings for Luau LSP with additional configurations for diagnostics, completion, and inlay hints.
- Updated project template settings to include new Luau LSP sourcemap file and removed deprecated extension recommendations.
- Overhaul filename handling with slugify for robust round-trip fidelity
- Refactor syncback instance processing, metadata, and deduplication logic
- Add option to forget prior info for place in reminder notification
- Improve sourcemap path handling with pathdiff
- Use rbx_cookie for Roblox auth cookie retrieval
- Add VS Code extension build steps to CI and release workflows
- Update rbx-dom and vscode-rojo submodules
Co-authored-by: Cursor <cursoragent@cursor.com>
- Updated the mapping of entries to directly return lowercase slugified names, improving clarity and efficiency.
- Enhanced test stability by adding a conditional ignore for flaky tests on macOS related to rapid rename and write operations.
Implement filename slugification for syncback, replacing percent-encoding with filesystem-safe slugified names. Forbidden characters are replaced with underscores, real instance names stored in .meta.json5 name fields, and deduplication uses ~N suffixes on collision.
- Introduced a comprehensive audit plan for the slugify branch, detailing findings from a holistic review of 110 files, including 1 critical bug and 2 correctness issues.
- Completed todos addressing model JSON renaming, syncback updates, and test enhancements for roundtrip fidelity.
- Added tests for reserved names and ensured correct handling of slugified instances, preserving compound extensions in model files.
- Refactored change processing logic to correctly manage the `name` field in model files, enhancing metadata handling and ensuring compliance with round-trip identity standards.
- Updated the subproject reference for rbx-dom to the latest commit.
- Modified paths in the CI script to correctly point to the Lua and Rust source directories, ensuring proper execution of formatting and linting tools.
- Updated CI documentation to enforce running the full suite without skipping the rbx-dom section, clarifying the execution steps.
- Refactored `change_processor.rs` for improved readability by enhancing formatting and structure in name deduplication logic.
- Cleaned up imports in `project.rs` and improved formatting in `file_names.rs` to enhance code clarity and maintainability.
- Adjusted test assertions in `two_way_sync.rs` for better readability and consistency in checking file existence after renaming operations.
- Introduced a new plan addressing critical bugs, correctness issues, and refactors identified during the audit, including improvements to metadata handling and slugification logic.
- Replaced inline removal logic in `handle_api_write` with a new `remove_instance_at_path` method to ensure correct deletion of instances.
- Updated pre-seeding logic in `dir.rs` and `project.rs` to derive deduplication keys from actual filesystem paths instead of slugified names.
- Enhanced rename handling in `change_processor.rs` to prevent collisions by deduplicating names against existing siblings.
- Added tests for various scenarios, including handling of forbidden characters and ensuring correct deduplication behavior.
- Refactored child iteration in `dir.rs` and `project.rs` to sort children alphabetically for deterministic deduplication ordering.
- Marked all todos in the slugify branch audit plan as completed, confirming the successful verification of core invariants and sync processes.
- Introduced a new plan to address critical bugs, correctness issues, and refactors identified during the audit, including enhancements to metadata handling and slugification logic.
- Added tests to ensure proper handling of filenames with forbidden characters and deduplication of instances with colliding names.
- Refactored metadata operations to improve clarity and maintainability, consolidating logic for reading and writing the `name` field in `.meta.json5` files.
- Introduced a new method `bare_slug_from_filename` to extract the bare slug from filenames by stripping known extensions and script suffixes, enhancing slugification accuracy.
- Updated comments to clarify the logic behind slug extraction, ensuring better understanding of the filename processing flow.
- Refactored existing code to utilize the new method for improved readability and maintainability in slug deduplication during directory processing.
- Removed the `dedup_against_dir` method from `JobThreadContext`, simplifying the slug deduplication logic during file operations.
- Streamlined the slugification process by directly assigning the slugified name without intermediate variables, enhancing readability.
- Consolidated metadata path handling in `ApiService`, improving code organization and reducing redundancy in path construction.
- Updated comments for better understanding of the changes made to slugification and metadata processing.
- Introduced a new method `dedup_against_dir` to deduplicate slugified names against existing entries in a parent directory, improving collision handling during file operations.
- Updated the `syncback_added_instance` method to utilize sibling slug sets, ensuring new instances do not overwrite existing files or directories.
- Refactored `strip_middleware_extension` to be publicly accessible for broader use in deduplication logic.
- Improved comments and code organization for better clarity in the slugification and deduplication processes.
- Updated comments in `json_model.rs` and `meta_file.rs` to clarify the logic for storing the real name of instances when the filesystem name differs due to slugification or deduplication.
- Simplified the conditions under which the real name is preserved, ensuring better readability and understanding of the code's intent.
- Added calls to `unsuppress_path` in various error handling scenarios within the `JobThreadContext` to ensure paths are correctly managed when file operations fail.
- Improved logging for failed write and serialization attempts, providing clearer feedback on issues encountered during metadata file processing.
- Consolidated CI pipeline steps into PowerShell and Bash scripts for improved usability and consistency.
- Updated documentation in `ci.md` to clarify the execution process and options for skipping the rbx-dom section.
- Enhanced error handling and reporting in the scripts to provide clearer feedback on CI step results.
- Streamlined formatting and linting processes for both Rojo and rbx-dom, ensuring a more efficient CI workflow.
- Updated the `slugify_name` function to strip trailing spaces and dots before checking for Windows reserved names, ensuring correct handling of inputs like "CON.".
- Added tests to validate the new slugification behavior, particularly for Windows reserved names with trailing characters.
- Refactored `syncback_dir_no_meta` to pre-seed `taken_names` from old children's slugified instance names, improving deduplication against existing siblings regardless of iteration order.
- Added a new method `remove_meta_name_field` to handle the removal of the `name` field from metadata files when renaming from a slugified name to a clean name.
- If the metadata file becomes empty after the removal, it is deleted entirely.
- Updated relevant sections in `JobThreadContext` to call this method when a clean name is detected, ensuring stale metadata is cleared appropriately.
- Consolidated repetitive calls to `syncback_instance_to_path_with_stats` into a new method `process_children_incremental` for better code organization and readability.
- Streamlined the handling of sibling slug computation by removing redundant logic, enhancing maintainability in `api.rs`.
- Updated function signatures to reflect changes in return types and improve clarity in the syncback process.
- Consolidated function calls in `syncback_instance_to_path_with_stats` across multiple files for better clarity and maintainability.
- Streamlined the formatting of function arguments to enhance code readability in `api.rs`, `file_names.rs`, and `project.rs`.
- Updated tests to reflect changes in function call structure while ensuring existing functionality remains intact.
- Introduced a migration plan to address the deduplication issue where bare slugs were compared against full filenames, leading to undetected file-format collisions.
- Updated `name_for_inst` to return a deduplication key alongside the filename and metadata flag, ensuring callers use the bare slug for collision detection.
- Replaced disk-based seeding of `taken_names` with tree-based slugified names to maintain consistency and avoid extension mismatches.
- Refactored relevant modules including `dir.rs`, `project.rs`, and `api.rs` to utilize the new deduplication logic.
- Updated tests to validate the new deduplication behavior and ensure correct handling of file-format instances.
- Updated the vscode-rojo submodule to the latest commit.
- Marked all phases of the path encoding migration plan as completed, transitioning to a slugify and deduplication approach.
- Updated documentation to reflect changes in filename handling and metadata management.
- Introduced a new migration plan to eliminate the `%NAME%` path encoding system.
- Replaced it with a slugify and deduplication approach as outlined in PR #1187.
- Detailed phases for implementation, including infrastructure changes, code replacements, and testing strategies.
- Updated relevant documentation and cursor rules to reflect the new naming conventions.