Skip to content

Daemon 1.7.0 & Plugin v45 - #55

Merged
Ransomwave merged 16 commits into
mainfrom
dev
Jul 19, 2026
Merged

Ransomwave merged 16 commits into
mainfrom
dev

Conversation

@Ransomwave

@Ransomwave Ransomwave commented Jul 18, 2026 •

Copy link
Copy Markdown
Owner

Daemon

Plugin

the type checker can't figure out that isScript is narrowing down the instance's type, so we need to cast it manually
@Ransomwave
Ransomwave marked this pull request as ready for review July 19, 2026 17:07
@coderabbitai

coderabbitai Bot commented Jul 19, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The release updates terrain protection, serializer property handling, centralized logging, SyncSession batching and lifecycle control, UI configuration refresh, plugin sourcemap metadata, and deleted-script sibling recovery.

Changes

Synchronization and recovery

Layer / File(s) Summary
Serialization, logging, and terrain protection
plugin/sync/ReplicatedFirst/AzulCompanionPlugin/AzulService.luau, plugin/sync/ReplicatedFirst/AzulCompanionPlugin/Logger.luau, plugin/sync/ReplicatedFirst/AzulCompanionPlugin/Serializer.luau
Terrain is protected from destructive removal, serializer property discovery and diagnostics are updated, and informational logging is routed through Logger.
Session event tracking and batching
plugin/sync/ReplicatedFirst/AzulCompanionPlugin/SyncSession.luau
Snapshot checks, listener tracking, outbound batching, script-change guards, and destructive wipe handling are reorganized.
Handshake and connection lifecycle
plugin/sync/ReplicatedFirst/AzulCompanionPlugin/SyncSession.luau
Handshake signaling, websocket listener setup, retry termination, sync shutdown, and auto-connect cancellation are streamlined.
UI refresh and packed plugin metadata
package.json, plugin/sync/ReplicatedFirst/AzulCompanionPlugin/App/UI.luau, plugin/sync/ReplicatedFirst/AzulCompanionPlugin/UI.luau, plugin/sourcemap.json
Configuration fields now refresh through UpdateConfig, UI handlers are condensed, the package version increases, and packed plugin GUID and metadata entries are updated.
Deleted-script sibling recovery
src/index.ts
Deleted-node handling restores matching sibling scripts, rewrites their files, and updates the sourcemap before directory cleanup.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant RobloxEvents
  participant SyncSession
  participant WebSocket
  participant HandshakeSignal
  participant RobloxListeners
  RobloxEvents->>SyncSession: report instance or script change
  SyncSession->>SyncSession: validate inclusion and queue update
  SyncSession->>WebSocket: flush batched update
  WebSocket->>SyncSession: acknowledge handshake
  SyncSession->>HandshakeSignal: fire handshake event
  SyncSession->>RobloxListeners: attach listeners after connection
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The PR includes unrelated work for logger, UI, sync-session, sourcemap, and daemon recovery beyond #53/#54. Split unrelated refactors and release/versioning updates into separate PRs, and keep this change focused on WeldConstraint serialization and Terrain handling.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The serializer and destructive-build changes address #54 and #53 by saving script-accessible properties and skipping Terrain.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title accurately summarizes the main release bump reflected in the changeset: Daemon 1.7.0 and Plugin v45.
Description check ✅ Passed The description matches the implemented changes, including daemon fixes, serializer updates, Terrain handling, and logging changes.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (1)
plugin/sync/ReplicatedFirst/AzulCompanionPlugin/Serializer.luau (1)

870-890: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick win

Debug-only computations run unconditionally on a hot path.

instance:GetFullName() (line 870) and HttpService:JSONEncode(properties) (line 889) are evaluated via string interpolation before debugPrint even checks SILENT_MODE/DEBUG_MODE — Luau evaluates call arguments eagerly. Since collectSerializedProperties runs once per instance during full snapshots with includeProperties (e.g. azul pack), this adds a JSONEncode call and a full-name walk per instance even when debug logging is disabled.

⚡ Suggested fix: gate the expensive formatting behind the debug flag
 function Serializer.collectSerializedProperties(...)
-	debugPrint(`Collecting serialized properties for instance: {instance:GetFullName()} of class: {instance.ClassName}`)
+	if not (Config.SILENT_MODE or not Config.DEBUG_MODE) then
+		debugPrint(`Collecting serialized properties for instance: {instance:GetFullName()} of class: {instance.ClassName}`)
+	end
 	...
