feat: add dry-run workflow execution boundary

This commit is contained in:
john
2026-07-24 22:30:41 +08:00
parent 646178944d
commit c9ad841543
12 changed files with 553 additions and 17 deletions
+7
View File
@@ -219,7 +219,14 @@ export type OrchestratorRuntime = {
effective: boolean;
reason: string | null;
executesLangGraph: boolean;
plansLangGraph: boolean;
shadowsLangGraph: boolean;
executionHandoff: {
implemented: boolean;
requested: boolean;
enabled: boolean;
reason: string | null;
};
};
export type OrchestratorEngineDescriptor = {
+11 -4
View File
@@ -25,6 +25,7 @@ const RUNTIME_REASON: Record<string, string> = {
mode_off: '当前为关闭模式,所有任务继续由 Native Agent Run 执行。',
service_url_missing: '尚未配置 Orchestrator 服务地址,LangGraph 不会接管任务。',
kill_switch: '环境级紧急熔断已开启,强制回退 Native。',
execution_gate_disabled: 'Canary / Active 仅生成 Dry-run 候选决策;执行交接闸门仍被硬锁定,Native 是唯一执行者。',
};
export function OrchestratorPage() {
@@ -93,7 +94,7 @@ export function OrchestratorPage() {
}
if (
normalizedDraft.mode === 'active'
&& !window.confirm('确认保存 Active 预配置?Phase 2 不会交出执行权Native 仍是唯一执行者。')
&& !window.confirm('确认保存 Active 预配置?Phase 3 仅生成 Dry-run 决策Native 仍是唯一执行者。')
) {
return;
}
@@ -122,7 +123,7 @@ export function OrchestratorPage() {
: state.runtime.shadowsLangGraph
? 'Shadow 已生效:Native 继续执行,LangGraph 只观察和生成决策。'
: state.runtime.executesLangGraph
? 'Canary / Active 路由决策已预配置;Phase 2 尚未交出执行权,Native 仍是唯一执行者。'
? '执行交接已开启。'
: '配置有效。';
return (
@@ -155,6 +156,12 @@ export function OrchestratorPage() {
<strong></strong>
<p style={{ marginBottom: 0 }}>{formatTime(state.updatedAt)}</p>
</div>
<div>
<strong></strong>
<p style={{ marginBottom: 0 }}>
{state.runtime.executionHandoff.enabled ? '已开启' : 'Dry-run 锁定'}
</p>
</div>
</div>
<p className={state.runtime.reason === 'kill_switch' ? 'alert' : 'warn'} style={{ marginBottom: 0 }}>
{runtimeMessage}
@@ -178,8 +185,8 @@ export function OrchestratorPage() {
>
<option value="off">Off Native only</option>
<option value="shadow">Shadow Native LangGraph </option>
<option value="canary">Canary Phase 2 </option>
<option value="active">Active Phase 2 </option>
<option value="canary">Canary Phase 3 Dry-run</option>
<option value="active">Active Phase 3 Dry-run</option>
</select>
</label>
<label>