Commit graph

140 commits

Author SHA1 Message Date
Joe
d9fa62c88e Add server-side and test-side port retry mechanisms to handle race conditions
- Introduced a new plan to address port-in-use race conditions in both server and test environments.
- Implemented a retry mechanism with exponential backoff for binding to known ports in `LiveServer::start()`.
- Added a `respawn_with_new_port()` method in `TestServeSession` to handle transient port conflicts during tests.
- Modified `wait_to_come_online()` to retry with a new port if the server process exits due to `AddrInUse`.
- Updated `fresh_rebuild_read()` to include port retry logic, enhancing robustness against port conflicts.

These changes aim to improve the reliability of server and test interactions by mitigating race conditions related to port usage.
2026-02-19 01:34:53 -06:00
Joe
7d0232c430 Add automatic dedup suffix stripping to enhance syncback functionality
- Introduced a new plan to automatically strip `~N` dedup suffixes from filenames during forward sync, eliminating the need for redundant `.meta.json5` files.
- Implemented the `strip_dedup_suffix()` utility in `dedup_suffix.rs` to handle suffix removal.
- Updated `file_name_for_path()` and `get_dir_middleware()` to utilize the new stripping functionality.
- Modified syncback logic to skip writing meta `name` fields for dedup-only cases, ensuring cleaner instance naming.
- Enhanced existing tests and added new tests to cover the updated dedup behavior, ensuring robustness and correctness.

These changes aim to streamline the handling of deduplicated instances, improving overall system efficiency and clarity in naming conventions.
2026-02-19 01:15:28 -06:00
Joe
5b38648ead Update dependencies and improve syncback handling
- Updated versions of several dependencies in `Cargo.lock`, including `async-compression` (0.4.40), `aws-lc-rs` (1.16.0), `bumpalo` (3.20.1), and `compression-codecs` (0.4.37), ensuring compatibility and access to the latest features and fixes.
- Refactored the `fire` method in `SyncbackSignal` to return a boolean indicating whether a syncback was successfully initiated, preventing concurrent syncbacks.
- Enhanced error handling in the API syncback process to return a conflict response if a syncback is already in progress.
- Improved the `serve.rs` file by replacing `forget` with `drop` for better memory management and added checks to ensure service chunk integrity during live syncback operations.
- Added new tests for edge cases and resilience in live syncback functionality, ensuring robustness against malformed data and rapid sequential requests.

These changes aim to enhance the reliability and performance of the syncback feature while keeping dependencies up to date.
2026-02-19 00:17:43 -06:00
Joe
7e0538b9f5 Remove float-cmp dependency and implement custom float comparison logic
- Eliminated the `float-cmp` crate from the project, replacing its functionality with custom float comparison functions that match Lua's epsilon-based equality checks.
- Updated the `variant_eq` function to utilize the new fuzzy equality methods for `Float32` and `Float64` variants, ensuring consistent behavior across Rust and Lua implementations.
- Enhanced the matching algorithms in both forward sync and syncback processes to account for refined scoring of `Ref`, `Tags`, and `Attributes`, improving scoring accuracy and parity between implementations.
- Introduced a new plan document detailing the changes made to the matching algorithms, including the rationale for the updates and the expected impact on performance and correctness.

These changes aim to improve the reliability and maintainability of the matching algorithms while ensuring parity with Lua's behavior.
2026-02-18 23:57:12 -06:00
Joe
0450dabfce Refactor encoding logic in ChangeBatcher for improved readability and consistency
- Simplified the `isReadable` condition in `encodeService.lua` for better clarity.
- Updated float formatting functions in `json.rs` to enhance precision and consistency in numeric representation.
- Refactored handling of `AmbiguousValue` in `resolution.rs` to eliminate unnecessary type casting, improving data integrity.
- Cleaned up formatting in `serve.rs` and test files for better code readability.

These changes enhance the clarity and efficiency of the encoding and serialization processes, contributing to overall performance improvements.
2026-02-18 09:47:50 -06:00
Joe
39c8bd41f4 Enhance live syncback process with improved reference handling and float precision
- Implemented ObjectValue carriers for service-level references, allowing for accurate serialization of non-direct child references during syncback.
- Updated `encodeService` to include explicit handling of attributes and tags, ensuring they are properly encoded and preventing data loss.
- Refactored `build_dom_from_chunks` to manage ObjectValue carriers and resolve references correctly, enhancing data integrity.
- Truncated float values to f32 precision in `UnresolvedValue::from_variant`, aligning with rbxl storage requirements and improving consistency.

