feat: copy deliverables to audit-logs for self-contained audit trail

This commit is contained in:
ajmallesh
2026-02-11 19:06:31 -08:00
parent 30b5522647
commit 80bc8e3a44
2 changed files with 44 additions and 2 deletions
+8 -1
View File
@@ -74,7 +74,7 @@ import type { WorkflowSummary } from '../audit/workflow-logger.js';
import type { AgentName } from '../types/agents.js';
import type { AgentMetrics } from './shared.js';
import type { DistributedConfig } from '../types/config.js';
import type { SessionMetadata } from '../audit/utils.js';
import { copyDeliverablesToAudit, type SessionMetadata } from '../audit/utils.js';
const HEARTBEAT_INTERVAL_MS = 2000; // Must be < heartbeatTimeout (10min production, 5min testing)
@@ -251,6 +251,13 @@ async function runAgentActivity(
});
await commitGitSuccess(repoPath, agentName);
// 9.5. Copy deliverables to audit-logs (non-fatal)
try {
await copyDeliverablesToAudit(sessionMetadata, repoPath);
} catch (copyErr) {
console.error(`Failed to copy deliverables to audit-logs for ${agentName}:`, copyErr);
}
// 10. Return metrics
return {
durationMs: Date.now() - startTime,