Skip to content

Noema 리뷰 반복 실패 RCA: orchestrator/free 비JSON 응답 + 900초 repair 시한 초과 #2054

Closed

Description

@seonghobae

현상

  • newsdom-api PR 773: Run Noema LLM review and submit verdict 실패. Noema LLM response was not valid JSON (char 2222). 소요 약 31분.
  • html4tree PR 595: Prepare Noema model verdict 실패. 초기 실패는 비JSON 응답 (char 1529), 이후 repair가 900초 절대 시한 초과로 2차 실패.

원인 분석

  1. 초기 실패는 양쪽 모두 orchestrator/free 모델이 유효한 JSON 봉투를 반환하지 않은 것.
  2. repair는 같은 모델에 같은 프롬프트를 반복하므로 비JSON이 반복되고, 절대 시한 900초를 소진함.
  3. 원시 출력 미기록은 보안상 의도적이나, 실패 위치(char 오프셋)·길이·sha256 외에 스키마 검증 오류 경로가 없어 디버깅 불가.

처방 제안 (시한 연장이 아님)

  1. Noema 모델 호출에 JSON 모드 강제 (response_format json_object 또는 json_schema).
  2. 비JSON 초기 실패 시 repair 진입 전 조기 중단하고 봉투 재생성 1회만 시도.
  3. 텔레메트리 확충: 파싱 실패 위치, 기대 스키마 대비 누락·여분 필드 경로를 로그에 기록 (원시 출력은 계속 미기록).
  4. repair 시한은 절대 누적 대신 시도당 예산으로 변경 검토.

근거 로그

  • newsdom-api run 33510285421 job 99864028341 step 13
  • html4tree run 33560972491 job 100033086428 step 13

Activity

  1. seonghobae commented on Sep 11, 2026

    @seonghobae
    ContributorAuthor

    2026-09-11 follow-up evidence: the current Noema implementation already sends a schema-based response_format, performs one caller request, and leaves repair/failover to contextual-orchestrator. Regression suites pass: uv run pytest tests/test_noema_repair_attempt_telemetry.py tests/test_noema_review_gate.py tests/test_repository_branch_coverage_review_schedulers.py -q -> 149 passed in 28.74s. The external failure remains reproducible at the gateway boundary: PR #2098 exact head 69dded5cd596acd4ba77b7e78e4219b5e0bf27dc received HTTP 502 from orchestrator/free after 399.5s (served model deepseek-ai/deepseek-v4-pro-0813, caller attempts=1); PR #2096 exact head 9b3585f08147c076ce4a530e8e47bb9bd0b6bc29 received HTTP 502 after 643.8s (served model deepseek-ai/deepseek-v4-flash-0731, caller attempts=1). Raw logs are retained locally with SHA-256: 2098 1ed56836519caaea82e85c42fa35ef3ac5724efab40ac91051a678f1d555e7d3; 2096 Noema d439c4ae418a373e6417b515c8c394e507641d1d7bbb9e50ba144d350111a135; 2096 Strix b56f18f5fafe1574963970863c69ce37ed99c33017a3b4c4c086e8f6527521e8. This is not closed: the code-side contract is green, but the provider/gateway reliability gap remains operationally unresolved.

  2. seonghobae commented on Sep 13, 2026

    @seonghobae
    ContributorAuthor

    Closing on re-verification, 2026-09-13: every central-side prescription here is on protected main, and the recorded failure shape no longer occurs.

    • "JSON schema on the Noema model call" → scripts/ci/noema_review_gate.py builds _noema_verdict_json_schema() and sends it as response_format: json_schema (:72-142).
    • "no 900 s absolute repair deadline / no same-prompt repair loop" → removed by fix(noema): remove caller repair deadline and duplicate model call #1672 (merged 2026-09-02); NOEMA_REPAIR_DEADLINE no longer exists in scripts/ci/noema_review_gate.py; the caller makes one request and delegates structured-output repair/failover to contextual-orchestrator.
    • "fail closed on non-JSON with offset/length/sha256 telemetry, no raw-output logging" → the 2026-08-31 fail-closed series (gap-baseline entries "noema-review-gate: malformed LLM JSON …", rounds 1-3).

    What still fails today is a different class — gateway transport (HTTP 429 after ~300 s, HTTP 502 after ~1000 s, provider_attempt_failed across the free pool), e.g. runs 34747265609 / 34736616822 on 2026-09-13 — tracked as gateway capacity/budget work in #1948 and #2000, and owned upstream in contextual-orchestrator. Keeping this RCA open would mislabel those as the non-JSON/900 s defect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions