diff --git a/client/src/sync/mutationQueue.ts b/client/src/sync/mutationQueue.ts index 1d013b0d4..83854c83c 100644 --- a/client/src/sync/mutationQueue.ts +++ b/client/src/sync/mutationQueue.ts @@ -358,7 +358,7 @@ export const mutationQueue = { blockedTrips.add(mutation.tripId) } } else { - // No answer at all (network) or a retryable status — reset to + // No answer at all (network) or a retryable status: reset to // pending and stop the flush; the next trigger retries. await offlineDb.mutationQueue.update(mutation.id, { status: 'pending', diff --git a/client/tests/unit/sync/mutationQueue.test.ts b/client/tests/unit/sync/mutationQueue.test.ts index 5cd3a7973..fb3706341 100644 --- a/client/tests/unit/sync/mutationQueue.test.ts +++ b/client/tests/unit/sync/mutationQueue.test.ts @@ -504,7 +504,7 @@ describe('mutationQueue.flush — failure handling (B3)', () => { }); }); -describe('mutationQueue.flush — a write the server keeps failing on', () => { +describe('mutationQueue.flush: a write the server keeps failing on', () => { it('holds back only its own trip, with a growing gap, while other trips sync', async () => { const stuck = generateUUID(); const sameTrip = generateUUID(); @@ -563,7 +563,7 @@ describe('mutationQueue.flush — a write the server keeps failing on', () => { }); }); -describe('mutationQueue — parked changes', () => { +describe('mutationQueue: parked changes', () => { it('retryFailed puts them back in line from a fresh start and sends them', async () => { const id = generateUUID(); await mutationQueue.enqueue(makeMutation({ id })); diff --git a/client/tests/unit/sync/tripSyncManager.test.ts b/client/tests/unit/sync/tripSyncManager.test.ts index c09ebc770..c233bf855 100644 --- a/client/tests/unit/sync/tripSyncManager.test.ts +++ b/client/tests/unit/sync/tripSyncManager.test.ts @@ -438,7 +438,7 @@ describe('tripSyncManager.syncAll — logout while syncing', () => { vi.mock('../../../src/repo/roadtripPreferencesRepo', () => ({ roadtripPreferencesRepo: { read: vi.fn(async () => ({})) } })) -describe('tripSyncManager.syncAll — deletions made elsewhere', () => { +describe('tripSyncManager.syncAll: deletions made elsewhere', () => { it('drops cached rows the server no longer has, and keeps the ones created offline', async () => { const tripId = 400; const bundle = makeBundle(tripId); diff --git a/server/src/db/repositories/CollabNotes.repository.ts b/server/src/db/repositories/CollabNotes.repository.ts index 68da7eb88..b9926aa7a 100644 --- a/server/src/db/repositories/CollabNotes.repository.ts +++ b/server/src/db/repositories/CollabNotes.repository.ts @@ -193,7 +193,7 @@ export class CollabNotesRepository extends TrekRepository { // ------------------------------------------------------------------------- /** - * CB6 (`formatNote`'s hydration read) — `SELECT id, filename, original_name, + * CB6 (`formatNote`'s hydration read): `SELECT id, filename, original_name, * file_size, mime_type FROM trip_files WHERE note_id = ? AND deleted_at IS * NULL`. A note's file can be moved to the trash from the file manager; it * leaves the note then, as a chat attachment leaves its message. diff --git a/server/src/db/repositories/Users.repository.ts b/server/src/db/repositories/Users.repository.ts index 617790a60..5b569766a 100644 --- a/server/src/db/repositories/Users.repository.ts +++ b/server/src/db/repositories/Users.repository.ts @@ -931,7 +931,7 @@ export class UsersRepository extends TrekRepository { * `SELECT id FROM users WHERE LOWER(email) = LOWER(?) [AND id != ?] AND COALESCE(is_guest, 0) = 0` * * Both sides folded by SQLite's own `LOWER()` (`lowerParam` binds the RAW - * value) — program rule 18. Every email collision check goes through here + * value), program rule 18. Every email collision check goes through here * (profile, admin create and update), because login and the OIDC fallback * match case-insensitively: a second account that differs only in case * would make them pick whichever row comes first. diff --git a/server/tests/unit/db/repositories/Users.repository.test.ts b/server/tests/unit/db/repositories/Users.repository.test.ts index dea5a7dff..834169cb1 100644 --- a/server/tests/unit/db/repositories/Users.repository.test.ts +++ b/server/tests/unit/db/repositories/Users.repository.test.ts @@ -514,7 +514,7 @@ describe('UsersRepository', () => { }); }); - describe('findForPasswordReset (AU36) — case-insensitive, like login', () => { + describe('findForPasswordReset (AU36): case-insensitive, like login', () => { it('USERSREPO-035: finds an address stored with capitals from the lowercased input the service passes', async () => { const { user } = createUser(testDb, { email: 'Exact@Example.com' }); expect((await users.findForPasswordReset('exact@example.com'))?.id).toBe(user.id); diff --git a/server/tests/unit/nest/admin.service.test.ts b/server/tests/unit/nest/admin.service.test.ts index b9160bbff..6e3e40ab3 100644 --- a/server/tests/unit/nest/admin.service.test.ts +++ b/server/tests/unit/nest/admin.service.test.ts @@ -991,7 +991,7 @@ describe('createUser — the pre-existing uniqueness-check TOCTOU window (AD2-4, spy.mockRestore(); }); - it('ADMIN-SVC-095 — an address that differs only in case is already taken, on create and on update', async () => { + it('ADMIN-SVC-095: an address that differs only in case is already taken, on create and on update', async () => { const { user: existing } = createUser(testDb, { email: 'Case@Test.example.com' }); const { user: other } = createUser(testDb, { email: 'other-case@test.example.com' }); diff --git a/server/tests/unit/nest/backup.impl.test.ts b/server/tests/unit/nest/backup.impl.test.ts index 96133bb41..4782ed003 100644 --- a/server/tests/unit/nest/backup.impl.test.ts +++ b/server/tests/unit/nest/backup.impl.test.ts @@ -1264,7 +1264,7 @@ describe('BACKUP-045 restoreFromZip — full success path (no uploads)', () => { expect(callOrder.indexOf('closeDb')).toBeLessThan(callOrder.indexOf('copyFileSync')); }); - it('BACKUP-045g — keeps a copy of the database it replaces, before closing it', async () => { + it('BACKUP-045g: keeps a copy of the database it replaces, before closing it', async () => { setupSuccessfulExtraction(); setupAllTablesPresent(); const { RequestContext } = await import('@mikro-orm/core'); @@ -1285,7 +1285,7 @@ describe('BACKUP-045 restoreFromZip — full success path (no uploads)', () => { expect(logMock.logInfo).toHaveBeenCalledWith(expect.stringContaining('the replaced database was kept as')); }); - it('BACKUP-045h — a database that cannot be copied does not block the restore', async () => { + it('BACKUP-045h: a database that cannot be copied does not block the restore', async () => { setupSuccessfulExtraction(); setupAllTablesPresent(); const { RequestContext } = await import('@mikro-orm/core'); diff --git a/server/tests/unit/nest/cron-registrar.service.test.ts b/server/tests/unit/nest/cron-registrar.service.test.ts index 45ebd1aec..046dda73f 100644 --- a/server/tests/unit/nest/cron-registrar.service.test.ts +++ b/server/tests/unit/nest/cron-registrar.service.test.ts @@ -85,7 +85,7 @@ describe('CronRegistrarService', () => { expect(registrar.jobCount).toBe(0); }); - it('CRONREG-014 — a tick still running is not started again, and a failed tick reaches the app log', () => { + it('CRONREG-014: a tick still running is not started again, and a failed tick reaches the app log', () => { const { registrar } = makeRegistrar(false); registrar.register('slow-job', '0 * * * *', () => {}); const job = h.jobs[0]!; diff --git a/server/tests/unit/nest/reminder-jobs.service.test.ts b/server/tests/unit/nest/reminder-jobs.service.test.ts index be0b5f914..584c99186 100644 --- a/server/tests/unit/nest/reminder-jobs.service.test.ts +++ b/server/tests/unit/nest/reminder-jobs.service.test.ts @@ -165,7 +165,7 @@ describe('trip reminder tick', () => { expect(logMock.logInfo).toHaveBeenCalledWith(expect.stringMatching(/^Trip reminders sent for 2 trip\(s\): /)); }); - it('RJOB-012 — catches up a reminder the job missed, sends each one once, and again for a moved trip', async () => { + it('RJOB-012: catches up a reminder the job missed, sends each one once, and again for a moved trip', async () => { const { user } = createUser(testDb); // Due yesterday (start in 2 days, reminder 3 days ahead): the job did not run then. const missed = createTrip(testDb, user.id, { title: 'Missed' }); diff --git a/wiki/Backups.md b/wiki/Backups.md index 56f7c3edd..4ffde6f2f 100644 --- a/wiki/Backups.md +++ b/wiki/Backups.md @@ -40,7 +40,7 @@ Before restoring, TREK runs integrity checks on the uploaded database: 1. **SQLite `PRAGMA integrity_check`** — verifies the database file is not corrupt. 2. **Required tables present** — confirms the file contains `users`, `trips`, `trip_members`, `places`, and `days`. Files missing any of these are rejected as not being a valid TREK backup. -3. **Not from a newer TREK** — a backup whose database a newer release migrated is refused with `This backup was made by a newer TREK version. Update TREK before restoring it.` Restoring it would leave this version unable to start. +3. **Not from a newer TREK**: a backup whose database a newer release migrated is refused with `This backup was made by a newer TREK version. Update TREK before restoring it.` Restoring it would leave this version unable to start. The database being replaced is kept as `data/pre-restore-