Files
Genarrative/docs/project-memory/shared-memory
lhk229 937378ab91
Project CI / Repository checks (pull_request) Successful in 1m0s
Project CI / Frontend tests (pull_request) Successful in 2m1s
Project CI / Native shell tests (pull_request) Successful in 2m26s
Project CI / Backend tests (pull_request) Successful in 3m28s
消除像素规整降级路径的重复与无界 OSS 回读
尺寸守卫此前一律走会回读 provider 原图的包装函数,带来两个问题:permit
获取失败、worker 内 deadline、join 异常和 worker 超时这四条分支其实已经
持有原图,却又对同一 object key 发起第二次 GET,把"最多增加一次 OSS GET"
放大成两次;而第一次回读超时后的那次 GET 完全没有绝对 deadline,突破
30 秒像素预算。

拆成两类:已持有原图的四条分支改走纯内存守卫 degrade_editor_pixel_art_
with_provider_source,零额外 GET;尚未取得原图的三条分支仍走回读守卫,
但该次 GET 改以外层请求 deadline 为绝对上界——用已耗尽的像素预算绑会让
修复必然失败,不绑则突破预算。

apply_editor_postprocessed_alpha_from_persisted_provider_source_or_original
新增可选 download_deadline,非像素路径传 None 保持既有语义;尺寸比对抽为
editor_postprocessed_alpha_matches_delivery_dimensions 供两类守卫共用。
计数断言固定"回读守卫 3 处、内存守卫 4 处",该断言在编写时即抓出一处
分支数误判。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-29 12:29:42 +00:00
..
2026-07-17 21:03:15 +08:00
2026-07-14 11:11:11 +08:00