ios: ArtworkLoader logs nothing when an artwork candidate fails

未关闭 适合新手
#1,102 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
72/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃
技术栈
swift

调研方向

从 ios/S2/Artwork/ArtworkLoader.swift 第 164–207 行开始,追踪候选返回 nil 的每条路径。为每个失败的候选添加一条 os.Logger 记录,包含项目缓存键、候选主机和失败原因,并应用所要求的仅限 Debug 的隐私处理。检查现有的 iOS 日志记录约定;当每个列出的失败都报告所需详情,且项目键在 Debug 之外经过哈希处理时,即为完成。

由索引模型根据 Issue 内容生成。

描述

enhancement impact:U1 P3 reach:R2 size:S

ArtworkLoader (ios/S2/Artwork/ArtworkLoader.swift:164-207) returns nil silently for every failed candidate: non-2xx, thrown fetch, undecodable data, image under minimumSize. CFNetwork logs URLs as <private>, so a device log only shows anonymous 404s and a missing cover can't be traced to an item or a source.

Diagnosing missing artwork on the owner's iPhone (2026-11-05) took matching task ids to connections and guessing names against the API by hand.

Fix: one os.Logger line (subsystem com.simplecityapps.shuttlecasts, category Artwork) per failed candidate with the item's cache key, the candidate host, and the reason (status code / error / decode / too small with its size). Mark the item key privacy: .public in Debug only, hashed otherwise.

Impact U1 (slows diagnosis; this session spent ~20 min on it) · Reach R2 (every artwork bug report on iOS) · Implemented: no · Design fit: fits · Complexity: S

主要语言
Kotlin
星标
234
派生
28
PR 合并指标
30 天内没有已合并 PR

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

timusus/Shuttle2 的其他 Issue

查看 timusus/Shuttle2 的全部 Issue

相似的 Issue

更多 Kotlin Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。