fix: a trashed note file leaves its note, quieter MCP sweep, bounded compose logs

A note's attachment moved to the trash from the file manager kept
showing on the note; the hydration read now skips it, as the chat one
already did. The MCP session sweep logged a line every minute while any
session was open; it logs only when it cleaned something. The compose
file caps the container log, and three test mocks that pointed at
modules long gone are removed.
This commit is contained in:
Maurice
2026-10-07 16:47:53 +02:00
parent 76df44d8de
commit 72fbbd55d4
9 changed files with 21 additions and 13 deletions
-4
View File
@@ -28,10 +28,6 @@ vi.mock('../../src/websocket', () => ({
broadcastToUser: vi.fn(),
getOnlineUserIds: vi.fn(() => []),
}));
vi.mock('../../src/services/memories/immichService', () => ({
uploadToImmich: vi.fn(async () => null),
getImmichCredentials: vi.fn(() => null),
}));
import { db as testDb } from '../../src/db/database';
import { buildApp } from '../../src/bootstrap';
@@ -874,6 +874,10 @@ describe('repository parity', () => {
// CB6's narrow attachment projection.
const legacyAttachments = testDb.prepare('SELECT id, filename, original_name, file_size, mime_type FROM trip_files WHERE note_id = ? ORDER BY id ASC').all(note.id);
expect(await notesRepo.listAttachmentsForNote(note.id)).toEqual(legacyAttachments);
// A file moved to the trash from the file manager leaves the note.
testDb.prepare("UPDATE trip_files SET deleted_at = CURRENT_TIMESTAMP WHERE note_id = ? AND original_name = 'b.png'").run(note.id);
expect((await notesRepo.listAttachmentsForNote(note.id)).map(a => a.original_name)).toEqual(['a.pdf']);
});
it('COLLAB-REPO-002: CollabPollsRepository/CollabPollVotesRepository match the legacy queries for a multiple-choice poll voted on every option', async () => {