Preserve climbing catalogue results during provider failures

AS
34s ago
+1234-826

Provider failures discarded successful climbing catalogue results and rendered upstream HTML as repeated section failures. Preserve usable source results and original failures for Sentry, use concise HTTP error messages, and show one expandable metadata warning on web and mobile.

Also accept OpenBeta's observed empty Mountain Project reference without accepting malformed nonempty identities, deduplicate overlapping provider errors, and invalidate the old error-bearing caches. Existing matching rules and API response shapes remain unchanged.

Integration CI now uses five duration-balanced shards because observed database-suite variation exhausted the four-shard test budget despite timing refreshes. Preserve every test, coverage gate, and the 12-minute limit; strict timing export/merge requires all five successful artifacts.

Validation:

  • Full unit/mobile suite: 24,346 passed, 19 existing skips.
  • Full lint; root, server, web, and mobile typechecks; both affected library builds.
  • Packed ESM installation smoke test, live OpenBeta lookup, and web/mobile Storybook interaction and phone-width layout checks.
  • Independent review completed and its overlapping-error deduplication finding fixed with a regression test.

The earlier upstream 502, KAYA rejection, and theCrag redirect causes remain unconfirmed despite subsequent successful replays. No retries, timeouts, credentials, redirect policy, or production configuration changed. Production deployment is still required.


Summary by cubic

Preserves climbing catalogue results when one provider fails instead of discarding successful sources and rendering raw upstream HTML as repeated section errors. Successful source results are now retained for callers while original failures are reported to Sentry; HTTP error messages are concise with the body preserved in diagnostic properties, and web and mobile show a single expandable metadata warning.

Bug Fixes

  • Accept OpenBeta's observed empty Mountain Project reference without accepting malformed nonempty identities.
  • Deduplicate overlapping provider errors across cached lookups.
  • Bump cache key versions to invalidate old errors that embedded raw HTML.
  • Expand integration tests from four to five shards with refreshed measured timings so stale duration estimates no longer push a shard past the deadline.

Production deployment is required; no retry, timeout, or configuration changes are included.

Summary by Sourcery

Preserve usable climbing catalogue metadata and make provider failures concise, deduplicated, and observable across server, web, mobile, and CI.

Bug Fixes:

  • Preserve successful climbing catalogue results when other providers fail while retaining original failures for diagnostics and Sentry reporting.
  • Prevent upstream HTML from leaking into default HTTP error messages while keeping response bodies available as diagnostic data.
  • Accept OpenBeta's observed empty Mountain Project reference without relaxing validation for malformed nonempty references.
  • Deduplicate overlapping provider errors and invalidate cached responses containing the previous error format.

Enhancements:

  • Display a single expandable metadata warning on web and mobile while keeping recorded climbing results visible.
  • Retain partial catalogue results with bounded error-state cache lifetimes during provider failures.

CI:

  • Expand integration testing from four to five duration-balanced shards while preserving the existing test, coverage, and timing constraints.

Documentation:

  • Document the climbing catalogue failure handling and the five-shard integration testing workflow, including the related production incident findings.

Tests:

  • Add regression coverage for partial provider results, concise HTTP errors, empty-reference handling, duplicate error disclosure, cache behavior, and five-shard timing artifact validation.

Summary by CodeRabbit

  • Bug Fixes
    • Successful climbing results remain available when another catalogue provider fails, with partial results cached appropriately.
    • Climbing pages show one concise metadata warning, keep recorded climbs visible, and provide expandable, deduplicated provider details.
    • Provider error messages include status and retry guidance without exposing upstream response bodies.
    • Empty climbing identity references are treated as absent; malformed nonempty references remain invalid.
  • Documentation
    • Updated catalogue and HTTP provider guidance to describe error handling and caller responsibilities.