-	debugPrint(`Collected serialized properties for instance: {instance}: {HttpService:JSONEncode(properties)}`)
+	if not (Config.SILENT_MODE or not Config.DEBUG_MODE) then
+		debugPrint(`Collected serialized properties for instance: {instance}: {HttpService:JSONEncode(properties)}`)
+	end
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugin/sync/ReplicatedFirst/AzulCompanionPlugin/Serializer.luau` around lines
870 - 890, Gate the debug-only formatting in collectSerializedProperties behind
the existing debug flag before constructing either message: avoid calling
instance:GetFullName() for the collection-start log and
HttpService:JSONEncode(properties) for the completion log unless debug output is
enabled. Preserve both debug messages and serialization behavior when debugging
is active.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@plugin/sync/ReplicatedFirst/AzulCompanionPlugin/Serializer.luau`:
- Around line 763-774: Update the `hasScriptPermits` check in the property
filtering logic to require writable script access via `reflected.Permits.Write`
or `reflected.Permits.WriteParallel`, rather than treating any non-empty
`Permits` table as sufficient. Preserve the existing global/fallback
serialization checks and continue allowing writable properties such as
`WeldConstraint.Part0` and `Part1`.

In `@plugin/sync/ReplicatedFirst/AzulCompanionPlugin/SyncSession.luau`:
- Around line 420-458: Make attachListeners idempotent by tracking instances
whose listeners have already been attached and returning early for tracked
instances; mark each instance before creating connections. Ensure all callers,
including setupListeners, onInstanceAdded, and snapshot apply loops, reuse this
guard so each instance receives only one set of Name, Parent, and Source
connections.

In `@src/index.ts`:
- Around line 318-341: Update the sameNameScriptNodes handling to iterate over
every remaining sibling instead of selecting only sameNameScriptNodes.at(-1).
For each script, retain the existing write and watcher-suppression flow, rename
oldFilePaths to reflect that scriptToRename.path contains virtual path segments,
and pass undefined as the oldPath argument to sourcemapGenerator.upsertSubtree,
matching handleScriptChanged.

---

Nitpick comments:
In `@plugin/sync/ReplicatedFirst/AzulCompanionPlugin/Serializer.luau`:
- Around line 870-890: Gate the debug-only formatting in
collectSerializedProperties behind the existing debug flag before constructing
either message: avoid calling instance:GetFullName() for the collection-start
log and HttpService:JSONEncode(properties) for the completion log unless debug
output is enabled. Preserve both debug messages and serialization behavior when
debugging is active.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 36dd18fa-032d-40d3-90d7-2446e669262c

📥 Commits

Reviewing files that changed from the base of the PR and between 8858442 and 32340f0.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (5)
  • package.json
  • plugin/sync/ReplicatedFirst/AzulCompanionPlugin/AzulService.luau
  • plugin/sync/ReplicatedFirst/AzulCompanionPlugin/Serializer.luau
  • plugin/sync/ReplicatedFirst/AzulCompanionPlugin/SyncSession.luau
  • src/index.ts

Comment thread plugin/sync/ReplicatedFirst/AzulCompanionPlugin/Serializer.luau
Comment thread plugin/sync/ReplicatedFirst/AzulCompanionPlugin/SyncSession.luau
Comment thread src/index.ts Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@plugin/sync/ReplicatedFirst/AzulCompanionPlugin/Logger.luau`:
- Around line 6-20: Update Logger.info’s vararg processing to use select("#",
...) for the argument count instead of `#args`, ensuring every positional argument
after nil is converted and included in the finalString output.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 0776f683-8a82-4d1b-b9cf-a200aa16d6e4

📥 Commits

Reviewing files that changed from the base of the PR and between 35f468d and 97904c2.

📒 Files selected for processing (7)
  • plugin/sourcemap.json
  • plugin/sync/ReplicatedFirst/AzulCompanionPlugin/App/UI.luau
  • plugin/sync/ReplicatedFirst/AzulCompanionPlugin/AzulService.luau
  • plugin/sync/ReplicatedFirst/AzulCompanionPlugin/Logger.luau
  • plugin/sync/ReplicatedFirst/AzulCompanionPlugin/Serializer.luau
  • plugin/sync/ReplicatedFirst/AzulCompanionPlugin/SyncSession.luau
  • plugin/sync/ReplicatedFirst/AzulCompanionPlugin/UI.luau
💤 Files with no reviewable changes (1)
  • plugin/sync/ReplicatedFirst/AzulCompanionPlugin/Serializer.luau
🚧 Files skipped from review as they are similar to previous changes (2)
  • plugin/sync/ReplicatedFirst/AzulCompanionPlugin/AzulService.luau
  • plugin/sync/ReplicatedFirst/AzulCompanionPlugin/SyncSession.luau

Comment thread plugin/sync/ReplicatedFirst/AzulCompanionPlugin/Logger.luau
@Ransomwave
Ransomwave merged commit a3b0a03 into main Jul 19, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants