feat: harden orchestrator execution runtime
This commit is contained in:
@@ -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;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user