From 670e952c29034c1b3497514f9361854ba6f3410c Mon Sep 17 00:00:00 2001 From: Manjunath Date: Tue, 3 Nov 2026 17:55:38 +0530 Subject: [PATCH] fix(voice): name the outline source that answered The outline rungs recorded only the credit kind, so the voice area code never saw 'openfreemap' or 'nominatim' and stored every such outline as the Overpass rung, even with no Overpass configured. Voice geometry tagged the source originally; the merge with main kept main's untagged rungs and its test pinning the absence. The tag is restored and the test now asserts it for both sources. --- src/annotations/outlineRungs.js | 3 +++ src/annotations/outlineRungs.test.mjs | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/annotations/outlineRungs.js b/src/annotations/outlineRungs.js index 0d5e965c8..88a2361e4 100644 --- a/src/annotations/outlineRungs.js +++ b/src/annotations/outlineRungs.js @@ -290,6 +290,9 @@ export function createOutlineRungs({ const patch = finish(fp, asScope); if (patch?.ring) { patch.outlineCredit = provider === 'openfreemap' ? 'tiles' : 'osm'; + // Which source answered, so a stored area names it (OpenFreeMap or + // Nominatim) instead of defaulting to the Overpass rungs. + patch.outlineSource = provider; ctx.credit?.(patch.outlineCredit); // One line per answered outline, like the resolver's own trace. console.log( diff --git a/src/annotations/outlineRungs.test.mjs b/src/annotations/outlineRungs.test.mjs index cd02a2819..6554e6f61 100644 --- a/src/annotations/outlineRungs.test.mjs +++ b/src/annotations/outlineRungs.test.mjs @@ -146,7 +146,7 @@ test('a street comes from tiles before the configured ladder, as merged ribbons' ); assert.ok(result.ring.length > 6); assert.equal(result.polygons.length, 1); - assert.equal('outlineSource' in result, false); + assert.equal(result.outlineSource, 'openfreemap'); assert.equal(run.calls.base, 0, 'the ladder is not consulted'); assert.deepEqual(run.calls.finished, ['street']); assert.deepEqual(credits, ['tiles']); @@ -416,6 +416,7 @@ test('a city with no configured Overpass is outlined by Nominatim', async () => ); assert.deepEqual(result.ring, ring); assert.equal(result.outlineCredit, 'osm'); + assert.equal(result.outlineSource, 'nominatim'); assert.deepEqual(nominatim.asks[0], { query: 'Toulouse', kind: 'city',