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.
This commit is contained in:
Joe 2026-02-11 17:10:35 -06:00
parent 2cc1726975
commit 316d7ea70e
17 changed files with 2443 additions and 1553 deletions

View file

@ -21,6 +21,7 @@ local Log = require(Packages.Log)
local RbxDom = require(Packages.RbxDom)
local encodeProperty = require(script.Parent.encodeProperty)
local UNENCODABLE_DATA_TYPES = require(script.Parent.propertyFilter)
-- Script class names that need Source property
local SCRIPT_CLASS_NAMES = {
@ -234,6 +235,10 @@ encodeInstance = function(instance, parentId, _skipPathCheck)
-- Get the full PropertyDescriptor for encoding
local descriptor = RbxDom.findCanonicalPropertyDescriptor(instance.ClassName, propertyName)
if descriptor then
if UNENCODABLE_DATA_TYPES[descriptor.dataType] then
continue
end
local encodeSuccess, encodeResult = encodeProperty(instance, propertyName, descriptor)
if encodeSuccess and encodeResult ~= nil then
properties[propertyName] = encodeResult

View file

@ -3,6 +3,7 @@ local Log = require(Packages.Log)
local RbxDom = require(Packages.RbxDom)
local encodeProperty = require(script.Parent.encodeProperty)
local UNENCODABLE_DATA_TYPES = require(script.Parent.propertyFilter)
return function(instance, instanceId, properties)
local update = {
@ -21,6 +22,10 @@ return function(instance, instanceId, properties)
continue
end
if UNENCODABLE_DATA_TYPES[descriptor.dataType] then
continue
end
local encodeSuccess, encodeResult = encodeProperty(instance, propertyName, descriptor)
if not encodeSuccess then

View file

@ -11,7 +11,13 @@ return function(instance, propertyName, propertyDescriptor)
end
local dataType = propertyDescriptor.dataType
local encodeSuccess, encodeResult = RbxDom.EncodedValue.encode(readResult, dataType)
local pcallOk, encodeSuccess, encodeResult = pcall(RbxDom.EncodedValue.encode, readResult, dataType)
if not pcallOk then
-- Encoder threw an error (e.g., Ref, Region3, SharedString)
Log.warn("Could not sync back property {:?}.{}: {}", instance, propertyName, encodeSuccess)
return false, nil
end
if not encodeSuccess then
Log.warn("Could not sync back property {:?}.{}: {}", instance, propertyName, encodeResult)

View file

@ -107,12 +107,11 @@ function ChangeBatcher:__flush()
return nil
end
-- Log summary at debug level
local addedCount = 0
for _ in pairs(patch.added) do
addedCount += 1
end
Log.debug("Two-way sync: {} updates, {} additions, {} removals", #patch.updated, addedCount, #patch.removed)
Log.info("Two-way sync: {} updates, {} additions, {} removals", #patch.updated, addedCount, #patch.removed)
return patch
end

View file

@ -0,0 +1,16 @@
--[[
Property type blacklist for encoding, matching the server-side
filter_properties_for_meta behavior in src/web/api.rs.
Types listed here are skipped during property encoding because they
cannot be serialized to JSON or are meaningless for syncback.
]]
-- Property data types that cannot be encoded standalone.
-- Matches the Variant::Ref / Variant::UniqueId filter in api.rs.
local UNENCODABLE_DATA_TYPES = {
Ref = true, -- Instance references; need the InstanceMap, not encodable standalone
UniqueId = true, -- Internal Roblox identifiers; not meaningful for syncback
}
return UNENCODABLE_DATA_TYPES