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:
@@ -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
@@ -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}`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user