These changes address critical issues in the live syncback process, enhancing reliability and data accuracy.
2026-02-18 09:11:59 -06:00
Joe
a75a1443c0 Enhance syncback process by integrating serialization of service children
- Introduced `SerializationService` to serialize child instances during syncback, improving data handling.
- Updated `performSyncback` to include serialized children data in the syncback request.
- Refactored `ServiceChunk` structure to store child count instead of serialized data, optimizing memory usage.
- Adjusted related functions and tests to accommodate the new data structure, ensuring consistency and accuracy in syncback operations.

These changes significantly enhance the efficiency and clarity of the syncback process, allowing for better management of service data.
2026-02-18 08:21:25 -06:00
Joe
a823db0297 Refactor encoding logic in ChangeBatcher and improve matching depth handling
- Simplified the `isReadable` condition in `encodeService` for better readability.
- Updated the `ServiceChunk` structure to conditionally include properties and references only if they exist, enhancing data efficiency.
- Introduced a `MAX_SCORING_DEPTH` constant in the matching module to limit recursion depth, improving performance and preventing potential stack overflow issues.
- Refactored the `computePairCost` and `matchChildren` functions to incorporate the new depth parameter, ensuring accurate cost calculations during matching.

These changes enhance the clarity and efficiency of the encoding and matching processes, contributing to overall performance improvements.
2026-02-18 08:11:00 -06:00
Joe
e0fd9077e8 Refactor service encoding to streamline properties handling
- Removed the encoding of attributes and tags from the `encodeService` function, consolidating their inclusion into the properties map as `Variant::Attributes(...)` and `Variant::Tags(...)`.
- Updated the `ServiceChunk` struct to reflect these changes, ensuring a more efficient serialization process during syncback operations.
- Adjusted related tests to align with the new structure, enhancing overall data management and consistency in service encoding.

These modifications improve the clarity and performance of the service encoding process.
2026-02-18 08:00:49 -06:00
Joe
72ad84b5a7 Implement live syncback service properties encoding and enhance syncback functionality
- Introduced a new `encodeService` helper in the plugin to serialize service properties, attributes, tags, and references alongside children data.
- Updated the `performSyncback` function to utilize the new encoding method, ensuring all services are processed without child-only restrictions.
- Extended the `ServiceChunk` struct to include fields for properties, attributes, tags, and references, improving data handling during syncback.
- Modified the `build_dom_from_chunks` function to apply service properties and resolve references when reconstructing the service instances.
- Added comprehensive tests to validate the new service properties handling, ensuring accurate synchronization and data integrity.

These enhancements significantly improve the live syncback process, allowing for better service data management and consistency.
2026-02-18 07:22:29 -06:00
Joe
b687c8862d Enhance matching module with reference identity and caching improvements
- Introduced a new `RefIdentity` type to store reference details (name and className) in the matching process.
- Updated `VCache` and `SCache` structures to include references, improving the handling of reference comparisons during matching.
- Modified `cacheVirtual` and `cacheStudio` functions to support reference caching, enhancing performance and accuracy in matching.
- Improved `countOwnDiffs` function to account for reference mismatches, ensuring more precise cost calculations.
- Added comprehensive tests to validate the new reference handling and caching mechanisms.

These changes significantly enhance the efficiency and accuracy of the matching process in the application.
2026-02-18 06:16:33 -06:00
Joe
93ea0bdef6 Refactor syncback process and improve code readability
- Reformatted the `SYNCBACK_SERVICES` list for better readability by aligning entries vertically.
- Simplified the `performSyncback` function by removing unnecessary Promise wrapping, enhancing clarity and maintainability.
- Updated the `NotConnectedPage` component to improve the structure of button elements and their associated tooltips.
- Refactored the `hydrate` and `matching` modules to streamline function calls and improve code organization.

These changes enhance the overall readability and maintainability of the syncback process and related components.
2026-02-18 05:58:17 -06:00
Joe
b39c01e5e9 Add matching session caching and native codegen improvements
- Introduced a new matching session caching mechanism in the Lua matching module to enhance performance with native code generation.
- Rewrote the Lua matching algorithm to utilize session-based caching, reducing redundant computations and improving efficiency.
- Updated Rust implementations to include session caching, ensuring consistency across both Lua and Rust.
- Enhanced the `hydrate` function to support session management during instance hydration.
- Added comprehensive tests to validate the new caching mechanism and its integration with existing functionality.

