From ec57ae10b12298afce2ba3629027f20625715577 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Wed, 14 Oct 2026 19:20:01 +0200 Subject: [PATCH] docs(labs): describe the registry listing by what uses it Rewords a code comment that referred to the work by its planning step, and a loop counter's comment, to say what the code does. --- src/lib/labs/analyte-key-store.ts | 4 ++-- src/lib/labs/unit-conversion/registry.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/labs/analyte-key-store.ts b/src/lib/labs/analyte-key-store.ts index dfefa416d..e2b1a12bc 100644 --- a/src/lib/labs/analyte-key-store.ts +++ b/src/lib/labs/analyte-key-store.ts @@ -30,10 +30,10 @@ export async function ensureAnalyteKey( marker: MarkerKeyState, ): Promise { let current: MarkerKeyState = marker; - // Two rounds: the caller's copy, then the row as it stands if that copy was + // Two attempts: the caller's copy, then the row as it stands if that copy was // stale. A third writer racing both is vanishingly rare; the derived key is // still the right answer for the name this call saw. - for (let round = 0; round < 2; round++) { + for (let attempt = 0; attempt < 2; attempt++) { const derived = matchAnalyteKey({ name: current.name, unit: current.unit }); const stored = current.analyteKey ?? null; if (stored === derived) return derived; diff --git a/src/lib/labs/unit-conversion/registry.ts b/src/lib/labs/unit-conversion/registry.ts index 37148c03c..675c175e7 100644 --- a/src/lib/labs/unit-conversion/registry.ts +++ b/src/lib/labs/unit-conversion/registry.ts @@ -230,7 +230,7 @@ export function analyteConversionFor( return analyteKey ? (BY_KEY.get(analyteKey) ?? null) : null; } -/** Every entry, once each, for the guard test and for phase 3's key matching. */ +/** Every entry, once each, for the guard test and the analyte key matching. */ export function allAnalyteConversions(): readonly AnalyteConversion[] { return ENTRIES; }