From 60538c83353ee119fb2d8b44fdac3ef07ecbd5e0 Mon Sep 17 00:00:00 2001 From: Codex Date: Fri, 10 Jul 2026 04:39:18 +0200 Subject: [PATCH] fix: route migrated AgentRun status through PaC --- scripts/src/agentrun/control-plane.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/scripts/src/agentrun/control-plane.ts b/scripts/src/agentrun/control-plane.ts index 8a829762..2122d2ed 100644 --- a/scripts/src/agentrun/control-plane.ts +++ b/scripts/src/agentrun/control-plane.ts @@ -347,13 +347,19 @@ export async function status(config: UniDeskConfig, options: StatusOptions): Pro } function isPipelinesAsCodeMigratedLane(spec: AgentRunLaneSpec): boolean { - return spec.gitMirror.readUrl.includes("gitea-http.") + return spec.source.remote.includes("gitea-http.") + || spec.source.remote.includes("/mirrors/") + || spec.gitMirror.readUrl.includes("gitea-http.") || spec.gitops.repoURL.includes("gitea-http.") || spec.gitMirror.readUrl.includes("/mirrors/"); } function pacStatusCommand(spec: AgentRunLaneSpec, full = false): string { - return `bun scripts/cli.ts platform-infra pipelines-as-code status --target ${spec.nodeId}${full ? " --full" : ""}`; + return `bun scripts/cli.ts platform-infra pipelines-as-code status --target ${spec.nodeId} --consumer ${pacConsumerId(spec)}${full ? " --full" : ""}`; +} + +function pacConsumerId(spec: AgentRunLaneSpec): string { + return `agentrun-${spec.lane.toLowerCase()}`; } function giteaMirrorStatusCommand(spec: AgentRunLaneSpec): string { @@ -362,7 +368,7 @@ function giteaMirrorStatusCommand(spec: AgentRunLaneSpec): string { export async function statusPipelinesAsCodeLane(config: UniDeskConfig, options: StatusOptions, target: { configPath: string; spec: AgentRunLaneSpec }): Promise> { const spec = target.spec; - const pacStatus = record(await runPlatformInfraPipelinesAsCodeCommand(config, ["status", "--target", spec.nodeId, "--full"])); + const pacStatus = record(await runPlatformInfraPipelinesAsCodeCommand(config, ["status", "--target", spec.nodeId, "--consumer", pacConsumerId(spec), "--full"])); const pacSummary = record(pacStatus.summary); const latestPipelineRun = record(pacSummary.latestPipelineRun); const artifact = record(pacSummary.artifact);