fix: set originalWorkflowId in logPhaseTransition and remove path import from agents.ts

logPhaseTransition was the first activity to create session.json but
didn't pass workflowId, so originalWorkflowId was never set. This
caused terminateExistingWorkflows to look up the workspace name instead
of the actual workflow ID during resume.

Also remove path import from types/agents.ts to fix Temporal workflow
bundle determinism error.
This commit is contained in:
ezl-keygraph committed 2026-02-13 22:09:07 +05:30
1 parent ee5d7b80a0
commit f017a41436
2 files changed
+3 -5

No files matched your search

+2 -2
View File
@@ -678,7 +678,7 @@ export async function logPhaseTransition(
phase: string,
event: 'start' | 'complete'
): Promise<void> {
const { webUrl, repoPath, outputPath, sessionId } = input;
const { webUrl, repoPath, outputPath, sessionId, workflowId } = input;
const sessionMetadata: SessionMetadata = {
id: sessionId,
@@ -688,7 +688,7 @@ export async function logPhaseTransition(
};
const auditSession = new AuditSession(sessionMetadata);
await auditSession.initialize();
await auditSession.initialize(workflowId);
if (event === 'start') {
await auditSession.logPhaseStart(phase);
+1 -3
View File
@@ -8,8 +8,6 @@
* Agent type definitions
*/
import path from 'path';
/**
* List of all agents in execution order.
* Used for iteration during resume state checking.
@@ -118,5 +116,5 @@ export function getDeliverablePath(agentName: AgentName, repoPath: string): stri
};
const filename = deliverableMap[agentName];
return path.join(repoPath, 'deliverables', filename);
return `${repoPath}/deliverables/${filename}`;
}