feat: harden orchestrator execution runtime

This commit is contained in:
john
2026-07-24 23:53:32 +08:00
parent 396bb78200
commit f6f2cd0933
55 changed files with 5122 additions and 194 deletions
+2
View File
@@ -211,6 +211,7 @@ export type OrchestratorConfig = {
workflowAllowlist: string[];
fallbackToNative: boolean;
requireHealthy: boolean;
executionEnabled: boolean;
};
export type OrchestratorRuntime = {
@@ -226,6 +227,7 @@ export type OrchestratorRuntime = {
requested: boolean;
enabled: boolean;
reason: string | null;
environmentGate: boolean;
};
};
+23 -5
View File
@@ -27,6 +27,7 @@ const RUNTIME_REASON: Record<string, string> = {
service_url_missing: '尚未配置 Orchestrator 服务地址,LangGraph 不会接管任务。',
kill_switch: '环境级紧急熔断已开启,强制回退 Native。',
execution_gate_disabled: 'Canary / Active 仅生成 Dry-run 候选决策;执行交接闸门仍被硬锁定,Native 是唯一执行者。',
environment_execution_gate_disabled: 'memindadm 已请求执行交接,但环境级执行闸门仍关闭;当前继续 Dry-run。',
};
export function OrchestratorPage() {
@@ -94,8 +95,8 @@ export function OrchestratorPage() {
return;
}
if (
normalizedDraft.mode === 'active'
&& !window.confirm('确认保存 Active 预配置?Phase 3 仅生成 Dry-run 决策,Native 仍是唯一执行者。')
normalizedDraft.executionEnabled
&& !window.confirm('确认请求执行交接?仅当环境级闸门、服务健康、用户/工作流灰度范围同时通过时才会生效。')
) {
return;
}
@@ -173,7 +174,7 @@ export function OrchestratorPage() {
<div>
<h3 style={{ margin: 0 }}>Executor Gateway</h3>
<p style={{ margin: '4px 0 0', color: '#68716c', fontSize: 13 }}>
Phase 3.4 contract-only
Worker Queue
</p>
</div>
<div style={{ display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(220px, 1fr))', gap: 10 }}>
@@ -218,8 +219,8 @@ export function OrchestratorPage() {
>
<option value="off">Off Native only</option>
<option value="shadow">Shadow Native LangGraph </option>
<option value="canary">Canary Phase 3 Dry-run</option>
<option value="active">Active Phase 3 Dry-run</option>
<option value="canary">Canary /</option>
<option value="active">Active </option>
</select>
</label>
<label>
@@ -318,6 +319,23 @@ export function OrchestratorPage() {
/>
Orchestrator 退 Native
</label>
<label style={{
display: 'flex',
alignItems: 'center',
gap: 8,
border: '1px solid #e6c98f',
borderRadius: 8,
padding: 10,
background: '#fff9ed',
}}>
<input
type="checkbox"
checked={draft.executionEnabled}
onChange={(event) => setDraft({ ...draft, executionEnabled: event.target.checked })}
style={{ width: 'auto' }}
/>
LangGraph Kill Switch
</label>
</div>
<div className="card grid">