feat: 피드백 시도 상관관계 + 실패 신호 가드 전 컨슈머 확장 - #212
Merged
Merged
Conversation
분석 4종(resume/web/repository/cover_letter)을 공용 가드로 전환 — 도메인 분류는 공용 analysis_failed_payload 팩토리가 보존하고, expected_errors 로 일상 실패는 warning 레벨(trace_id·error_code 포함)로 기록한다. voice/tts 는 직접-발행 모델을 유지하되 멱등 마킹 이후 전 구간을 unmark_on_error 로 감싸 콜백 0건 DLQ 재주입 삼킴을 막는다(재주입은 재과금·세그먼트 재전송 동반 — 수동 복구 전용). feedback 은 요청의 attemptId 를 성공/FAILED 콜백에 에코 — Core 가 대체된 이전 시도의 지연 FAILED 를 드롭하는 근거. 테스트 +6.
generate.feedback 발행마다 attemptId(UUID)를 세션(feedback_attempt_id, V30)에 기록하고 payload 에 동봉 — 발행은 attemptId 커밋 이후(afterCommit 동기화)로 지연해 즉시 FAILED 가 이전 값과 대조돼 오드롭되는 경합을 막는다. 콜백의 attemptId 가 현재와 다르면(양쪽 non-null) FAILED 를 드롭해 대체된 이전 시도의 지연 실패가 마커를 되씌우지 않게 한다(null 은 구버전 호환 통과, 성공 콜백 미검사). 같은 계열의 POOL stale FAILED 도 풀 시딩 후엔 세션을 종료하지 않고 드롭. 테스트 +5.
messaging.md §5.10/§5.11 attemptId 필드·stale 드롭 규칙, §6 분석 4종 가드· voice/tts unmark_on_error(재주입 부작용 명시). database.md V30 컬럼.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
변경 사항
F3/F4 리뷰가 이관한 후속 2건의 묶음.
F5 — 피드백 시도 상관관계 (attemptId 왕복)
generate.feedback발행마다 attemptId(UUID)를 세션(feedback_attempt_id, V30)에 기록하고 payload 동봉. 발행은 attemptId 커밋 이후(afterCommit 동기화) — 즉시 FAILED 콜백이 이전 값과 대조돼 오드롭되는 경합 차단F6 — 실패 신호 가드 확장
consume_with_failure_signal로 전환 — 도메인 분류는 공용analysis_failed_payload팩토리가 보존(4벌 중복 제거),expected_errors로 일상 실패(빈 PDF·404 URL)는 warning 레벨 + trace_id·error_code 포함 로그unmark_on_error로 래핑 — 콜백 0건 DLQ 재주입 삼킴 방지 (재주입의 재과금·세그먼트 재전송 부작용은 messaging.md §6 에 수동 복구 전용으로 명시)attemptId필드뿐 — 기존 컨슈머·콜백 테스트 전부 무변경 그린검증
문서
messaging.md§5.10/§5.11(attemptId·stale 규칙)·§6,database.md(V30), ai/backend CLAUDE.mdfrontend/·infra/변경 없음, REST 계약 불변(openapi 재생성 불요)