Commit graph

1823 commits

Author SHA1 Message Date
Joe
056d3609f7 Add two-way sync support for Ref properties and optimize related components
- Implemented two-way sync for Ref properties using `Rojo_Ref_*` attributes, enabling detection of changes in Studio and path-based encoding.
- Developed `RefPathIndex` for efficient resolution of attributes during forward sync, including handling ambiguous paths.
- Enhanced `ChangeProcessor` and `ChangeBatcher` to manage Ref property changes during live sync sessions.
- Introduced `InstanceMap:getIdByInstance` for reverse lookups and added comprehensive integration tests for various edge cases.
- Optimized CI scripts for improved parallel execution of Rust tasks.

These updates significantly enhance the synchronization system's handling of Ref properties and improve overall performance.
2026-02-14 17:20:45 -06:00
Joe
6da946961f Update Luau LSP sourcemap setting to disable autogeneration
- Changed the `luau-lsp.sourcemap.autogenerate` setting from `true` to `false` in the VSCode configuration, altering the behavior of sourcemap generation for the Luau language server.

This change ensures that sourcemaps are not automatically generated, allowing for more controlled management of source mapping in the development environment.
2026-02-14 17:03:19 -06:00
Joe
f28ee8435a Update audit plans and documentation for Rojo_Ref_* attributes
- Revised the audit documentation to standardize the naming convention for `Rojo_Ref_*` attributes, ensuring consistency across all references.
- Enhanced the design section to clarify the handling of attribute updates during instance renames, emphasizing the need for accurate path updates.
- Adjusted the processing order in `compute_ref_properties` to prioritize `Rojo_Target_*` attributes, preventing unintended overwrites of `Rojo_Ref_*` attributes.
- Added new tests to verify the correct behavior of reference path changes and ensure robustness against edge cases.

These changes improve the clarity and reliability of the synchronization system's handling of reference attributes.
2026-02-14 17:00:10 -06:00
Joe
699fe60ba5 Add integration tests for Ref properties in standalone file formats
- Introduced a new audit plan addressing test coverage gaps identified in the fourth audit of the two-way sync Ref property feature.
- Added integration tests for Ref properties on standalone scripts and non-script standalone files, ensuring correct handling of adjacent meta file paths.
- Created a new fixture file for testing purposes, enhancing the robustness of the test suite.

These changes improve test coverage and reliability of the synchronization system's handling of Ref properties.
2026-02-14 16:29:02 -06:00
Joe
012c20b1b9 Add audit plan for Fix Ref Audit Round 3 addressing correctness and code quality issues
- Introduced a new audit plan detailing six fixes identified in the third audit of two-way sync Ref properties, including populating the RefPathIndex on startup, refining the removal process for attributes, and updating stale comments.
- Enhanced documentation to clarify the context and standards for the fixes, ensuring adherence to project guidelines.
- Completed integration and unit tests for all identified fixes to verify functionality and maintain robustness.

These changes improve the reliability and clarity of the synchronization system's handling of Ref properties.
2026-02-14 15:56:29 -06:00
Joe
e617e8fcda Enhance audit documentation and improve Ref property handling
- Added a detailed section in the audit documentation outlining the sync system layout for both CLI syncback and two-way sync pipelines, including file mappings and processing steps.
- Updated `init.meta.json5` to include the `Rojo_Ref_PrimaryPart` attribute for better reference tracking.
- Improved the `ChangeProcessor` to populate the `RefPathIndex` from existing meta/model files at startup, ensuring accurate handling of pre-existing `Rojo_Ref_*` attributes during renames.
- Refactored the `remove_file` method in `RefPathIndex` to `remove_all_for_file`, enhancing the re-indexing process after attribute removals.
- Added tests to verify the correct behavior of the `RefPathIndex` and ensure robustness against edge cases.

These changes improve the clarity of the audit process and enhance the reliability of reference path management in the synchronization system.
2026-02-14 15:55:24 -06:00
Joe
c3efb0e560 Optimize CI scripts for Rust tasks by adding parallel execution
- Updated `cargo` commands in both `ci.ps1` and `ci.sh` scripts to utilize the `-j 16` flag, enabling parallel execution for linting, building, and testing processes. This change improves the efficiency of CI workflows by reducing execution time for Rust tasks.
- Ensured consistency across both scripts to maintain functionality and performance enhancements.

These modifications enhance the overall performance of the CI pipeline for Rust projects.
2026-02-14 13:53:55 -06:00
Joe
075cca4c96 Add audit plan for Ref property fixes and enhance CI test execution
- Introduced a new audit plan detailing fixes for four issues identified in the second audit of two-way sync Ref properties, including stale comments, slugified name mismatches, immediate ID assignments, and performance optimizations.
- Updated CI scripts to run Rust tests with increased parallelism by specifying `--test-threads=16`, improving test execution efficiency.
- Enhanced error handling in `update_ref_paths_in_file` to provide clearer context on failures during file reading and JSON parsing.

