mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-06 11:24:00 +00:00
fix(firms): drop argument spread in fires.push — RangeError silently dropped 2 of 3 VIIRS sources (#93)
* fix(firms): drop spread in fires.push — RangeError silently killed 2 of 3 VIIRS sources
fires.push(...records) passes every record as a function argument. A
world/2 VIIRS pull returns ~131k records for NOAA20 and SNPP, over V8's
~125k argument limit, so both threw RangeError: Maximum call stack size
exceeded. The throw landed after sources.push({ok:true}), so each failed
source was listed twice — once ok:true with its real count, once ok:false
— while its records were dropped entirely. Only NOAA21 (114k, under the
limit) survived, making the layer look healthy at a third of the data.
Global fire count goes 113,996 -> 377,169.
* docs(changelog): record the FIRMS multi-source merge fix
* docs(changelog): move the FIRMS fix into a new Unreleased section above 0.1.0
---------
Co-authored-by: Bilawal Sidhu <[email protected]>
Co-authored-by: Bilawal Sidhu <[email protected]>
This commit is contained in:
2 files changed
+14
-1
No files matched your search
@@ -3,6 +3,16 @@
|
|||||||
This changelog records public product changes. For the authoritative description
|
This changelog records public product changes. For the authoritative description
|
||||||
of current runtime behavior, see [`docs/CURRENT-STATE.md`](docs/CURRENT-STATE.md).
|
of current runtime behavior, see [`docs/CURRENT-STATE.md`](docs/CURRENT-STATE.md).
|
||||||
|
|
||||||
|
## [Unreleased]
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- All three VIIRS sources now reach the Active Fires layer. Merging a source's
|
||||||
|
detections used argument spread, which exceeds the engine's argument limit on
|
||||||
|
the two largest sources and dropped them entirely — leaving roughly a third of
|
||||||
|
global detections while reporting each dropped source twice, once as
|
||||||
|
successful with its real count and once as failed.
|
||||||
|
|
||||||
## [0.1.0] — 2026-08-31 — One-click install, keyless boot, Provider Settings
|
## [0.1.0] — 2026-08-31 — One-click install, keyless boot, Provider Settings
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
+4
-1
@@ -2086,7 +2086,10 @@ function firmsProxy() {
|
|||||||
try {
|
try {
|
||||||
const records = filterTrailing24h(await fetchSource(key, source), now);
|
const records = filterTrailing24h(await fetchSource(key, source), now);
|
||||||
sources.push({ source, count: records.length, ok: true });
|
sources.push({ source, count: records.length, ok: true });
|
||||||
fires.push(...records);
|
// NOT fires.push(...records): spread passes each record as an argument,
|
||||||
|
// and a world/2 VIIRS pull exceeds V8's argument limit (~125k) at
|
||||||
|
// ~131k records — RangeError, and the whole source is silently dropped.
|
||||||
|
for (const record of records) fires.push(record);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.warn(`[firms-proxy] ${source} fetch failed:`, err?.message || err);
|
console.warn(`[firms-proxy] ${source} fetch failed:`, err?.message || err);
|
||||||
sources.push({ source, count: 0, ok: false });
|
sources.push({ source, count: 0, ok: false });
|
||||||
|
|||||||
Reference in new issue
Block a user