diff --git a/internal/cloud/code-agent-agentrun-adapter.ts b/internal/cloud/code-agent-agentrun-adapter.ts index 2b15661c..32f779a0 100644 --- a/internal/cloud/code-agent-agentrun-adapter.ts +++ b/internal/cloud/code-agent-agentrun-adapter.ts @@ -1004,7 +1004,6 @@ function newSessionIdAfterEviction(baseSessionId, traceId) { function buildAgentRunCreateRunInput({ params, env, traceId, backendProfile, sessionId, toolCapabilities = null }) { const commitId = requireAgentRunSourceCommit(env); - const runtimeAuthority = requireAgentRunRuntimeAuthority(env); const threadId = safeOpaqueId(params.threadId); const hwlabProjectId = firstNonEmpty(params.projectId); rejectRemovedResourceWorkspaceFiles(params.workspaceFiles ?? params.resourceWorkspaceFiles); @@ -1022,11 +1021,7 @@ function buildAgentRunCreateRunInput({ params, env, traceId, backendProfile, ses projectId: agentRunProjectIdForEnv(env), workspaceRef: { kind: "opaque", - repo: DEFAULT_PROJECT_ID, - branch: firstNonEmpty(env.HWLAB_BOOT_REF, env.HWLAB_CODE_AGENT_AGENTRUN_BRANCH, defaultAgentRunBranchForRuntimeLane(runtimeAuthority.lane), "v0.2"), - runtimeNamespace: runtimeAuthority.namespace, - hwlabTraceId: traceId, - valuesPrinted: false + path: "." }, sessionRef: { sessionId: sessionId ?? scopedAgentRunSessionIdForParams(params, traceId), @@ -1349,12 +1344,6 @@ function namespaceForAgentRunRuntimeLane(lane) { return null; } -function defaultAgentRunBranchForRuntimeLane(lane) { - const match = String(lane ?? "").match(/^v(\d+)$/u); - if (!match) return null; - return `v0.${Number.parseInt(match[1], 10)}`; -} - function agentRunRuntimeAuthorityError(code, message) { return Object.assign(new Error(message), { code, diff --git a/internal/cloud/code-agent-agentrun-durable-admission.test.ts b/internal/cloud/code-agent-agentrun-durable-admission.test.ts index 4fb1b7a3..fb4bfb6e 100644 --- a/internal/cloud/code-agent-agentrun-durable-admission.test.ts +++ b/internal/cloud/code-agent-agentrun-durable-admission.test.ts @@ -54,6 +54,9 @@ test("fresh gpt.pika turn returns running only after durable dispatch intent is assert.equal(result.agentRun.durableDispatch, true); assert.equal(result.agentRun.status, "dispatch-intent-pending"); + const runCall = calls.find((call) => call.path === "/api/v1/runs"); + assert.ok(runCall); + assert.deepEqual(runCall.body.workspaceRef, { kind: "opaque", path: "." }); const commandCall = calls.find((call) => call.path.endsWith("/commands")); assert.ok(commandCall); assert.equal(commandCall.body.idempotencyKey, traceId); diff --git a/internal/cloud/server-agent-chat.test.ts b/internal/cloud/server-agent-chat.test.ts index e95197df..5167a892 100644 --- a/internal/cloud/server-agent-chat.test.ts +++ b/internal/cloud/server-agent-chat.test.ts @@ -647,8 +647,7 @@ test("cloud api /v1/agent/chat delegates v0.3 turns to AgentRun v0.1 over adapte assert.equal(body.tenantId, "hwlab"); assert.equal(body.projectId, "pikasTech/HWLAB"); assert.equal(body.backendProfile, "deepseek"); - assert.equal(body.workspaceRef.branch, "v0.3"); - assert.equal(body.workspaceRef.runtimeNamespace, "hwlab-v03"); + assert.deepEqual(body.workspaceRef, { kind: "opaque", path: "." }); assert.equal(body.resourceBundleRef.repoUrl, "http://git-mirror-http.devops-infra.svc.cluster.local/pikasTech/HWLAB.git"); assert.equal(body.resourceBundleRef.commitId, "0123456789abcdef0123456789abcdef01234567"); assert.equal(body.resourceBundleRef.kind, "gitbundle");