From c91813de968c9676ba8fdee29d41a89f892692b8 Mon Sep 17 00:00:00 2001 From: Paul O'Reilly Date: Fri, 2 Oct 2026 14:54:37 +1300 Subject: [PATCH] fix(agent-repo): AR-39b run base selector by absolute path; seed scope-decompose@2 from upstream init.sh invoked 'python3 -m entrypoint.agent_repo_base' from /workspace/project, so a project repo's own entrypoint/ shadowed the image's and the selector crashed. Invoke the image copy by path. scope-decompose-sonnet@2 gains AGENT_UPSTREAM_REPO_URL/BRANCH so fresh spec branches seed from upstream main instead of the stale fork main. Claude-Session: https://claude.ai/code/session_01N218bERyNeLhbLmDRDvbWF --- harnesses/contexts/agent-repo/v1/init.sh | 2 +- task-templates/workflow/scope-decompose-sonnet@2.yaml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/harnesses/contexts/agent-repo/v1/init.sh b/harnesses/contexts/agent-repo/v1/init.sh index 36868df..55a0403 100755 --- a/harnesses/contexts/agent-repo/v1/init.sh +++ b/harnesses/contexts/agent-repo/v1/init.sh @@ -75,7 +75,7 @@ if [ -n "${AGENT_REPO_URL:-}" ] && [ -n "${AGENT_BRANCH:-}" ]; then # finalize.sh to merge into ci_metadata.json (AR-25). Falls back # to the legacy inline AR-14a logic if the CLI is unavailable. mkdir -p /workspace/.agent-output - AR39_OUT=$(python3 -m entrypoint.agent_repo_base select-base \ + AR39_OUT=$(python3 /opt/agent/agent_repo_base.py select-base \ --workdir /workspace/project \ --branch "$AGENT_BRANCH" \ --upstream-url "${AGENT_UPSTREAM_REPO_URL:-}" \ diff --git a/task-templates/workflow/scope-decompose-sonnet@2.yaml b/task-templates/workflow/scope-decompose-sonnet@2.yaml index 188e278..ba95dd3 100644 --- a/task-templates/workflow/scope-decompose-sonnet@2.yaml +++ b/task-templates/workflow/scope-decompose-sonnet@2.yaml @@ -26,6 +26,8 @@ nodes: runtime_env: AGENT_REPO_URL: "git@gitea.oreillyit.nz-ai-enablement:skynet/agent-runtimes-agents.git" AGENT_BRANCH: "spec/${item.uuid}" + AGENT_UPSTREAM_REPO_URL: "git@gitea.oreillyit.nz-ai-enablement:skynet/agent-runtimes.git" + AGENT_UPSTREAM_BRANCH: "main" CP_URL: "https://agents.oreillyit.nz/api" # The deliverable is a directory of plan files on disk — NOT a git diff. AGENT_EMPTY_DELIVERABLE_CHECK: "false"