These changes significantly improve the performance and maintainability of the matching process in the application.
2026-02-18 04:55:31 -06:00
Joe
307ac81aec Implement live syncback feature and enhance API for service data transfer
- Added a new `performSyncback` function in the `App` module to handle the synchronization of service data from the game to the server.
- Introduced a `SyncbackConfirm` UI component to confirm syncback actions from the user.
- Updated the API to include a new `/api/syncback` endpoint for handling syncback requests, validating protocol and server versions.
- Enhanced the `SyncbackSignal` mechanism to facilitate communication between the server and the syncback process.
- Added tests to ensure the functionality of the live syncback feature and its integration with the CLI.

These changes improve the overall synchronization capabilities of the application, allowing for real-time updates and better project management.
2026-02-18 04:36:57 -06:00
Joe
6f8e5a5cf2 Refactor code for improved readability and consistency
- Simplified function calls and removed unnecessary line breaks in `change_processor.rs`, `rojo_ref.rs`, `syncback/meta.rs`, `syncback/mod.rs`, `syncback/ref_properties.rs`, and `web/api.rs` to enhance code clarity.
- Updated test assertions in `two_way_sync.rs` for better readability by consolidating multiple lines into single assertions.

These changes improve the overall maintainability and readability of the codebase.
2026-02-18 04:21:50 -06:00
Joe
b8c3520d25 Add Luau-style ref paths migration plan and update related tests
- Introduced a new migration plan for converting `Rojo_Ref_*` attribute paths to Luau require-by-string style, enhancing portability with relative paths.
- Updated existing test snapshots to reflect the new path formats, ensuring consistency across various scenarios.
- Enhanced the `compute_relative_ref_path` and `resolve_ref_path` functions to support the new path semantics, improving path resolution logic.
- Refactored related code in `change_processor`, `syncback`, and `snapshot` modules to accommodate the new reference path handling.

These changes improve the robustness and maintainability of reference path management in the project.
2026-02-18 04:17:51 -06:00
Joe
d836ebddc8 Update deduplication logic and documentation for suffix handling
- Removed the `luau` dependency from `rokit.toml`.
- Updated deduplication logic to append `~2`, `~3`, etc. instead of `~1`, `~2` for naming collisions in various files, ensuring consistent suffix management.
- Adjusted comments and documentation across multiple files to reflect the new suffix handling rules.
- Added new test cases to validate the updated deduplication behavior, ensuring accurate naming for instances with collisions.

These changes enhance the clarity and functionality of the deduplication process, improving overall consistency in naming conventions.
2026-02-18 01:57:17 -06:00
Joe
a59d9d497a Add stage_paths field to PatchSet struct in tests
- Introduced a new field, `stage_paths`, to the `PatchSet` struct in `patch_compute.rs` to track filesystem paths for staging.
- Updated test cases to initialize `stage_paths` alongside other fields, ensuring consistency in patch set creation.

These changes enhance the testing framework by providing additional context for staged paths in patch sets.
2026-02-17 21:30:25 -06:00
Joe
6de088be31 Add batch script files and enhance git staging logic
- Introduced 20 new batch script files (BatchScript01.luau to BatchScript20.luau) for testing purposes.
- Enhanced the `change_processor` to consolidate git staging operations, reducing the risk of index.lock races by batching paths for staging.
- Updated the `PatchSet` struct to include a new field for pre-resolved filesystem paths to stage via git add.
- Modified the API to handle batch staging more efficiently, ensuring all files are staged correctly in mixed write scenarios.

These changes improve the testing framework and optimize git integration for batch operations.
2026-02-17 21:27:10 -06:00
Joe
6dec06865f Refactor code for improved readability and maintainability
- Simplified multi-line function calls in `PatchTree.lua` and `SHA1.luau` for better clarity.
- Enhanced the `init.lua` file by formatting the `PatchTree.build` function call across multiple lines.
- Updated `change_processor.rs` and `api.rs` to improve the formatting of function calls and enhance code consistency.
- Made minor adjustments in test files to streamline assertions and improve readability.

These changes contribute to a cleaner codebase and enhance overall maintainability.
2026-02-17 21:05:28 -06:00
Joe
6c0098d839 Add git metadata handling and integration tests for sync direction defaults
- Introduced new tests for git-based sync direction defaults, verifying the presence of git metadata and correct mappings of changed files to instance references.
- Enhanced the `compute_git_metadata` function to include canonical paths for repository roots.
- Added multiple test cases to ensure accurate behavior of `changedIds` and `scriptCommittedHashes` based on git status.
- Created a new project structure for testing, including various script and model files to facilitate comprehensive testing of git integration.

