Studio doesn't clean up ChangeHistoryService recordings for unloaded plugins

When reloading the reproduction plugin it will warn “Recording in progress!”, because the ChangeHistoryService recording the previous loaded version of the plugin started was never cancelled by studio when it reloaded the plugin.

This also occurs if the plugin is uploaded to Roblox and then uninstalled and installed, or disabled and enabled.

Reproduction Plugin:
RecordingReproPlugin.rbxmx (1.5 KB)

Expected behavior

I would expect in-progress ChangeHistoryService recordings for a plugin to be cancelled by studio whenever a plugin is unloaded.

Edited post to provide a repro, turns out I forgot I had to manually give a warning if no id is given by ChangeHistoryService:TryBeginRecording().

Turns out this also occurs for whenever any plugin is deleted, as when studio cleans up a deleted plugin it doesn’t clean up its in-progress ChangeHistoryService recording.

Just tested with uploading the plugin to roblox, and then uninstalling from the Manage Plugins Menu. As well with disabling PluginDebugging and then deleting the local plugin.

Mentioned this bug in docs for now in the caveats warning:
https://create.roblox.com/docs/studio/plugins#support-undo-and-redo