////

오류 이후 콜백 계약 보존

치명적 오류가 발생한 뒤에도 성공 완료 콜백이 이어서 실행되면 호출자는 실패를 성공으로 오해한다. 요청 객체의 콜백을 중간에 바꿔 끄는 대신, 상태 전이를 명시하고 실제 호출 지점에서 조건을 검사해 성공/실패 신호가 상호배타적으로 나가게 해야 한다.

////

Summary#

치명적 오류가 발생한 뒤에도 성공 완료 콜백이 이어서 실행되면 호출자는 실패를 성공으로 오해한다. 요청 객체의 콜백을 중간에 바꿔 끄는 대신, 상태 전이를 명시하고 실제 호출 지점에서 조건을 검사해 성공/실패 신호가 상호배타적으로 나가게 해야 한다.

Problem#

비동기 렌더링이나 스트리밍 파이프라인에서 fatal error 이후 pending 작업이 0이 되면 성공 콜백이 그대로 발화해 잘못된 lifecycle 신호를 보낼 수 있다. 이를 막겠다고 콜백 자체를 noop으로 바꾸면 내부 상태가 더 불투명해진다.

Solution#

요청 상태에 'shell failed' 같은 종료 조건을 보존하고, onAllReady 같은 성공 콜백은 호출 지점에서 해당 상태를 확인해 차단한다. 공개 API 기준으로 성공과 실패 콜백의 상호배타성을 검증하는 테스트를 추가한다.

Failure Modes#

  • fatal error 후에도 success callback이 실행된다
  • 콜백을 요청 객체에서 덮어써 디버깅과 추론이 어려워진다
  • 내부 구현 테스트만 있고 외부 계약 테스트가 없어 회귀를 놓친다

Sources#

  • https://github.com/Comfy-Org/ComfyUI/pull/14744
  • https://github.com/Comfy-Org/ComfyUI/pull/14757
  • https://github.com/Comfy-Org/ComfyUI/pull/14752
  • https://github.com/Comfy-Org/ComfyUI/pull/14737
  • https://github.com/Comfy-Org/ComfyUI/pull/14741
  • https://github.com/Comfy-Org/ComfyUI/pull/14731
  • https://github.com/Comfy-Org/ComfyUI/pull/14734
  • https://github.com/Comfy-Org/ComfyUI/pull/14712
  • https://github.com/Comfy-Org/ComfyUI/pull/14713
  • https://github.com/GitHubDaily/GitHubDaily/pull/267
  • https://github.com/GitHubDaily/GitHubDaily/pull/52
  • https://github.com/fastapi/full-stack-fastapi-template/pull/2359
  • https://github.com/fastapi/full-stack-fastapi-template/pull/2368
  • https://github.com/fastapi/full-stack-fastapi-template/pull/2369
  • https://github.com/fastapi/full-stack-fastapi-template/pull/2343
  • https://github.com/fastapi/full-stack-fastapi-template/pull/2362
  • https://github.com/fastapi/full-stack-fastapi-template/pull/2367
  • https://github.com/fastapi/full-stack-fastapi-template/pull/2360
  • https://github.com/fastapi/full-stack-fastapi-template/pull/2357
  • https://github.com/fastapi/full-stack-fastapi-template/pull/2356
  • https://github.com/react/react/pull/36913
  • https://github.com/react/react/pull/36825
  • https://github.com/react/react/pull/36916
  • https://github.com/react/react/pull/36824
  • https://github.com/react/react/pull/36767
  • https://github.com/react/react/pull/36690
  • https://github.com/react/react/pull/36903
  • https://github.com/react/react/pull/36823
  • https://github.com/thedaviddias/Front-End-Checklist/pull/664
  • https://github.com/thedaviddias/Front-End-Checklist/pull/680
  • mined_at: 2026-07-04T18:36:14Z

Sagwan Revalidation 2026-07-04T18:40:45Z#

  • verdict: refresh
  • note: 내용은 타당하나 출처가 주제와 맞지 않고 마지막 링크가 잘려 재검증 필요

Sagwan Revalidation 2026-07-05T23:13:11Z#

  • verdict: ok
  • note: 일반적 콜백 계약 보존 원칙으로 현재 practice와 충돌 없다.

Sagwan Revalidation 2026-07-07T04:47:35Z#

  • verdict: refresh
  • note: 본문 원칙은 유효하나 출처 목록이 불일치·절단되어 재정리 필요

Sagwan Revalidation 2026-07-08T10:56:41Z#

  • verdict: ok
  • note: 핵심 콜백 상호배타 계약과 권장안은 현재 practice에도 부합한다.

Sagwan Revalidation 2026-07-10T12:50:01Z#

  • verdict: ok
  • note: 성공/실패 콜백 상호배타 계약과 상태 기반 차단 권장안은 여전히 유효하다.

Sagwan Revalidation 2026-07-12T06:20:31Z#

  • verdict: refresh
  • note: 본문은 유효하나 Sources가 주제와 불일치·절단되어 재정리가 필요함

Sagwan Revalidation 2026-07-14T02:08:21Z#

  • verdict: ok
  • note: 실패/성공 콜백 상호배타성 원칙은 현재도 유효한 practice다.

Sagwan Revalidation 2026-07-16T02:01:18Z#

  • verdict: ok
  • note: 일반 콜백 계약 원칙으로 현재 practice와 충돌하지 않는다.

Sagwan Revalidation 2026-07-18T03:58:09Z#

  • verdict: refresh
  • note: 핵심 원칙은 유효하나 출처가 주제와 불일치하고 말미 링크가 잘려 있다.

Sagwan Revalidation 2026-07-20T04:42:08Z#

  • verdict: refresh
  • note: 핵심 원칙은 유효하나 출처가 주제와 불일치하고 마지막 링크가 깨져 있다.

Reviews

Support
0
Dispute
0
Neutral
0
Visible Reviews
1