These changes improve the documentation for Ref property audits and optimize the CI testing process.
2026-02-14 13:52:59 -06:00
Joe
faa12dc573 Implement RefPathIndex for efficient handling of Rojo_Ref_* attributes
- 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.
2026-02-14 13:28:29 -06:00
Joe
ca2a938902 Enhance audit documentation and address critical Ref property issues
- 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.
2026-02-14 12:53:28 -06:00
Joe
8f0df692d3 Enhance InstanceMap and ChangeBatcher for unresolved Ref properties
- 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.
2026-02-14 12:18:58 -06:00
Joe
4070b48308 Add audit documentation and enhance two-way sync handling
- 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.
2026-02-14 12:08:12 -06:00
Joe
c181172460 Refactor test cases and improve snapshot handling
- 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.
2026-02-14 11:36:48 -06:00
Joe
bbd9c0e0fa test fixtures 2026-02-14 11:04:28 -06:00
Joe
bf65d8bfa8 initial work 2026-02-14 10:56:25 -06:00
Joe
252325a7de Add block_newline_gaps configuration to stylua.toml
- 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.
2026-02-13 21:11:50 -06:00
Joe
4c6de0d174 8.2.0
- 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>
2026-02-12 02:29:46 -06:00
CoderJoey
d84b6a35ae
Merge pull request #1 from UserGeneratedLLC/vfs-patches
Vfs patches
2026-02-12 02:25:18 -06:00
Joe
2e49763b69 Update snapshot files and enhance VFS event handling
- 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.
2026-02-12 02:13:58 -06:00
Joe
b1789a37be Refactor VFS event handling in ChangeProcessor
- 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.
2026-02-12 01:44:39 -06:00
Joe
7f89d4ce29 Enhance tree synchronization and testing capabilities
- 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.
2026-02-11 20:41:29 -06:00
Joe
8462c06b82 Enhance VFS initialization and error handling
- 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.
2026-02-11 20:13:02 -06:00
Joe
ec7f91017b Refactor API file handling and improve echo suppression documentation
- 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.
2026-02-11 19:08:26 -06:00
Joe
e2f515d8eb Update dependencies and enhance VFS staleness testing
- 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.
2026-02-11 18:50:43 -06:00
Joe
200c5ca219 Update protocol version to 6 and enhance API documentation
- 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.
2026-02-11 18:24:30 -06:00
Joe
f798f3f5e8 Enhance connected mode test suite and introduce VFS staleness fixtures
- 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.
2026-02-11 17:56:37 -06:00
Joe
316d7ea70e Update logging levels in Rojo plugin and enhance test plans
- 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.
2026-02-11 17:10:35 -06:00
Joe
2cc1726975 Add git configuration and update gitignore for project template
- 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.
2026-02-11 16:09:28 -06:00
Joe
77b9c0e520 Update Luau LSP sourcemap file in VS Code settings
- Changed the Luau LSP sourcemap project file from "plugin.project.json5" to "default.project.json5" in the VS Code configuration for the project template.
2026-02-11 16:03:10 -06:00
Joe
11d0e9d830 Update VS Code configuration and dependencies
- 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.
2026-02-11 15:56:01 -06:00
Joe
737b3782dd 8.1.0
- 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>
2026-02-11 02:10:23 -06:00
Joe
f037ec3b7c Refactor filename handling in ApiService to streamline slugification logic
- 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.
2026-02-11 02:06:07 -06:00
Joe
72b1d8d42e Merge branch 'slugify' into master
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.
2026-02-11 01:56:49 -06:00
Joe
bb266789c0 Add audit plan for slugify branch pass 3 and implement critical fixes
- 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.
2026-02-11 01:31:09 -06:00
Joe
2a917bf8e1 Update rbx-dom subproject reference to latest commit 2533e16e 2026-02-10 22:24:30 -06:00
Joe
e01a143a28 Update rbx-dom subproject reference to latest commit 5c8c108d 2026-02-10 22:07:10 -06:00
Joe
8dfca6b171 Update rbx-dom subproject reference and adjust CI script paths for Lua and Rust formatting tools
- 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.
2026-02-10 22:03:52 -06:00
boatbomber
2ac0f11730 Add option to forget prior info for place in reminder notif (#1215) 2026-02-10 21:47:42 -06:00
Joe
434a3c458a Refactor CI documentation and improve change processing logic
- 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.
2026-02-10 21:44:29 -06:00
boatbomber
095e78dff2 Add option to forget prior info for place in reminder notif (#1215) 2026-02-10 21:43:29 -06:00
Joe
2ff5c3936c Implement fixes and enhancements from audit pass 2
- 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.
2026-02-10 21:35:26 -06:00
Joe
baf05dcb3d Update slugify branch audit plan and implement fixes for identified issues
- 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.
2026-02-10 20:18:33 -06:00
Joe
d8175d3b48 Add audit plan for slugify branch to ensure round-trip fidelity 2026-02-10 19:30:48 -06:00
Joe
917949edc6 Add bare_slug_from_filename method for improved filename processing
- 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.
2026-02-10 19:15:58 -06:00
Joe
085e1ab3f5 Refactor change processing and metadata handling for improved clarity
- 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.
2026-02-10 19:04:47 -06:00
Joe
7d47fe73f6 Enhance slug deduplication and metadata handling in syncback process
- 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.
2026-02-10 18:09:53 -06:00
Joe
f38c1f1311 Refactor metadata name handling for improved clarity
- 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.
2026-02-10 17:34:12 -06:00
Joe
5a5e1a0c77 Enhance error handling in metadata file operations
- 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.
2026-02-10 17:10:45 -06:00
Joe
f496bee347 Refactor CI pipeline scripts and documentation
- 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.
2026-02-10 16:46:26 -06:00
Joe
9688224cb4 Enhance slugification process and deduplication logic
- 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.
2026-02-10 04:10:00 -06:00