From 95b8e876eb2c59828d909ee29fadd4ccf15faa9d Mon Sep 17 00:00:00 2001 From: ajmallesh Date: Mon, 27 Oct 2025 10:55:53 -0700 Subject: [PATCH] fix: use session's original createdAt instead of current time MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixed bug where audit system would create duplicate folders for the same session because it was using current time instead of the session's original createdAt timestamp. Bug behavior: - Session created at T1 → folder: {T1}_app_host_id/ - Audit re-initialized at T2 → NEW folder: {T2}_app_host_id/ - Result: 2 folders per session with same ID but different timestamps Root cause: - metrics-tracker.js:65 was calling formatTimestamp() (current time) - Should use sessionMetadata.createdAt (original creation time) Impact: Each running benchmark was creating 2 audit log folders instead of 1 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- src/audit/metrics-tracker.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/audit/metrics-tracker.js b/src/audit/metrics-tracker.js index 4496cb0..eb8d97d 100644 --- a/src/audit/metrics-tracker.js +++ b/src/audit/metrics-tracker.js @@ -62,7 +62,7 @@ export class MetricsTracker { webUrl: this.sessionMetadata.webUrl, repoPath: this.sessionMetadata.repoPath, status: 'in-progress', - createdAt: formatTimestamp() + createdAt: this.sessionMetadata.createdAt || formatTimestamp() }, metrics: { total_duration_ms: 0,