From 97188c16d1437a7a515b83b375ac039e2b3b8ca0 Mon Sep 17 00:00:00 2001 From: Maurice Date: Mon, 2 Nov 2026 14:11:27 +0100 Subject: [PATCH] fix(place-contrib): mark the independent writes and use TREK's OSM id form in the catch-up test --- server/src/nest/place-contrib/place-contrib.job.ts | 1 + server/src/nest/place-contrib/place-contrib.service.ts | 1 + server/src/nest/service-identity/service-key.job.ts | 1 + .../nest/place-contrib/place-contrib-backfill.service.test.ts | 2 +- 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/server/src/nest/place-contrib/place-contrib.job.ts b/server/src/nest/place-contrib/place-contrib.job.ts index e214a4ee0..3af3b9d88 100644 --- a/server/src/nest/place-contrib/place-contrib.job.ts +++ b/server/src/nest/place-contrib/place-contrib.job.ts @@ -57,6 +57,7 @@ export class PlaceContribJob implements OnApplicationBootstrap { return this.running; } + /** @txIndependent the catch-up step and the send run each commit their own writes; a failed step never holds back the send. */ private async runOnce(): Promise { this.again = false; // A failed catch-up step never keeps what is queued from going out. diff --git a/server/src/nest/place-contrib/place-contrib.service.ts b/server/src/nest/place-contrib/place-contrib.service.ts index 762b4df8d..599b71662 100644 --- a/server/src/nest/place-contrib/place-contrib.service.ts +++ b/server/src/nest/place-contrib/place-contrib.service.ts @@ -223,6 +223,7 @@ export class PlaceContribService { }); } + /** @txIndependent the switches and the catch-up commit together before any withdrawal asks the service, which is network I/O. */ private async changeFields( consent: PlaceContribConsent, fields: PlaceContribFieldSwitches, diff --git a/server/src/nest/service-identity/service-key.job.ts b/server/src/nest/service-identity/service-key.job.ts index cc0b87fc6..7a959ef0f 100644 --- a/server/src/nest/service-identity/service-key.job.ts +++ b/server/src/nest/service-identity/service-key.job.ts @@ -24,6 +24,7 @@ export class ServiceKeyJob implements OnApplicationBootstrap, OnApplicationShutd private readonly registrar: CronRegistrarService, ) {} + /** @txIndependent a daily schedule and a first check, each on its own; the key service writes in its own background work. */ onApplicationBootstrap(): void { if (!this.registrar.isEnabled()) return; this.registrar.register('service-key-renewal', `${randomInt(60)} ${randomInt(24)} * * *`, () => this.keys.settle()); diff --git a/server/tests/unit/nest/place-contrib/place-contrib-backfill.service.test.ts b/server/tests/unit/nest/place-contrib/place-contrib-backfill.service.test.ts index 78755466b..0ac7410c9 100644 --- a/server/tests/unit/nest/place-contrib/place-contrib-backfill.service.test.ts +++ b/server/tests/unit/nest/place-contrib/place-contrib-backfill.service.test.ts @@ -64,7 +64,7 @@ const ALL: PlaceContribFieldSwitches = { image: true, }; const GERS = 'gers:ceba0e62-172b-4343-bb3b-78b915a18383'; -const OSM = 'node/4242'; +const OSM = 'node:4242'; const ADMIN = 1; const NOW = new Date('2026-11-02T12:00:00Z');