mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-23 05:51:39 +00:00
- Added a new section in `audit.md` for the Live Syncback Pipeline, detailing the plugin encoding, transport, and server handling processes. - Included entries for newly introduced files `encodeHelpers.lua` and `encodeService.lua` in the audit documentation. - Updated the audit checklist to cover live syncback parity and related concerns. - Revised rule MDC files (`atlas-api.mdc`, `atlas-plugin.mdc`, `atlas-dedup.mdc`) to reflect recent changes, including the addition of `encodeHelpers.lua` and clarifications on `SyncbackConfirm`. - Ensured comprehensive coverage of new test suites in the audit documentation. These changes aim to enhance the clarity and accuracy of the audit documentation and rules, aligning them with the latest codebase updates.
7.4 KiB
7.4 KiB
| name | overview | todos | isProject | |||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Update audit and rules | Update `.cursor/commands/audit.md` to cover the live syncback pipeline, new files (encodeHelpers, encodeService, new test suites), and refactored encoding architecture. Fix discrepancies in rule MDC files where they don't reflect recent code changes. |
|
false |
Update Audit Command and Rule Files
Summary of Discrepancies Found
After comparing all 8 rule MDC files and the audit command against the actual source code and recent git history (40+ commits including live syncback, matching session caching, encodeHelpers refactor, float precision, git sync defaults), here are the issues:
audit.md - Major Gaps
- No live syncback pipeline -- The audit command describes only two pipelines (CLI syncback, two-way sync). The live syncback pipeline (
POST /api/syncback) is a third distinct flow involvingencodeService.lua,SyncbackConfirmUI,handle_api_syncback,build_dom_from_chunks, andrun_live_syncback. Not covered at all. - Missing
encodeHelpers.lua-- New shared helper module (plugin/src/ChangeBatcher/encodeHelpers.lua) that consolidatesencodeAttributes,encodeTags, andforEachEncodableProperty. BothencodeInstance.luaandencodeService.luaimport from it. Not mentioned anywhere in audit.md. - Missing
encodeService.lua-- New file (plugin/src/ChangeBatcher/encodeService.lua) for service-level property encoding during live syncback. Not mentioned. - Missing 3 new test suites --
tests/tests/live_syncback.rs,tests/tests/git_sync_defaults.rs,tests/tests/matching_fixtures.rsare not referenced in the audit's test infrastructure section. - Missing
SyncbackConfirmUI -- The floating confirmation dialog for live syncback (rendered inApp/init.lua) is not mentioned in the plugin UI or data flow sections. - Missing live syncback audit checklist -- No equivalent of sections 11a-11m for live syncback-specific concerns (service property encoding, ObjectValue carrier lifecycle, rbxm blob reconstruction, clean-mode-only semantics, server restart behavior).
atlas-api.mdc - Issues
- Missing
encodeHelpers.luain the ChangeBatcher file table (section "ChangeBatcher"). The table listsinit.lua,createPatchSet.lua,encodePatchUpdate.lua,encodeInstance.lua,encodeService.lua,encodeProperty.lua,propertyFilter.lua-- butencodeHelpers.luais missing. **encodeInstance.luadescription** says "includes duplicate detection helpers" but doesn't note that property iteration was refactored to useencodeHelpers.forEachEncodableProperty().
atlas-plugin.mdc - Issues
- Missing
encodeHelpers.luafrom the file listing under "4. ChangeBatcher" section. TheencodeHelpers.luafile exportsencodeAttributes,encodeTags,forEachEncodableProperty. **SyncbackConfirm**is listed under StatusPages (SyncbackConfirm- "Floating dialog for live syncback confirmation (rendered byApp/init.lua)") which is slightly misleading. It's NOT a StatusPage file -- it's rendered inline inApp/init.luaas aStudioPluginGuiwithisEphemeral = true. The parenthetical note is correct but the placement under StatusPages implies a separate file.
atlas-dedup.mdc - Issues
- Missing
encodeHelpers.luafrom the Key Files Map table. This file is relevant because it contains the shared property filtering logic (forEachEncodableProperty) used during instance encoding for both two-way sync additions and live syncback.
Changes
Changes to audit.md
Section "Sync System Layout" -- add Live Syncback Pipeline after the Two-Way Sync section:
Add a third pipeline section covering:
- Plugin-side:
SYNCBACK_SERVICESinApp/init.lua,encodeService.lua,performSyncback(),SyncbackConfirmdialog - Transport:
POST /api/syncback(MessagePack) - Server-side:
handle_api_syncbackinapi.rs,SyncbackSignal/LiveServerinmod.rs,build_dom_from_chunks/run_live_syncbackinserve.rs - Wire types:
SyncbackRequest,ServiceChunk,SyncbackPayloadininterface.rs
Section "Plugin --> Server" -- add encodeHelpers.lua to the Change Batching subsection:
- Add entry for
plugin/src/ChangeBatcher/encodeHelpers.luadescribingencodeAttributes,encodeTags,forEachEncodableProperty - Add entry for
plugin/src/ChangeBatcher/encodeService.luadescribing service-level encoding for live syncback
Section "Shared Infrastructure" -- add new test files:
tests/tests/live_syncback.rs-- Live syncback parity, validation, lifecycle, edge casestests/tests/git_sync_defaults.rs-- Git-based sync default selection teststests/tests/matching_fixtures.rs-- Matching algorithm fixture tests
Add new audit section 11n: Live Syncback Parity covering:
- Service property encoding completeness (
encodeService.luavsfilter_properties) - ObjectValue carrier lifecycle (created, serialized, destroyed)
- rbxm blob reconstruction (
build_dom_from_chunkschild distribution) - Clean mode semantics (always
incremental=false) - Server restart behavior (session invalidation, reconnection)
SYNCBACK_SERVICESlist consistency withVISIBLE_SERVICESin Rust- Protocol/version/placeId validation
- Round-trip: live syncback output must match CLI syncback output
Update Audit Reading Order (step 9 area) to include live syncback flow.
Changes to Rule MDC Files
**atlas-api.mdc:**
- Add
encodeHelpers.luarow to ChangeBatcher file table with description: "Shared encoding helpers:encodeAttributes,encodeTags,forEachEncodableProperty. Used byencodeInstance.luaandencodeService.lua." - Update
encodeInstance.luarow to note it usesencodeHelpers.forEachEncodableProperty()for property iteration
**atlas-plugin.mdc:**
- Add
encodeHelpers.luato the "4. ChangeBatcher" file listing with description: "Shared property encoding helpers (encodeAttributes,encodeTags,forEachEncodableProperty)" - Move
SyncbackConfirmfrom the StatusPages list to its own note under the App section, clarifying it's rendered inline inApp/init.luaas a floatingStudioPluginGui, not a separate StatusPage file
**atlas-dedup.mdc:**
- Add
plugin/src/ChangeBatcher/encodeHelpers.luato the Key Files Map table with subsystem "Encoding" and purpose "Shared property filtering/encoding helpers used byencodeInstance.luaandencodeService.lua"