fix(management): serialize lifecycle maintenance paths

- serialize deleteInstance with the same profile and plugin-layout locks as ensure

- lock non-account marketplace normalization paths and ignore .locks as an instance source
This commit is contained in:
Tam Nhu Tran committed 2026-03-18 08:04:48 -04:00
1 parent fc02c4b968
commit 36e8ed5d87
9 files changed
+115 -11

No files matched your search

@@ -159,6 +159,17 @@ describe('InstanceManager MCP sync', () => {
expect(String(warnSpy.mock.calls[0]?.[0] || '')).toContain('MCP sync skipped');
});
it('does not list lock housekeeping as an instance', async () => {
spyOn(SharedManager.prototype, 'syncProjectContext').mockResolvedValue(undefined);
spyOn(SharedManager.prototype, 'syncAdvancedContinuityArtifacts').mockResolvedValue(undefined);
spyOn(InstanceManager.prototype, 'syncMcpServers').mockImplementation(() => false);
const manager = new InstanceManager();
await manager.ensureInstance('work', { mode: 'isolated' });
expect(manager.listInstances()).toEqual(['work']);
});
it('skips shared symlinks and MCP sync for bare instance creation', async () => {
const linkSharedSpy = spyOn(
SharedManager.prototype,