fix: 默认选择 AgentRun release lane
This commit is contained in:
@@ -51,7 +51,7 @@ client:
|
||||
controlPlane:
|
||||
default:
|
||||
node: NC01
|
||||
lane: nc01-v02
|
||||
lane: nc01-release
|
||||
nodes:
|
||||
NC01:
|
||||
route: NC01
|
||||
|
||||
@@ -272,6 +272,7 @@ Artificer 标题契约:
|
||||
- 标题重复时返回歧义错误,内部 ID 继续作为不可变机器身份。
|
||||
|
||||
- 默认直接执行 live 单命令,不把 `--dry-run` 作为派单前置步骤;
|
||||
- 未显式传 `--lane` 时,空选择或只传 YAML 默认 node 都使用 `config/agentrun.yaml#controlPlane.default`;
|
||||
- live 先经 Target `trans` 重入并执行 source/worktree/Aipod/SecretRef 只读预检;
|
||||
- 预检通过后在同一命令内 submit 并自动 dispatch;
|
||||
- 幂等重试不得重复创建 attempt 或重复 dispatch;
|
||||
|
||||
@@ -393,6 +393,12 @@ export function resolveAgentRunLaneTarget(options: { node?: string | null; lane?
|
||||
return { configPath: config.sourcePath, spec };
|
||||
}
|
||||
if (requestedNode !== null) {
|
||||
if (requestedNode === config.defaultTarget.node) {
|
||||
const spec = config.lanes[config.defaultTarget.lane];
|
||||
if (spec === undefined) throw new Error(`${config.sourcePath}: default controlPlane lane ${config.defaultTarget.lane} is not declared`);
|
||||
if (spec.nodeId !== requestedNode) throw new Error(`${config.sourcePath}: controlPlane.default.node does not match default lane node`);
|
||||
return { configPath: config.sourcePath, spec };
|
||||
}
|
||||
const candidates = Object.values(config.lanes).filter((lane) => lane.nodeId === requestedNode);
|
||||
if (candidates.length === 0) throw new Error(`${config.sourcePath}: no AgentRun lane is declared for node ${requestedNode}`);
|
||||
if (candidates.length > 1) throw new Error(`--lane is required because node ${requestedNode} has multiple AgentRun lanes: ${candidates.map((lane) => lane.lane).join(", ")}`);
|
||||
|
||||
Reference in New Issue
Block a user