Skip to content

Fix PR AI review for MIMO gateway#202

Merged
utopiafar merged 1 commit into
mainfrom
codex/fix-ai-pr-review-mimo-model
May 28, 2026
Merged

Fix PR AI review for MIMO gateway#202
utopiafar merged 1 commit into
mainfrom
codex/fix-ai-pr-review-mimo-model

Conversation

@utopiafar
Copy link
Copy Markdown
Collaborator

What changed

  • Pin PR AI Review Claude Code runs to mimo-v2.5-pro for the configured MIMO Anthropic-compatible gateway.
  • Remove SDK --json-schema dependence because the gateway/model completes successfully but does not populate Claude Agent SDK structured_output.
  • Add scripts/extract_claude_structured_review.py to extract the final review JSON from Claude Code Action's execution_file.
  • Keep pull_request_target on trusted default-branch checkout, while allowing workflow_dispatch branch testing to checkout the selected ref.

Why

Manual testing on #198 showed the initial workflow could run but fell back to "AI review unavailable":

  • default Claude model caused API Error: 400 Param Incorrect with the gateway;
  • after pinning MIMO, Claude completed, but structured_output stayed empty;
  • parsing execution_file produced the intended structured AI review result.

Validation

  • python3 -m unittest tests.tools.test_extract_claude_structured_review tests.tools.test_pr_ai_review_report tests.tools.test_pr_policy_check tests.tools.test_pr_preflight_summary_comment
  • python3 -m py_compile scripts/extract_claude_structured_review.py scripts/pr_ai_review_report.py scripts/pr_policy_check.py scripts/pr_preflight_summary_comment.py
  • git diff --check
  • ruby -e 'require "yaml"; YAML.load_file(".github/workflows/pr-ai-review.yml"); puts "ok"'
  • Manual workflow run on [codex] 修复输入发送后草稿残留 #198 using this branch: https://github.com/memex-lab/memex/actions/runs/26525282624

Result from #198 smoke test

@github-actions
Copy link
Copy Markdown

PR AI Review / PR AI 语义预检

中文

  • 风险等级:高风险
  • 需要人工审核:
  • 黄金链路影响:可能
  • 置信度:high
  • Workflow run:26525426633

AI 语义预检未得到可解析结果,需要 maintainer 人工审核。

影响范围

  • unknown

黄金链路

  • none
  • 说明:Claude Code Action 未产出结构化 JSON,AI 语义预检结果不可用。

风险项

  • high AI review 结果不可用。证据:Claude Code Action structured_output was empty or invalid.。
    建议:检查 Claude Action 日志和模型网关配置后重新运行 workflow。

测试缺口

  • 未发现新的测试缺口。

English

  • Risk level: HIGH
  • Human review required: YES
  • Golden path impact: POSSIBLE
  • Confidence: high
  • Workflow run: 26525426633

AI semantic review did not return a parseable result; maintainer review is required.

Affected Areas

  • unknown

Golden Path

  • none
  • Rationale: Claude Code Action did not produce structured JSON, so the AI review result is unavailable.

Findings

  • high AI review result unavailable. Evidence: Claude Code Action structured_output was empty or invalid..
    Recommendation: Check Claude Action logs and model gateway configuration, then rerun the workflow.

Test Gaps

  • No new test gap was reported.

AI review is advisory. Maintainers should verify the result before merging.

@github-actions github-actions Bot added ai: high risk AI review classified the PR as high risk golden path impact AI review found possible impact to a core user flow needs human review AI review or policy signals require maintainer review labels May 27, 2026
@github-actions
Copy link
Copy Markdown

PR Preflight Summary / PR 预检汇总

中文

  • 统一结论:高风险:质量预检通过,但需要 maintainer 人工 review 后手动合并。
  • Policy preflight:高风险。命中 1 条高风险规则,需要 maintainer 人工确认。
  • Flutter quality:通过。Analyzer 和 test baseline 均未发现新增问题。
  • PR head:ddeeac1c3bf537b56299fcdcdf4bb72e76052bf2
  • Policy run:26525426709
  • Flutter run:26525426631

English

  • Combined result: High risk: quality passed, but maintainer review is required before manual merge.
  • Policy preflight: HIGH RISK. Found 1 high-risk policy signal(s); maintainer review is required.
  • Flutter quality: PASS. Analyzer and test baselines found no newly introduced issue.
  • PR head: ddeeac1c3bf537b56299fcdcdf4bb72e76052bf2
  • Policy run: 26525426709
  • Flutter run: 26525426631
PR Policy Preflight / PR 规则预检

PR Policy Preflight / PR 规则预检

中文

  • 判定:高风险
  • 变更文件数:3
  • 变更行数:247
  • Diff 是否截断:false

规则命中

  • 高风险 github-config .github/workflows/pr-ai-review.yml: GitHub 配置或 workflow 发生变化。

English

  • Decision: HIGH RISK
  • Changed files: 3
  • Changed lines: 247
  • Diff truncated: false

Findings

  • high github-config .github/workflows/pr-ai-review.yml: GitHub configuration or workflow changed.
PR Flutter Quality / Flutter 质量预检

PR Flutter Quality / Flutter 质量预检

中文

  • 总体:通过
  • Analyzer baseline:通过
  • Test baseline:通过

English

  • Overall: PASS
  • Analyzer baseline: PASS
  • Test baseline: PASS

Flutter Analyzer Baseline

  • Base issues: 307
  • PR issues: 307
  • New issues: 0

No new analyzer issues introduced by this PR.

Flutter Test Baseline

  • Base failures: 0
  • PR failures: 0
  • New failures: 0

No new Flutter test failures introduced by this PR.

@utopiafar utopiafar merged commit a2d3735 into main May 28, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai: high risk AI review classified the PR as high risk golden path impact AI review found possible impact to a core user flow needs human review AI review or policy signals require maintainer review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant