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
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,6 +33,10 @@ When a source issue contains a `codex-pr-feedback` marker from a failed CI run o
33
33
34
34
This avoids hard-coding Codex CLI setup in every source repository and avoids depending on a repository outside the `QuantStrategyLab` organization.
35
35
36
+
Automation authority is intentionally split from model confidence. The service treats routine low-risk maintenance as auto-merge eligible, allows already-live same-family strategy optimization to auto-merge only when service-owned checks provide trusted proof, and keeps new/reconstructed strategies, live-candidate promotion, plugin position-control changes, broker/order execution changes, workflow permissions, and secrets behind human review. `POST /v1/ai/automation/authority` accepts request metadata only as restrictive hints; it cannot relax the policy for live-impacting automation.
37
+
38
+
Automation run state is persisted through the service ledger. Async Codex jobs are recorded automatically; external workflows can also call `POST /v1/ai/automation/runs`. Ledger ownership follows `source_repository` when present, otherwise the authenticated repository. Operators and dashboards can read `GET /v1/ai/automation/runs`, `GET /v1/ai/automation/runs/{run_id}`, and `GET /v1/ai/automation/control` to decide whether to continue, pause auto-fix, switch to review-only, or escalate.
39
+
36
40
## Compatibility governance role
37
41
38
42
`QuantStrategyLab/AIAuditBridge` is an ops/control-plane consumer only:
|`automation_run_ledger.py`| Persistent automation run state and runtime control suggestions |
46
48
|`feedback.py`| Closed-loop change tracking and evaluation |
47
49
48
50
### Adapters (`service/adapters/`)
@@ -70,6 +72,10 @@ operations: **Analyze**, **Execute**, and **Review**.
70
72
|`/v1/ai/health`| GET | Online service health snapshot | No |
71
73
|`/healthz`| GET | Liveness check | No |
72
74
|`/v1/ai/quota`| GET | Provider usage, Codex account limits, and internal estimates | No |
75
+
|`/v1/ai/automation/authority`| POST | Evaluate auto/human-review authority for live-impacting changes | No |
76
+
|`/v1/ai/automation/control`| GET | Convert health/quota/org-health into continue/review-only/pause/escalate | No |
77
+
|`/v1/ai/automation/runs`| GET/POST | Read or record automation run ledger entries | No |
78
+
|`/v1/ai/automation/runs/{id}`| GET | Read one automation run ledger entry | No |
73
79
|`/v1/ai/feedback/*`| GET/POST | Change tracking and evaluation | No |
74
80
75
81
Health status vocabulary is defined in [`health_taxonomy.md`](health_taxonomy.md). Do not use `/v1/ai/health` as a substitute for monthly audit results, artifact freshness, or strategy-level health evidence.
@@ -114,6 +120,7 @@ POST /v1/ai/review
114
120
→ optional Codex verification
115
121
→ extract confidence scores
116
122
→ compute consensus + recommended action
123
+
→ cap action through automation authority policy
117
124
→ return {results, consensus, recommended_action}
118
125
```
119
126
@@ -124,6 +131,13 @@ POST /v1/ai/review
124
131
requirement.
125
132
-**Authorization**: Source repository org must match OIDC claims repository org
126
133
(prevents cross-org escalation).
134
+
-**Automation authority**: Request metadata can only make a decision stricter.
135
+
Live-equivalent auto-merge requires service-owned trusted proof; public
136
+
endpoints cannot self-declare it.
137
+
-**Automation ledger tenancy**: Ledger reads and writes use `source_repository`
138
+
as owner when present, otherwise the authenticated repository.
139
+
-**Automation control state**: Run task state may be reported by callers, but
140
+
control action and health/quota/org-health fields are derived by the service.
127
141
-**Sandbox**: Codex sandbox restricted to service-side allowlist (default: `read-only`).
128
142
-**Codex reasoning effort**: `CODEX_AUDIT_SERVICE_REASONING_EFFORT` can hard
129
143
override CLI effort; unset/`auto` routes low/medium/high by task complexity.
0 commit comments