Skip to content

Commit ac2b6a8

Browse files
Pigbibicodex
andcommitted
test: retire Codex review gate contract
Co-Authored-By: Codex <noreply@openai.com>
1 parent 340efc0 commit ac2b6a8

5 files changed

Lines changed: 12 additions & 142 deletions

File tree

docs/ai_autonomy_architecture.md

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,6 @@ AIAuditBridge 是 QuantStrategyLab 的 AI 审计控制面,负责:
5252
- 使用 `CODEX_AUDIT_SERVICE_URL` 指向服务端。
5353
- 支持 guarded auto-merge。
5454

55-
- `codex_review_gate.yml`
56-
- 只执行确定性的 secret / path / metadata 静态门禁。
57-
- 使用受信任 base 代码检查 PR diff,并通过 Checks API 把 `Codex Review Gate`
58-
明确发布到 current head SHA;API 失败时 fail closed。
59-
- GitHub Codex App 是唯一 AI PR reviewer;AIAuditBridge 不再运行第二套 reviewer。
60-
- Codex App review 与 unresolved threads 不再镜像成仓库自建 AI check。
61-
6255
- `monthly-orchestrator.yml`
6356
- 生成月度审计 issue。
6457
- 验证目标仓库必须是 snapshot repositories。
@@ -99,7 +92,7 @@ AIAuditBridge 是 QuantStrategyLab 的 AI 审计控制面,负责:
9992
- 包括 repo/task 校验、service patch contract、path guard、PR 创建、label 管理、auto-merge 请求、stale label cleanup。
10093

10194
- `scripts/gate_codex_app_review.py`
102-
- 以 current-head 静态 check 的形式保护合并;不处理 AI review verdict
95+
- 历史静态检查辅助脚本;当前没有 workflow 调用它,也不发布合并门禁
10396

10497
### 1.3 已经具备的自动化能力
10598

@@ -199,9 +192,9 @@ AIAuditBridge 是 QuantStrategyLab 的 AI 审计控制面,负责:
199192

200193
#### 3.3.1 单一 PR reviewer 边界
201194

202-
GitHub Codex App 是唯一 AI PR reviewer。AIAuditBridge 只保留月度审计和低风险修复职责,不维护第二套 review verdict、finding 历史、重试或仲裁状态。
195+
若启用 GitHub Codex App,其 review 仅是非阻塞的建议性证据。AIAuditBridge 只保留月度审计和低风险修复职责,不维护 review verdict、finding 历史、重试或仲裁状态。
203196

204-
合并仍必须同时满足源仓 CI、确定性 `Codex Review Gate`、未解决会话保护和 branch protection。任何自动化都不得用 label、admin 或自建 AI check 绕过这些控制。
197+
合并仍必须同时满足源仓确定性 CI、未解决会话保护和 branch protection。任何自动化都不得用 label、admin 或自建 AI check 绕过这些控制。
205198

206199
### P1:强烈建议补的缺口
207200

service/org_health.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
"Auto Merge Dependabot PR",
4747
"Check",
4848
"CI",
49-
"Codex Review Gate",
5049
"Monthly Orchestrator",
5150
"Secret Scan",
5251
"VPS Codex Service Ops",

tests/test_org_health.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ def test_read_org_health_limits_default_monitored_workflows(self) -> None:
442442
{"id": 4, "name": "Codex Review Gate", "state": "active"},
443443
]
444444
selected = org_health._monitored_workflows(workflows)
445-
self.assertEqual([item["name"] for item in selected], ["CI", "Codex Review Gate"])
445+
self.assertEqual([item["name"] for item in selected], ["CI"])
446446

447447
def test_read_org_health_fallback_excludes_retired_pr_reviewer(self) -> None:
448448
workflows = [

tests/test_review_authority_split.py

Lines changed: 0 additions & 121 deletions
This file was deleted.

tests/test_single_pr_reviewer_contract.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,17 @@
1212
"scripts/run_codex_pr_review.py",
1313
"tests/test_run_codex_pr_review.py",
1414
)
15-
COMPATIBILITY_WORKFLOW = ROOT / ".github/workflows/codex_pr_review.yml"
15+
RETIRED_WORKFLOWS = (
16+
ROOT / ".github/workflows/codex_pr_review.yml",
17+
ROOT / ".github/workflows/codex_review_gate.yml",
18+
)
1619

1720

18-
def test_github_codex_app_is_the_only_ai_pr_reviewer() -> None:
21+
def test_legacy_ai_pr_review_workflows_are_absent() -> None:
1922
for relative_path in RETIRED_PATHS:
2023
assert not (ROOT / relative_path).exists(), relative_path
21-
22-
compatibility_workflow = COMPATIBILITY_WORKFLOW.read_text(encoding="utf-8")
23-
assert "workflow_call:" in compatibility_workflow
24-
assert "pull_request_target:" not in compatibility_workflow
25-
assert "run_codex_pr_review.py" not in compatibility_workflow
26-
assert "exit 1" in compatibility_workflow
24+
for workflow in RETIRED_WORKFLOWS:
25+
assert not workflow.exists(), workflow
2726

2827
actionlint_config = (ROOT / ".github/actionlint.yaml").read_text(encoding="utf-8")
2928
assert "codex_pr_review" not in actionlint_config
@@ -33,7 +32,7 @@ def test_github_codex_app_is_the_only_ai_pr_reviewer() -> None:
3332
for path in (ROOT / ".github/workflows").glob("*.yml")
3433
)
3534
assert "name: Codex PR Review" not in workflow_text
36-
assert "name: Codex Review Gate" in workflow_text
35+
assert "name: Codex Review Gate" not in workflow_text
3736
assert (ROOT / ".github/workflows/codex_audit.yml").is_file()
3837
assert (ROOT / ".github/workflows/monthly-orchestrator.yml").is_file()
3938

0 commit comments

Comments
 (0)