-
Notifications
You must be signed in to change notification settings - Fork 32
fix(integration): codex reviewer on gpt-5.5 (xhigh) + evidence serialization + R-OUTCOME demote #810
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(integration): codex reviewer on gpt-5.5 (xhigh) + evidence serialization + R-OUTCOME demote #810
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -38,6 +38,7 @@ | |
| import argparse | ||
| import asyncio | ||
| import contextlib | ||
| import dataclasses | ||
| import json | ||
| import os | ||
| import re | ||
|
|
@@ -160,7 +161,9 @@ async def _gather_findings( | |
| async def one(rollout: Path) -> dict: | ||
| try: | ||
| evidence = agent_judge.load_rollout_evidence(rollout) | ||
| evidence_json = json.dumps(evidence.to_dict(), indent=2)[:8000] | ||
| # RolloutEvidence is a frozen dataclass (no .to_dict()); serialize via | ||
| # dataclasses.asdict. flagged_actions etc. are JSON-able. | ||
| evidence_json = json.dumps(dataclasses.asdict(evidence), indent=2)[:8000] | ||
| except Exception as exc: # evidence we cannot load is unhealthy | ||
| return { | ||
| "rollout": str(rollout), | ||
|
|
@@ -281,6 +284,32 @@ def _codex_env(env: Mapping[str, str]) -> dict[str, str]: | |
| return out | ||
|
|
||
|
|
||
| def _deepseek_codex_config( | ||
| model: str | None, env: Mapping[str, str] | ||
| ) -> list[str]: | ||
| """Codex `-c` overrides to run the composer on a DeepSeek model. | ||
|
|
||
| A DeepSeek codex model can't use the OpenAI Responses API + its `tool_search` | ||
| tool (which small/non-OpenAI models reject), so route codex through a custom | ||
| chat-completions provider pointed at DeepSeek. The composer only reads the | ||
| review-pack text we hand it (no web tools needed), so the chat wire is enough. | ||
| Returns [] for a non-DeepSeek model (codex uses its default OpenAI provider). | ||
| """ | ||
| if not model or "deepseek" not in model.lower(): | ||
| return [] | ||
| base = (env.get("DEEPSEEK_BASE_URL") or "https://api.deepseek.com").rstrip("/") | ||
| # DeepSeek's OpenAI-compatible chat endpoint lives under /v1. | ||
| if not base.endswith("/v1"): | ||
| base = f"{base}/v1" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| return [ | ||
| "model_provider=deepseek", | ||
| "model_providers.deepseek.name=DeepSeek", | ||
| f"model_providers.deepseek.base_url={base}", | ||
| "model_providers.deepseek.env_key=DEEPSEEK_API_KEY", | ||
| "model_providers.deepseek.wire_api=chat", | ||
| ] | ||
|
|
||
|
|
||
| def build_codex_command( | ||
| prompt: str, | ||
| *, | ||
|
|
@@ -558,7 +587,10 @@ def main(argv: Sequence[str] | None = None) -> int: | |
| workdir=args.review_pack.resolve().parent, | ||
| codex_bin=args.codex_bin, | ||
| model=args.codex_model, | ||
| config_overrides=args.config_overrides, | ||
| config_overrides=[ | ||
| *_deepseek_codex_config(args.codex_model, codex_env), | ||
| *args.config_overrides, | ||
| ], | ||
| env=codex_env, | ||
| ) | ||
| if args.codex_out: | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
grade["deterministic_reject"]leftTrueafter R-OUTCOME demotionWhen the R-OUTCOME-only branch fires,
slot.statusis set to"healthy"butslot.grade["deterministic_reject"]is never cleared — it remainsTrue.agent_judge_summary.jsonserializes this field directly, so codex (Pass 2) will read a slot where"status": "healthy"and"deterministic_reject": trueat the same time. That direct contradiction could cause the codex reviewer to escalate a quarantine to "not mergeable", which is exactly the false-positive this demotion is trying to prevent. Addingslot.grade["deterministic_reject"] = False(alongside the quarantine append) would make the review pack data internally consistent.