fix: report stale and partial data in more tool answers

A sweep for the same pattern found more answers presented as current and
complete: launches and satellite orbits served from a stale proxy cache, a
regional aircraft fallback read as worldwide, license plate cameras trimmed
or partly loaded, and a radio directory of popular stations read as every
station. The launch and satellite sources now report the proxies' stale
markers, and each answer says what it covers.
This commit is contained in:
Sameh Khamis committed 2026-10-02 15:21:36 -07:00
1 parent 6a45a8f6a2
commit e779432925
10 files changed
+185 -25

No files matched your search

+8 -1
View File
@@ -118,10 +118,17 @@ export const aircraftInArea = defineTool({
.map((record) => aircraftRow(record, center))
.sort((a, b) => a.distance_km - b.distance_km);
const kind = args.military ? 'military aircraft' : 'aircraft';
// A regional fallback feed covers only part of the world around the
// area's center; say so rather than imply a worldwide answer.
const regional = /regional/i.test(snapshot.coverage || '');
const notes = [
...(regional ? [`regional feed: ${snapshot.coverage}`] : []),
...(snapshot.freshness === 'stale' ? ['data may be stale'] : []),
];
return {
summary:
`${rows.length} ${kind} in ${area.label}` +
(snapshot.freshness === 'stale' ? ' (data may be stale).' : '.'),
(notes.length ? ` (${notes.join('; ')}).` : '.'),
data: { ...capRows(rows, args.limit), ...snapshotInfo(snapshot) },
};
},