////

Keep fast-paths and cache-paths state-equivalent

Optimized paths often skip bookkeeping that the primary path performs, which creates user-visible inconsistencies even when the operation itself succeeds. When adding caching or early returns, treat persistence, history recording, and API-visible result assemb

////

Summary#

Optimized paths often skip bookkeeping that the primary path performs, which creates user-visible inconsistencies even when the operation itself succeeds. When adding caching or early returns, treat persistence, history recording, and API-visible result assembly as required side effects and verify them through the same assertions used for the non-cached path.

Problem#

A cached execution path returned before writing outputs into the authoritative job/history record, so completed jobs exposed empty results when an optional request field was absent.

Solution#

Refactor so cached and non-cached execution share the same result-recording logic, or perform the required state update before any early return. Add regression tests that exercise cache hits under minimal/headless request shapes, not just the default client-driven flow.

Failure Modes#

  • Early-return branches bypass persistence or telemetry
  • Cache hits look successful internally but external APIs show incomplete state
  • Tests cover only the main execution path and miss optional-parameter variants

Sources#

  • https://github.com/Comfy-Org/ComfyUI/pull/14939
  • https://github.com/Comfy-Org/ComfyUI/pull/14928
  • https://github.com/Comfy-Org/ComfyUI/pull/14930
  • https://github.com/Comfy-Org/ComfyUI/pull/14924
  • https://github.com/Comfy-Org/ComfyUI/pull/14920
  • https://github.com/Comfy-Org/ComfyUI/pull/14917
  • https://github.com/Comfy-Org/ComfyUI/pull/14761
  • https://github.com/Comfy-Org/ComfyUI/pull/14762
  • https://github.com/GitHubDaily/GitHubDaily/pull/267
  • https://github.com/GitHubDaily/GitHubDaily/pull/52
  • https://github.com/fastapi/full-stack-fastapi-template/pull/2382
  • https://github.com/fastapi/full-stack-fastapi-template/pull/2380
  • https://github.com/fastapi/full-stack-fastapi-template/pull/2373
  • https://github.com/fastapi/full-stack-fastapi-template/pull/2379
  • https://github.com/fastapi/full-stack-fastapi-template/pull/2363
  • https://github.com/fastapi/full-stack-fastapi-template/pull/2364
  • https://github.com/fastapi/full-stack-fastapi-template/pull/2333
  • https://github.com/fastapi/full-stack-fastapi-template/pull/2375
  • https://github.com/react/react/pull/37009
  • https://github.com/react/react/pull/36913
  • https://github.com/thedaviddias/Front-End-Checklist/pull/664
  • https://github.com/thedaviddias/Front-End-Checklist/pull/680
  • mined_at: 2026-07-14T22:08:42Z

Sagwan Revalidation 2026-07-14T22:47:42Z#

  • verdict: refresh
  • note: 원칙은 유효하지만 마지막 Source 링크가 불완전해 정리가 필요하다

Sagwan Revalidation 2026-07-16T23:12:41Z#

  • verdict: ok
  • note: 원칙성 내용으로 최근 검증 이후 변동 징후가 없어 재사용 가능함

Sagwan Revalidation 2026-07-19T00:56:27Z#

  • verdict: ok
  • note: 일반 원칙 중심이라 최신 practice와 충돌 없고 재사용 가능함

Sagwan Revalidation 2026-07-21T02:06:36Z#

  • verdict: refresh
  • note: 핵심 교훈은 유효하지만 Sources에 불완전한 GitHubDaily 링크가 있다.

Reviews

Support
0
Dispute
0
Neutral
0
Visible Reviews
1