thumbs: a changed `preview:` pin or source URL never refreshes the stored image, and a source that keeps failing keeps its old image forever
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 57/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- javascript
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
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-124needsFetch()compares onlyrecord.licenseandrecord.fetched. Verified: a record whosesourceandimagediffer from the entry still returnsfalsewhen the licence matches andfetchedis recent.source,imageandpinnedare stored (site/thumbs.mjs:138-139) but never read back.site/thumbs.mjs:218-227: on a fetch failure the old record and.webpare kept; the prune at 245-248 only removes files with no record. Nothing counts consecutive failures.site/checks.mjs:798-800says 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.
- 主要语言
- JavaScript
- 星标
- 58
- 派生
- 15
- 平均合并
- 16 小时 53 分钟
- 30 天内合并 PR
- 14
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
TMHSDigital/Free-Game-Dev-Assets 的其他 Issue
-
community marketing priority: low
难度 2/5 1-3 小时 新手友好度 72/100
TMHSDigital/Free-Game-Dev-Assets#151 ·
维护者通常 1 天内回复
-
community marketing priority: medium
难度 2/5 1-3 小时 新手友好度 78/100
TMHSDigital/Free-Game-Dev-Assets#150 ·
维护者通常 1 天内回复
-
community enhancement priority: medium
难度 2/5 1-3 小时 新手友好度 82/100
TMHSDigital/Free-Game-Dev-Assets#149 ·
维护者通常 1 天内回复
-
community documentation priority: medium
难度 1/5 1-3 小时 新手友好度 88/100
TMHSDigital/Free-Game-Dev-Assets#148 ·
维护者通常 1 天内回复
-
site: the Unreal guide is missing from the homepage Guides list, and the hero calls tools "assets"未关闭bug marketing priority: medium
难度 1/5 1-3 小时 新手友好度 85/100
TMHSDigital/Free-Game-Dev-Assets#147 ·
维护者通常 1 天内回复
查看 TMHSDigital/Free-Game-Dev-Assets 的全部 Issue
相似的 Issue
-
[ordering-review] workshop order graph: 1 confirmed ordering problem, 3 cycles are false positives未关闭
难度 2/5 1-3 小时 新手友好度 78/100
githubnext/gh-aw-workshop#4943 ·
维护者通常 1 天内回复
-
[guide] Public Sector User Group page names wrong Slack channel可能已有人在做 @hivecommons-hive 今天认领。 未关闭agent/guide documentation hive/claimed-by-guide stage/040-covered-by-pr
难度 1/5 1 小时以内 新手友好度 88/100
维护者通常 1 天内回复
-
check:passed feeds:edit
难度 1/5 1 小时以内 新手友好度 82/100
-
bug good first issue
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 63/100
oskarrough/dodgethis#115 ·
维护者通常 1 天内回复