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; }