Skip to content

fix(qcm): put the last seven map reads on fetchWithDeadline - #38

Merged
joepetjr merged 1 commit into
masterfrom
qcm-raw-fetch-tail
Oct 24, 2026
Merged

joepetjr merged 1 commit into
masterfrom
qcm-raw-fetch-tail

Conversation

@joepetjr

Copy link
Copy Markdown
Contributor

Follow-up to #37: the last seven map modules that still made their own raw fetch( calls now go through request.js fetchWithDeadline, so every remote read in the map has a deadline and a cancel.

Modules (themes/headlessmode/static/js/quiet-corners-maps/): address-geocode.js, source-avalanche.js, source-nrhp.js, source-ntad-rail-airports.js, source-nws-observations.js, source-snotel.js, source-stream-gauges.js. Public signatures and failure values are unchanged; fetchImpl stays injectable. geocodeAddress keeps every status (ready, none, bad-query, rate-limited, timeout, unavailable, aborted).

Guards:

  • scripts/qcm/no-raw-fetch.test.mjs: ALLOW is now empty.
  • scripts/qcm/adapter-deadlines.test.mjs: pending removed; eight new deadline and abort rows (geocode, avalanche zone store, NRHP, rail, airports, observations, SNOTEL, gauges), plus a deadline test for the two loadCatalogue reads.
  • scripts/qcm/README.md no longer lists the exceptions.

Verification:

  • Red first: the new rows failed 20/110 before the modules moved.
  • Full node --test scripts/qcm/*.test.mjs with the site built: 3002 pass / 14 fail. All 14 were no free browser slot in /tmp/qcm-browser-slots after 300000 ms (the box's Chromium slots were taken by other runs), not assertions.
  • Those 13 files rerun at --test-concurrency=1: 81/81 pass.

address-geocode.js and the six source-* modules (avalanche, nrhp, ntad-rail-airports, nws-observations, snotel, stream-gauges) made their own raw fetch calls with no deadline from request.js. Each now reads through fetchWithDeadline at its source's registry timeoutMs (the geocoder keeps its 10 s), keeping its public signature and failure value. no-raw-fetch's ALLOW list is empty and adapter-deadlines has a row per module.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant