refactor(core): remove the single-mind to multi-mind migration (P1.2)

needsMigration and migrateToMultiMind moved a pre-M4 default.mind to
personal.mind at startup. The community edition has no installs with that
layout, so the module, its export, the startup step, its "migration" progress
phase and the default.mind first-run check go.
This commit is contained in:
shumeiko.it
2026-10-24 16:41:51 +02:00
parent 2226ec1bd7
commit 9aae9d6537
6 changed files with 10 additions and 229 deletions

View File

@@ -62,13 +62,6 @@ describe('isFirstRun', () => {
expect(isFirstRun(dir)).toBe(false);
});
it('returns false when default.mind exists (needs migration)', () => {
const dir = makeTmpDir();
tmpDirs.push(dir);
fs.writeFileSync(path.join(dir, 'default.mind'), '');
expect(isFirstRun(dir)).toBe(false);
});
it('returns true when directory does not exist yet', () => {
const dir = path.join(os.tmpdir(), 'waggle-nonexistent-' + Date.now());
// Don't create it
@@ -112,9 +105,6 @@ describe('startService onProgress', () => {
expect(phases).toContain('init');
expect(phases).toContain('ready');
// Should NOT have migration phase (fresh install, no default.mind)
expect(phases).not.toContain('migration');
// Progress should go from 0 to 1
expect(events[0].progress).toBeLessThanOrEqual(0.2);
expect(events[events.length - 1].progress).toBe(1);
@@ -126,29 +116,6 @@ describe('startService onProgress', () => {
}
});
it('emits migration phase when default.mind exists', async () => {
const dataDir = makeTmpDir();
tmpDirs.push(dataDir);
// Create default.mind to trigger migration
fs.writeFileSync(path.join(dataDir, 'default.mind'), '');
const port = randomPort();
const events: StartupEvent[] = [];
const { server } = await startService({
dataDir,
port,
skipLiteLLM: true,
onProgress: (event) => events.push(event),
});
cleanups.push(async () => { await server.close(); });
const phases = events.map(e => e.phase);
expect(phases).toContain('migration');
expect(phases).toContain('ready');
});
it('emits litellm phase when not skipped (but still skips in test)', async () => {
const dataDir = makeTmpDir();
tmpDirs.push(dataDir);