• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ThePalaceProject / web-patron / 24572737845
88%

Build:
DEFAULT BRANCH: main
Ran 17 Apr 2026 03:22PM UTC
Jobs 1
Files 13
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

17 Apr 2026 03:21PM UTC coverage: 81.111% (+0.5%) from 80.571%
24572737845

push

github

web-flow
Fix registry cache race condition (PP-4102) (#122)

## Description

Fixes a registry cache race condition by tracking the in-progress crawl
instead of returning an empty cache immediately. Duplicate overlapping
calls now await the in-progress call.

## Motivation and Context

After `npm run build && npm run start` (I did not see this bug with `npm
run dev`), the first navigation to a registry-sourced library page
intermittently returned a 404 ("No authentication document url is
configured"). A subsequent visit would succeed.

ISR was firing two near-simultaneous `getStaticProps` calls on a cold
page load. The first call set `lastAttemptedFetch` synchronously before
its async crawl completed. The second call hit the `shouldRefresh`
min-interval guard, returned immediately with an empty cache, and caused
the 404. The error page would set revalidation, so subsequent visits
worked once the first crawl had finished.

The fix tracks in-progress crawl promises, so subsequent requests await
the active crawl rather than bailing early.

[Jira PP-4102]

## How Has This Been Tested?

- Manual local testing with both `npm run build-and-start` and `npm run
dev`.
- New tests (happy path, failure path) specifically for that condition.
Happy path test failed against the pre-fix code.
- All checks pass locally.
- [CI
checks](https://github.com/ThePalaceProject/web-patron/actions/runs/24567733387)
pass.

## Checklist:

- [x] I have updated the documentation accordingly.
- [x] All new and existing tests passed.

155 of 195 branches covered (79.49%)

Branch coverage included in aggregate %.

20 of 20 new or added lines in 1 file covered. (100.0%)

283 of 345 relevant lines covered (82.03%)

10.77 hits per line

Jobs
ID Job ID Ran Files Coverage
1 24572737845.1 17 Apr 2026 03:22PM UTC 13
81.11
GitHub Action Run
Source Files on build 24572737845
  • Tree
  • List 13
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • c3365086 on github
  • Prev Build on main (#24569150752)
  • Next Build on main (#24793914592)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc