todos-contra-el-fuego-web/imports/startup/server
vjrj 124ed4e135 refactor(subsUnion): extract the logic out of Meteor.startup, cap the union size
Everything the union does lived inside a Meteor.startup callback with no exports:
the queue, the incremental fast path, the worker-failure handling. None of it was
reachable from a test, which is how three separate incidents shipped — a failed
worker stored as an empty union (50ca9cc), turf deps unresolvable from the worker
(3249362/570cb49) and a recompute that blocked the event loop and froze DDP
(b4e5511/fbb746f). subsUnionLogic.js now takes its collaborators as arguments and
subsUnion.js is only the wiring.

The FIXME at the old subsUnion.js:82 goes with it, because it lives inside the
extracted storeUnion: a union over 16 MiB is simply rejected by Mongo, so the map
would freeze at the last union that happened to fit, silently. unionSizeGuard.js
degrades the geometry instead — coordinate precision, then vertex decimation,
then holes, then the smallest polygons — until it fits, and reports what it did
so the setting document records it. The cap is 8 MiB rather than 16: the same
string is pushed to every browser over DDP.

addNoisy no longer mutates the document it is given, so the public pass cannot
leak its fuzzing into the private one.
2026-08-01 18:02:04 +02:00
..
accounts WIP(meteor3): boot progresses past linker + several async fixes 2026-07-13 23:46:45 +02:00
api.js quality: web debt batch (tests runner, FireContainer, rate-limit, maps, i18n) 2026-07-21 22:59:06 +02:00
calcUnionAsync.js fix(subsUnion): drop duplicated programs/server prefix in npm path 2026-07-30 09:04:11 +02:00
catchExceptions.js Removed some coments 2018-05-03 01:37:22 +02:00
cron.js notif: remove code migrated to tcef-notifications microservice 2026-07-13 19:45:13 +02:00
email.js WIP(meteor3): boot progresses past linker + several async fixes 2026-07-13 23:46:45 +02:00
facts.js meteor3: purge dead client packages — web UI renders on 3.1 2026-07-14 11:32:19 +02:00
feedback.js Change feedback email 2018-02-21 20:50:44 +01:00
fixtures.js meteor3: re-enable fixtures and sitemaps with async/Meteor-3 implementations 2026-07-14 07:06:07 +02:00
i18n.js deps: i18next 10 -> 23, react-i18next 7 -> 14 2026-07-18 06:28:41 +02:00
index.js sentry: tunnel client events through the app to dodge Cloudflare's 503 2026-07-17 18:17:47 +02:00
IPGeocoder.js smoke: REST API regression harness + baseline snapshots (Meteor 1.6.1.1) 2026-07-13 19:42:55 +02:00
isMaster.js Added master/worker pm2 detection and mail configuration 2018-04-04 08:42:02 +02:00
leaflet-workaround.js Refactor server startup: elimina segfaults, añade leaflet-workaround 2026-07-12 23:26:16 +02:00
migrations.js meteor3: port all 18 migration up() bodies to async 2026-07-14 11:36:30 +02:00
prerender.js Remove log 2018-02-17 08:52:50 +01:00
ravenLogger.js meteor3: raven -> @sentry/node + @sentry/browser 2026-07-16 12:20:02 +02:00
rest.js Rest api updated 2018-06-14 17:55:38 +02:00
sentryTunnel.js sentry: tunnel client events through the app to dodge Cloudflare's 503 2026-07-17 18:17:47 +02:00
sitemaps.js meteor3: re-enable fixtures and sitemaps with async/Meteor-3 implementations 2026-07-14 07:06:07 +02:00
subsUnion.js refactor(subsUnion): extract the logic out of Meteor.startup, cap the union size 2026-08-01 18:02:04 +02:00
subsUnionLogic.js refactor(subsUnion): extract the logic out of Meteor.startup, cap the union size 2026-08-01 18:02:04 +02:00
unionBounds.js refactor(subsUnion): extract the logic out of Meteor.startup, cap the union size 2026-08-01 18:02:04 +02:00
unionSizeGuard.js refactor(subsUnion): extract the logic out of Meteor.startup, cap the union size 2026-08-01 18:02:04 +02:00