From 0a7a79e3f8bcc6b7c689594d733c2dfa3f5e757d Mon Sep 17 00:00:00 2001 From: Codex Date: Wed, 15 Jul 2026 14:25:43 +0200 Subject: [PATCH] fix: warn on shared repository cache ownership --- .../src/agentrun-managed-repository-reconciler.ts | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/scripts/src/agentrun-managed-repository-reconciler.ts b/scripts/src/agentrun-managed-repository-reconciler.ts index 8cfe38f7..754bb2ae 100644 --- a/scripts/src/agentrun-managed-repository-reconciler.ts +++ b/scripts/src/agentrun-managed-repository-reconciler.ts @@ -128,8 +128,19 @@ function assertUniqueManagedRepositoryOwnership(specs: readonly AgentRunLaneSpec for (const repository of spec.gitMirror.repositories) { const identity = `${cacheIdentity}/${repository.repository}`; const owner = cacheRepositories.get(identity); - if (owner !== undefined) throw new Error(`AgentRun managed repository ${identity} is owned by both ${owner} and ${spec.lane}`); - cacheRepositories.set(identity, spec.lane); + if (owner !== undefined) { + console.warn(JSON.stringify({ + code: "agentrun-managed-repository-shared-cache", + level: "warning", + blocking: false, + mutation: false, + repository: identity, + owners: [owner, spec.lane], + message: `AgentRun managed repository ${identity} is shared by lanes ${owner} and ${spec.lane}`, + })); + } else { + cacheRepositories.set(identity, spec.lane); + } } } }