Skip to content

Commit e4382f0

Browse files
authored
point monthly review to CodexAuditBridge (#73)
1 parent f4bae5b commit e4382f0

5 files changed

Lines changed: 24 additions & 24 deletions

File tree

.github/workflows/monthly_publish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
GCS_BUCKET: ${{ vars.GCS_BUCKET }}
3030
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
3131
SELFHOSTED_CODEX_REVIEW_ENABLED: ${{ vars.SELFHOSTED_CODEX_REVIEW_ENABLED || 'true' }}
32-
SELFHOSTED_CODEX_REVIEW_REPOSITORY: ${{ vars.SELFHOSTED_CODEX_REVIEW_REPOSITORY || 'QuantStrategyLab/CryptoCodexAuditBridge' }}
32+
SELFHOSTED_CODEX_REVIEW_REPOSITORY: ${{ vars.SELFHOSTED_CODEX_REVIEW_REPOSITORY || 'QuantStrategyLab/CodexAuditBridge' }}
3333
SELFHOSTED_CODEX_REVIEW_MODE: ${{ vars.SELFHOSTED_CODEX_REVIEW_MODE || 'review_and_fix' }}
3434
SELFHOSTED_CODEX_REVIEW_PROVIDER: ${{ vars.SELFHOSTED_CODEX_REVIEW_PROVIDER || 'auto' }}
3535
SELFHOSTED_CODEX_REVIEW_AUTO_MERGE: ${{ vars.SELFHOSTED_CODEX_REVIEW_AUTO_MERGE || 'false' }}
@@ -195,7 +195,7 @@ jobs:
195195
private-key: ${{ secrets.CROSS_REPO_GITHUB_APP_PRIVATE_KEY }}
196196
owner: ${{ github.repository_owner }}
197197
repositories: |
198-
CryptoCodexAuditBridge
198+
CodexAuditBridge
199199
permission-actions: write
200200

201201
- name: Trigger Monthly Review Automation
@@ -275,7 +275,7 @@ jobs:
275275
if status not in (201, 204):
276276
raise RuntimeError(f"Unexpected Codex dispatch status: {status}")
277277
print(
278-
f"Dispatched CryptoCodexAuditBridge review for issue #{os.environ['ISSUE_NUMBER']} "
278+
f"Dispatched CodexAuditBridge review for issue #{os.environ['ISSUE_NUMBER']} "
279279
f"to {target_repository}"
280280
)
281281

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ Behavior:
532532

533533
## Automated AI Monthly Review
534534

535-
After the monthly report bundle is assembled, the workflow creates a GitHub Issue containing the full `ai_review_input.md` content. The automated review route dispatches `QuantStrategyLab/CryptoCodexAuditBridge`. The bridge owns provider selection through `SELFHOSTED_CODEX_REVIEW_PROVIDER`:
535+
After the monthly report bundle is assembled, the workflow creates a GitHub Issue containing the full `ai_review_input.md` content. The automated review route dispatches `QuantStrategyLab/CodexAuditBridge`. The bridge owns provider selection through `SELFHOSTED_CODEX_REVIEW_PROVIDER`:
536536

537537
- `auto` (default): run the self-hosted Codex path first; if Codex setup or execution fails, post the configured API fallback review from the bridge. Configure both `OPENAI_API_KEY` and `ANTHROPIC_API_KEY` in the bridge for dual-AI fallback. If no API fallback key is configured, fail loudly.
538538
- `codex`: run Codex on the self-hosted VPS runner, post the audit result, and open a PR directly for safe low-risk fixes without API fallback.
@@ -555,22 +555,22 @@ Review output is posted back to the monthly issue.
555555
### Optional Bridge API Fallback
556556

557557
- `SELFHOSTED_CODEX_REVIEW_PROVIDER`: defaults to `auto`; set to `codex` to disable API fallback, `api` for configured API reviewers, or `openai` / `anthropic` for a single API reviewer.
558-
- `OPENAI_API_KEY`: configure in `CryptoCodexAuditBridge`, not this source repository.
559-
- `ANTHROPIC_API_KEY`: configure in `CryptoCodexAuditBridge`, not this source repository.
558+
- `OPENAI_API_KEY`: configure in `CodexAuditBridge`, not this source repository.
559+
- `ANTHROPIC_API_KEY`: configure in `CodexAuditBridge`, not this source repository.
560560
- `OPENAI_MODEL`: optional bridge repository variable, default `gpt-5.4-mini`.
561561
- `ANTHROPIC_MODEL`: optional bridge repository variable, default `claude-sonnet-4-6`.
562562

563-
The default production configuration does not need model API secrets because it uses Codex through `CryptoCodexAuditBridge`.
563+
The default production configuration does not need model API secrets because it uses Codex through `CodexAuditBridge`.
564564

565565
Setup:
566566

567567
```bash
568568
gh variable set SELFHOSTED_CODEX_REVIEW_PROVIDER --body auto
569-
gh secret set OPENAI_API_KEY --repo QuantStrategyLab/CryptoCodexAuditBridge --body "sk-..."
570-
gh secret set ANTHROPIC_API_KEY --repo QuantStrategyLab/CryptoCodexAuditBridge --body "sk-ant-..."
569+
gh secret set OPENAI_API_KEY --repo QuantStrategyLab/CodexAuditBridge --body "sk-..."
570+
gh secret set ANTHROPIC_API_KEY --repo QuantStrategyLab/CodexAuditBridge --body "sk-ant-..."
571571
```
572572

573-
Source-local legacy AI review workflows are intentionally not kept in this repository. Provider fallback lives in `CryptoCodexAuditBridge`, so this source repository does not need Anthropic/OpenAI secrets.
573+
Source-local legacy AI review workflows are intentionally not kept in this repository. Provider fallback lives in `CodexAuditBridge`, so this source repository does not need Anthropic/OpenAI secrets.
574574

575575
## Dynamic Universe Logic
576576

@@ -1019,7 +1019,7 @@ Practical review file selection:
10191019

10201020
Automated AI handoff:
10211021

1022-
The workflow automatically creates a GitHub Issue with the `monthly-review` label, then dispatches `CryptoCodexAuditBridge`. Provider fallback is handled inside the bridge through `SELFHOSTED_CODEX_REVIEW_PROVIDER`; if the bridge dispatch fails, the workflow fails loudly. See the "Automated AI Monthly Review" section for details.
1022+
The workflow automatically creates a GitHub Issue with the `monthly-review` label, then dispatches `CodexAuditBridge`. Provider fallback is handled inside the bridge through `SELFHOSTED_CODEX_REVIEW_PROVIDER`; if the bridge dispatch fails, the workflow fails loudly. See the "Automated AI Monthly Review" section for details.
10231023

10241024
Manual AI handoff (fallback):
10251025

README.zh-CN.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ make monthly-review-briefing
379379

380380
## 自动化 AI 月度审阅
381381

382-
月报 bundle 组装完成后,workflow 会自动创建一个 GitHub Issue,内容为完整的 `ai_review_input.md`。自动审阅路径会 dispatch `QuantStrategyLab/CryptoCodexAuditBridge`,由 bridge 统一决定 provider:
382+
月报 bundle 组装完成后,workflow 会自动创建一个 GitHub Issue,内容为完整的 `ai_review_input.md`。自动审阅路径会 dispatch `QuantStrategyLab/CodexAuditBridge`,由 bridge 统一决定 provider:
383383

384384
- `auto`(默认):先跑 self-hosted Codex 路径;如果 Codex 准备或执行失败,由 bridge 回落到已配置的 API 审阅。要启用双 AI fallback,把 `OPENAI_API_KEY``ANTHROPIC_API_KEY` 都配置在 bridge;如果没有任何 API fallback key,则明确失败。
385385
- `codex`:只跑 Codex,不使用 API fallback。
@@ -402,22 +402,22 @@ AI 审阅覆盖范围:
402402
### 可选 Bridge API Fallback
403403

404404
- `SELFHOSTED_CODEX_REVIEW_PROVIDER`:默认 `auto`;设置为 `codex` 可关闭 API fallback,设置为 `api` 可跑已配置的 API reviewers,设置为 `openai` / `anthropic` 可只跑单一 API 审阅。
405-
- `OPENAI_API_KEY`:配置在 `CryptoCodexAuditBridge`,不要配置在当前 source repo。
406-
- `ANTHROPIC_API_KEY`:配置在 `CryptoCodexAuditBridge`,不要配置在当前 source repo。
405+
- `OPENAI_API_KEY`:配置在 `CodexAuditBridge`,不要配置在当前 source repo。
406+
- `ANTHROPIC_API_KEY`:配置在 `CodexAuditBridge`,不要配置在当前 source repo。
407407
- `OPENAI_MODEL`:可选 bridge repo variable,默认 `gpt-5.4-mini`
408408
- `ANTHROPIC_MODEL`:可选 bridge repo variable,默认 `claude-sonnet-4-6`
409409

410-
默认生产配置不需要模型 API secrets,因为默认使用 `CryptoCodexAuditBridge` 的 Codex provider。
410+
默认生产配置不需要模型 API secrets,因为默认使用 `CodexAuditBridge` 的 Codex provider。
411411

412412
配置方式示例:
413413

414414
```bash
415415
gh variable set SELFHOSTED_CODEX_REVIEW_PROVIDER --body auto
416-
gh secret set OPENAI_API_KEY --repo QuantStrategyLab/CryptoCodexAuditBridge --body "sk-..."
417-
gh secret set ANTHROPIC_API_KEY --repo QuantStrategyLab/CryptoCodexAuditBridge --body "sk-ant-..."
416+
gh secret set OPENAI_API_KEY --repo QuantStrategyLab/CodexAuditBridge --body "sk-..."
417+
gh secret set ANTHROPIC_API_KEY --repo QuantStrategyLab/CodexAuditBridge --body "sk-ant-..."
418418
```
419419

420-
本仓库不再保留 source-local `ai_review.yml` 或 Claude 自动优化 workflow。provider fallback 统一放在 `CryptoCodexAuditBridge`,因此当前 source repo 不需要配置 Anthropic/OpenAI secrets。
420+
本仓库不再保留 source-local `ai_review.yml` 或 Claude 自动优化 workflow。provider fallback 统一放在 `CodexAuditBridge`,因此当前 source repo 不需要配置 Anthropic/OpenAI secrets。
421421

422422
### Monthly Publish 的 GitHub 配置
423423

docs/operator_runbook.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ Boundary rules:
7676

7777
## Monthly Codex Remediation
7878

79-
The monthly publish workflow creates a `monthly-review` issue, then dispatches `CryptoCodexAuditBridge` as the automated review and remediation path. The bridge owns provider selection through `SELFHOSTED_CODEX_REVIEW_PROVIDER`: `auto` is the default and runs the self-hosted Codex path first, falls back to the configured API reviewers when Codex setup or execution fails, and fails loudly when no API fallback key is configured. `codex` disables API fallback; `api` posts a combined API review; `openai` and `anthropic` post a single-provider API review only.
79+
The monthly publish workflow creates a `monthly-review` issue, then dispatches `CodexAuditBridge` as the automated review and remediation path. The bridge owns provider selection through `SELFHOSTED_CODEX_REVIEW_PROVIDER`: `auto` is the default and runs the self-hosted Codex path first, falls back to the configured API reviewers when Codex setup or execution fails, and fails loudly when no API fallback key is configured. `codex` disables API fallback; `api` posts a combined API review; `openai` and `anthropic` post a single-provider API review only.
8080

81-
If the bridge dispatch fails, the monthly publish workflow fails loudly. Source-local legacy AI review workflows are intentionally removed; provider fallback lives in `CryptoCodexAuditBridge`.
81+
If the bridge dispatch fails, the monthly publish workflow fails loudly. Source-local legacy AI review workflows are intentionally removed; provider fallback lives in `CodexAuditBridge`.
8282

8383
## Standard Monthly Flow
8484

tests/test_monthly_publish_workflow_config.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ def test_monthly_review_issue_creation_does_not_require_gh_cli(self) -> None:
3838
self.assertNotIn("GITHUB_OUTPUT: ${{ github.output }}", workflow)
3939
self.assertIn("issue_number=", workflow)
4040
self.assertIn("SELFHOSTED_CODEX_REVIEW_REPOSITORY", workflow)
41-
self.assertIn("QuantStrategyLab/CryptoCodexAuditBridge", workflow)
41+
self.assertIn("QuantStrategyLab/CodexAuditBridge", workflow)
4242
self.assertIn("CROSS_REPO_GITHUB_APP_ID", workflow)
4343
self.assertIn("CROSS_REPO_GITHUB_APP_PRIVATE_KEY", workflow)
4444
self.assertIn("actions/create-github-app-token@v3", workflow)
45-
self.assertIn("CryptoCodexAuditBridge", workflow)
45+
self.assertIn("CodexAuditBridge", workflow)
4646
self.assertIn("permission-actions: write", workflow)
4747
self.assertIn("APP_TOKEN", workflow)
4848
self.assertIn("Trigger Monthly Review Automation", workflow)
@@ -75,11 +75,11 @@ def test_source_local_legacy_ai_workflows_are_removed(self) -> None:
7575
def test_chinese_readme_matches_current_monthly_review_defaults(self) -> None:
7676
readme = README_ZH_PATH.read_text(encoding="utf-8")
7777

78-
self.assertIn("CryptoCodexAuditBridge", readme)
78+
self.assertIn("CodexAuditBridge", readme)
7979
self.assertIn("SELFHOSTED_CODEX_REVIEW_PROVIDER", readme)
8080
self.assertIn("OPENAI_API_KEY", readme)
8181
self.assertIn("ANTHROPIC_API_KEY", readme)
82-
self.assertIn("配置在 `CryptoCodexAuditBridge`", readme)
82+
self.assertIn("配置在 `CodexAuditBridge`", readme)
8383
self.assertIn("必须从 GitHub variable 读取", readme)
8484
self.assertIn("本仓库不再保留 source-local `ai_review.yml`", readme)
8585
self.assertNotIn("只配置 `ANTHROPIC_API_KEY`", readme)

0 commit comments

Comments
 (0)