Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

thumbs: a changed `preview:` pin or source URL never refreshes the stored image, and a source that keeps failing keeps its old image forever

Chiusa
#133 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
57/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
javascript
Ambito
backend, data

Direzione di ricerca

Start with site/lib/thumbs.mjs around needsFetch() (117–124), then read the fetch failure and prune paths in site/thumbs.mjs (218–248) and the validator note in site/checks.mjs (798–800). Run the relevant cases in lib.test.mjs and a dry run with a changed preview: pin. Done means source and pin changes trigger fetching, repeated failures eventually drop stale records and files, and each manifest source matches its entry URL.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug priority: medium

Why it matters

site/thumbs.json decides which publisher image the site shows. If a contributor repoints preview: at a better image, or an entry's url moves, the old picture stays on the entry page, the card and the hero filmstrip for up to 180 days. If a source starts returning 404, the old image is republished at every build with no expiry at all.

Evidence (at 69387df)

  • site/lib/thumbs.mjs:117-124 needsFetch() compares only record.license and record.fetched. Verified: a record whose source and image differ from the entry still returns false when the licence matches and fetched is recent. source, image and pinned are stored (site/thumbs.mjs:138-139) but never read back.
  • site/thumbs.mjs:218-227: on a fetch failure the old record and .webp are kept; the prune at 245-248 only removes files with no record. Nothing counts consecutive failures.
  • site/checks.mjs:798-800 says the record "is otherwise not compared with the entry", so the validator will not catch it.

Suggested approach

In needsFetch, also return true when record.source !== entry.url, when the pinned flag no longer matches whether preview: is an https:// URL, or when a pinned record's image !== entry.preview. Add a failures counter (or lastTried) to the record; after N failed runs, or when fetched is older than 2 x maxAgeDays, drop the record and file so the tile falls back to the typographic one, and report the drop in the run summary. A one-line validator check can enforce record.source === entry.url.

Done when

lib.test.mjs covers "source changed", "pin added/removed/changed" and "stale after repeated failure"; a dry run with a repointed preview: lists that entry under Fetched; the manifest's source always equals the entry's url.

Lingua principale
JavaScript
Stelle
58
Fork
15
Merge medio
16h 53m
PR unite (30g)
14

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di TMHSDigital/Free-Game-Dev-Assets

Tutte le issue di TMHSDigital/Free-Game-Dev-Assets

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.