Repository navigation
fix(orchestrator): log why a structured-output candidate was rejected - #1254
seonghobae wants to merge 2 commits into
Conversation
A strict structured-output candidate whose synthesis and repair were both rejected produced only a circuit_failure line, indistinguishable from a transport failure. .github Noema run 36166447802 showed four NVIDIA candidates failing this way with no reason recorded. Add _log_structured_candidate_rejected, a DEBUG line with agent_id, model, stage and a regex-bounded reason (the existing validation code, or a fixed label), emitted before every circuit failure on the structured synthesis and repair paths. Provider content is never read into the line. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EAXNYEtrwwF5dLCZb7Bx2V
|
Warning Review limit reachedNext included review available in 10 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
A strict structured-output rejection was only visible as circuit_failure. Log a bounded stage and reason before that circuit failure, and keep provider response text out of the line. HTTP 429 stays quota cooldown: it does not emit structured_candidate_rejected and does not record a circuit failure.
|
Exact-head admission correction — Ready is review admission only. Fresh audit against base
This PR is moved to Draft/Proposed until the causal owner repair is present on a successor exact head and re-audited. Queued/pending work is neither an additional blocker nor passing evidence. No Close, force push, destructive rebase, manual rerun, synthetic status/approval, merge, auto-merge, or bypass was performed. |
Problem
On the strict structured-output path, a candidate whose synthesis and repair were both rejected leaves only
circuit_failure agent_id=… failures=… threshold=…in the sidecar log — the same line a transport failure leaves. In .github Noema run 36166447802 four NVIDIA candidates (llama-3.2-11b-vision ×2, muse-glimmer-30b ×2) failed in 12–98 s with twoprovider_attemptlines each, noprovider_attempt_failed, and no recorded reason, so "unusable structured output" could not be confirmed or ruled out.The reason already exists in the trace (
validation_outcomefrom_structured_output_error:schema_missing/invalid_json/invalid_json_object/schema_violation) but is never logged.Change
_log_structured_candidate_rejected(agent, stage, reason)next to_log_provider_attempt_failed: one DEBUG linestructured_candidate_rejected agent_id=… model=… stage=synthesis|repair reason=… request_id=….reasonmust match^[a-z][a-z0-9_]{0,63}$, otherwiseunclassified; provider content is never read into it.repair_error), repairProviderResponseError(provider_error), andrecord_synthesis_failure(now takes a fixed reason:provider_error,provider_upstream_error,synthesis_exception).Tests
tests/test_structured_candidate_rejection_log.py: a twice-invalid candidate logs exactlystage=repair reason=schema_violationand no response text (canary); free-text reasons becomeunclassified; nothing is emitted above DEBUG.test_structured_output_distinct_fallback.py+test_structured_output_malformed_synthesis_usage.py→ 42 passed.test_telemetry.py+test_provider_reliability.py: 95 passed / 4 failed, and the same 4 fail on unmodifiedmain(test_failover_to_backup_agent_when_primary_fails,test_unallowlisted_provider_host_is_classified_upstream_error,test_passthrough_allowlist_failure_reports_passthrough_transport,test_free_model_exhausted_allowlist_pool_fails_closed_as_502) — environment-dependent, not introduced here. Full suite and coverage are left to CI.Scope
Draft. The .github review sidecar only picks this up after a later pin update; this PR does not change any pin. Companion: ContextualWisdomLab/.github#2381 (candidate-trail summary on the .github side).
🤖 Generated with Claude Code
https://claude.ai/code/session_01EAXNYEtrwwF5dLCZb7Bx2V