These changes improve the robustness of the git synchronization features and ensure reliable behavior in various scenarios.
2026-02-17 20:46:14 -06:00
Joe
7ba04f7f6a Update dependencies and implement git-based sync direction defaults
- Updated `clap` and `unicode-ident` versions in `Cargo.lock` and `Cargo.toml`.
- Added `sha1` crate to `Cargo.toml` for SHA1 hashing functionality.
- Introduced a new `git.rs` module for handling git operations, including changed files and SHA1 computation.
- Enhanced the sync confirmation dialog to auto-select defaults based on git status, improving user experience during two-way sync.
- Updated `PatchTree` to utilize git metadata for determining default selections during patch application.

These changes enhance the integration with git, providing smarter defaults and improving the overall sync process.
2026-02-17 20:36:28 -06:00
Joe
df22500102 Refactor code for improved clarity and maintainability
- Added `#[allow(clippy::too_many_arguments)]` annotations in `change_processor.rs` and `matching.rs` to suppress warnings for functions with multiple parameters.
- Updated `serve_session.rs` to include `clippy::type_complexity` in the `#[allow(dead_code)]` annotation for better code quality.
- Simplified array initialization in `file_names.rs` for consistency.
- Enhanced texture filtering logic in `matching_fixtures.rs` by replacing `map_or` with `is_some_and` for improved readability.

These changes contribute to a cleaner codebase and address static analysis warnings, ensuring better maintainability.
2026-02-17 20:04:52 -06:00
Joe
6ef81cf8e0 Refactor matching logic for improved readability and consistency
- Simplified function calls in `Reconciler/matching.lua` by consolidating multi-line arguments into single lines, enhancing code clarity.
- Updated `matching.rs` to improve formatting of method calls and assertions, ensuring a more consistent style throughout the test suite.
- Enhanced the `matching_fixtures.rs` file by streamlining the loading of input data and improving the readability of child copying logic.

These changes contribute to a cleaner and more maintainable codebase, facilitating easier future modifications.
2026-02-17 18:38:09 -06:00
Joe
21b3ee45fd Refactor descendant search functions for WeakDom and RojoTree
- Renamed `find_by_name` to `find_descendant` for clarity and updated its implementation to use recursion for improved search capabilities in `WeakDom`.
- Introduced a new function `find_descendant_by_name` for recursively finding descendants in `RojoTree`, enhancing the matching logic for nested structures.
- Updated references in the `syncback_matching_ufowave_textures` and `forward_matching_ufowave_textures` functions to utilize the new descendant search functions, improving code readability and maintainability.
2026-02-17 18:33:16 -06:00
Joe
b6e34b9eb7 Expose snapshot, syncback, and variant_eq modules publicly; add integration tests for matching algorithm
- Updated `lib.rs` to make the `snapshot`, `syncback`, and `variant_eq` modules publicly accessible.
- Introduced a new integration test file `matching_fixtures.rs` to validate the matching algorithm using real-world fixtures, ensuring accurate pairing of instances despite property discrepancies.
- Enhanced the test suite by adding the new `matching_fixtures` module to `mod.rs`, improving overall test coverage for the project.
2026-02-17 08:13:00 -06:00
Joe
0afe6be441 Update reflection database and enhance deduplication processes
- Updated the `rbx-dom` subproject to the latest commit for improved functionality.
- Enhanced the `/audit` command documentation to emphasize the importance of entering Plan mode before executing any actions.
- Improved the `atlas-dedup.mdc` file by adding details on user-initiated renames and ensuring ref path integrity during deduplication.
- Cleared out deprecated material color entries in `allValues.json` for better clarity.
- Updated `database.json` to reflect new properties and classes, including `AssetQualityService` and `BaseCoreGuiConfiguration`.
- Introduced new scripts for updating the reflection database, streamlining the process for generating necessary files.

These changes improve the overall functionality and maintainability of the project, ensuring better handling of deduplication and reflection updates.
2026-02-17 07:12:00 -06:00
Joe
85787f3452 Refactor code for improved readability and consistency
- Simplified the formatting of path handling in `change_processor.rs` and `fs_snapshot.rs` by consolidating multiple lines into single lines for better clarity.
- Updated test assertions in `two_way_sync.rs` to streamline the code and enhance maintainability.

These changes enhance the overall readability of the codebase, making it easier to manage and understand.
2026-02-17 06:34:44 -06:00
Joe
ed1f61c093 Complete audit plan updates and enhance deduplication processes
- Updated the audit plan for the ambiguous paths follow-up, marking all critical fixes as completed, including dedup cleanup, added paths, and ref path finalization.
- Introduced a new `atlas-dedup.mdc` file detailing the deduplication system, including matching algorithms, suffix cleanup, and integration for duplicate-named instances.
- Enhanced the `syncback` process to ensure proper handling of ref paths and deduplication, improving metadata consistency and overall system reliability.
- Implemented attribute-scoped path fixes in the `FsSnapshot` to ensure only relevant lines are modified during ref path updates.

These changes improve the clarity and effectiveness of the audit process while enhancing the deduplication and synchronization mechanisms within the project.
2026-02-17 06:08:24 -06:00
Joe
aabbfb23b2 Update ChangeBatcher tests to reflect encoding behavior for duplicate-named children
- Renamed test case to clarify that children with duplicate names are now encoded rather than skipped.
- Adjusted assertions to ensure all children are included in the encoded output, aligning with the updated encoding logic.
- Refactored related test cases for improved clarity and maintainability.

These changes enhance the accuracy of the ChangeBatcher tests, ensuring they correctly validate the new encoding behavior.
2026-02-17 05:00:24 -06:00
Joe
bb9d241253 Refactor Reconciler tests and update path handling logic
- Updated test descriptions in `diff.spec.lua` and `diff.stress.spec.lua` to reflect changes in behavior regarding duplicate-named children in both real and virtual DOM contexts.
- Adjusted assertions to ensure that duplicate-named children are correctly removed or added based on the new matching logic.
- Refactored `hydrate.lua` and `matching.lua` to streamline the matching process by removing unnecessary parameters, enhancing clarity and maintainability.
- Updated metadata references in various test files to include the `.model.json5` extension for consistency in path handling.

These changes improve the accuracy of reconciliation tests and enhance the overall robustness of the Reconciler's path handling logic.
2026-02-17 04:46:54 -06:00
Joe
d6162ac210 Complete implementation of the 3-pass matching algorithm for ambiguous path handling
- Finalized the transition from a duplicate-name blacklist system to a comprehensive 3-pass matching algorithm for both syncback and forward operations, enhancing the handling of ambiguous paths.
- Integrated a new `matching.lua` module to facilitate instance matching during hydration, utilizing unique name matching, class name narrowing, and structural fingerprinting.
- Updated various components, including `ChangeBatcher`, `Reconciler`, and `snapshot` modules, to leverage the new matching logic, ensuring robust file management and improved performance.
- Removed legacy duplicate handling code and streamlined the encoding process for instances with duplicate names.

These changes significantly enhance the clarity and efficiency of file operations, paving the way for improved project management and user experience.
2026-02-17 02:43:25 -06:00
Joe
a6341783ef Update Luau LSP and project configurations
- Upgraded `luau-lsp` dependency to version 1.62.0 for improved features and bug fixes.
- Modified sourcemap generator command in VSCode settings for better output handling.
- Enabled `fillCallArguments` in project template settings to enhance code completion.
- Added new configuration options for fragment autocomplete and quote conversion in project template settings.
- Introduced a `sourcemap` flag in `SyncbackCommand` to allow optional sourcemap generation during syncback operations.

These changes enhance the development experience and improve the functionality of the Luau language server integration.
2026-02-15 16:19:35 -06:00
Joe
37d2ca8986 Update settle duration in TestServeSession to improve message handling
- Adjusted the settle duration from 300ms to 100ms to ensure it is shorter than the 200ms reconciliation timer. This change prevents capturing tree-correction messages as part of the same batch, enhancing the accuracy of message processing in the test environment.

This update improves the reliability of message handling during test sessions.
2026-02-15 02:18:30 -06:00
Joe
9a70bf65e9 Update snapshot files to standardize messageCursor values
- Replaced numeric messageCursor values with a placeholder "[message-cursor]" across multiple snapshot files in the connected mode tests.
- This change ensures consistency in the handling of message cursors, facilitating easier updates and maintenance of test snapshots.

These updates improve the clarity and reliability of the snapshot files used in end-to-end testing.
2026-02-15 01:33:31 -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
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
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
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
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
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
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
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