You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,24 +6,24 @@
6
6
7
7
## What this repository is
8
8
9
-
CodexAuditBridge is the QuantStrategyLab AI audit automation bridge. It runs Codex VPS/service-backed audit workflows first, with OpenAI/Anthropic API fallback for approved reviews and low-risk fix pull requests.
9
+
AIAuditBridge is the QuantStrategyLab AI audit automation bridge. It runs Codex VPS/service-backed audit workflows first, with OpenAI/Anthropic API fallback for approved reviews and low-risk fix pull requests.
10
10
11
11
It produces research, audit, or orchestration artifacts. It should not submit broker orders or mutate live allocations by itself.
12
12
13
13
## Architecture boundary
14
14
15
-
CodexAuditBridge is the organization-local AI audit boundary for QuantStrategyLab. Source repositories dispatch review requests to this repository; they should not embed raw `codex exec` commands, direct provider API calls, model routing, or fallback policy themselves.
15
+
AIAuditBridge is the organization-local AI audit boundary for QuantStrategyLab. Source repositories dispatch review requests to this repository; they should not embed raw `codex exec` commands, direct provider API calls, model routing, or fallback policy themselves.
16
16
17
17
Current execution model:
18
18
19
19
1. A source repository creates or identifies an audit issue.
20
20
2. The source repository dispatches this repository's monthly review workflow. The workflow filename is still `codex_audit.yml` for dispatch compatibility, but Codex execution is service-backed.
21
-
3.CodexAuditBridge validates the source repository and task mapping, clones the source repository with a scoped GitHub token, and runs the selected provider/backend.
22
-
4. Only CodexAuditBridge performs GitHub writes such as comments, branches, commits, pushes, and pull requests.
21
+
3.AIAuditBridge validates the source repository and task mapping, clones the source repository with a scoped GitHub token, and runs the selected provider/backend.
22
+
4. Only AIAuditBridge performs GitHub writes such as comments, branches, commits, pushes, and pull requests.
23
23
24
24
Keep this boundary inside the `QuantStrategyLab` organization. Do not move QuantStrategyLab audit execution or source-repository write tokens to another organization.
25
25
26
-
Codex execution is service-only: the workflow calls a QuantStrategyLab-owned HTTPS/443 Codex audit service from a standard GitHub-hosted runner. The service returns review text or structured patch suggestions only. CodexAuditBridge still owns clone, path validation, patch application, commit, push, PR creation, and issue comments.
26
+
Codex execution is service-only: the workflow calls a QuantStrategyLab-owned HTTPS/443 Codex audit service from a standard GitHub-hosted runner. The service returns review text or structured patch suggestions only. AIAuditBridge still owns clone, path validation, patch application, commit, push, PR creation, and issue comments.
27
27
28
28
When `CODEX_AUDIT_AUTO_MERGE=true`, the bridge requests guarded auto-merge by adding the `auto-merge-ok` label to the generated PR only after the changed-file surface is low or medium risk and the file / total changed-line caps stay within policy. The bridge ensures the configured label exists before applying it; if the source token cannot create labels, create the label manually before enabling guarded auto-merge. If a source checkout contains `.github/codex_auto_merge_policy.json`, the bridge reads the baseline policy before Codex edits run, then uses that baseline policy before falling back to its built-in defaults. High-risk, unknown, policy-changing, file-removal/rename/copy, or invalid-policy surfaces are labeled with the configured human-review label (`human-review-required` by default) instead of `auto-merge-ok`, and the source issue comment includes the risk reasons and files for operator review. The bridge does not call GitHub native auto-merge directly; source repositories must keep their own CI and merge-guard workflow in control of the final merge decision.
29
29
@@ -33,9 +33,9 @@ This avoids hard-coding Codex CLI setup in every source repository and avoids de
33
33
34
34
## Compatibility governance role
35
35
36
-
QuantStrategyLab `AIAuditBridge` is an ops/control-plane consumer only:
36
+
Compatibility governance metadata in this repository is ops/control-plane only:
37
37
38
-
- It consumes compatibility governance metadata to align audit/review execution contracts.
38
+
- It aligns audit/review execution contracts across QuantStrategyLab repositories.
39
39
- It must **not** participate in trading runtime dependency graphs or strategy/runtime upgrade flows.
40
40
- All governance references from this repo should be interpreted as control-plane/tooling compatibility, not runtime coupling.
41
41
@@ -53,7 +53,7 @@ When adding a new dispatcher, update `SOURCE_REPO_TASKS` in `scripts/run_monthly
53
53
54
54
## Codex service configuration
55
55
56
-
CodexAuditBridge uses the service backend only. The workflow runs on `ubuntu-latest` and requires a QuantStrategyLab-owned HTTPS/443 Codex audit service.
56
+
AIAuditBridge uses the service backend only. The workflow runs on `ubuntu-latest` and requires a QuantStrategyLab-owned HTTPS/443 Codex audit service.
57
57
58
58
Configure these values in `QuantStrategyLab/AIAuditBridge`:
59
59
@@ -99,7 +99,7 @@ Configure these values in `QuantStrategyLab/AIAuditBridge`:
Copy file name to clipboardExpand all lines: docs/async_service_deployment.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,28 +1,28 @@
1
1
# Async Codex Audit Service Deployment
2
2
3
-
CodexAuditBridge uses an async service contract to avoid keeping a GitHub Actions request open while Codex runs on the VPS.
3
+
AIAuditBridge uses an async service contract to avoid keeping a GitHub Actions request open while Codex runs on the VPS.
4
4
5
5
## Architecture
6
6
7
7
1. A source repository creates or updates an audit issue, then dispatches `QuantStrategyLab/AIAuditBridge`.
8
-
2.CodexAuditBridge clones the source repository with a scoped GitHub App token, builds the audit prompt, and requests a GitHub Actions OIDC token with audience `quant-codex-audit`.
9
-
3.CodexAuditBridge submits `POST /v1/codex-audit/jobs` through the Cloudflare Worker.
8
+
2.AIAuditBridge clones the source repository with a scoped GitHub App token, builds the audit prompt, and requests a GitHub Actions OIDC token with audience `quant-codex-audit`.
9
+
3.AIAuditBridge submits `POST /v1/codex-audit/jobs` through the Cloudflare Worker.
10
10
4. The Worker forwards only Quant audit routes with bearer tokens to the VPS origin. The VPS service validates OIDC signature, audience, repository, workflow ref, git ref, source repository allowlists, and payload size.
11
11
5. The VPS service returns a random `job_id`, runs Codex in a background thread, and persists job state in a private local directory.
12
-
6.CodexAuditBridge polls `GET /v1/codex-audit/jobs/{job_id}` until the job succeeds, fails, or times out.
12
+
6.AIAuditBridge polls `GET /v1/codex-audit/jobs/{job_id}` until the job succeeds, fails, or times out.
13
13
14
14
The synchronous `POST /v1/codex-audit` endpoint remains available for local diagnostics, but production workflows should use the async job endpoints.
15
15
16
16
## Boundary with Pigbibi CodexGateway
17
17
18
-
`CodexAuditBridge` intentionally stays separate from `Pigbibi/AIGateway`.
18
+
`AIAuditBridge` intentionally stays separate from `Pigbibi/AIGateway`.
19
19
20
20
-`CodexGateway` is a generic Codex invocation facade for prompt/context/image/schema calls.
- Do not route Quant monthly audits through the Pigbibi gateway Worker or Pigbibi repository allowlist.
23
23
- Do not move audit-specific issue/PR behavior into `CodexGateway`; share only low-level primitives after the HTTP contracts are stable.
24
24
25
-
The historical self-hosted direct-Codex workflows in `SelfHostedCodexAuditBridge`and `CryptoCodexAuditBridge`should be treated as compatibility fallback. The preferred production path is the GitHub-hosted `CodexAuditBridge` workflow plus async VPS service. After parity is verified for current monthly sources, the self-hosted direct-Codex workflows can be disabled or deleted.
25
+
The historical self-hosted direct-Codex workflows in `SelfHostedCodexAuditBridge`, `CryptoCodexAuditBridge`, and the legacy `CodexAuditBridge` repository should be treated as compatibility fallback. The preferred production path is the GitHub-hosted `AIAuditBridge` workflow plus async VPS service. After parity is verified for current monthly sources, the legacy direct-Codex and bridge workflows can be disabled or archived.
26
26
27
27
## Permission and secret boundary
28
28
@@ -55,8 +55,8 @@ For public source repositories:
55
55
After merging the async service code, run the manual `VPS Codex Service Ops` workflow with deploy mode, or run on the VPS:
0 commit comments