From ce4720bad8cbcfb8ffc0084ceac7022fe1cdcee0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 25 Mar 2026 18:20:29 +0000 Subject: [PATCH] refactor: address review - extract RAPID_ITERATION_THRESHOLD_MS, simplify data access Co-authored-by: glittercowboy <186001655+glittercowboy@users.noreply.github.com> Agent-Logs-Url: https://github.com/gsd-build/gsd-2/sessions/d648480a-42f4-4c41-81c7-85038609c717 --- src/resources/extensions/gsd/forensics.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/resources/extensions/gsd/forensics.ts b/src/resources/extensions/gsd/forensics.ts index d66c737d9..f6dd0b022 100644 --- a/src/resources/extensions/gsd/forensics.ts +++ b/src/resources/extensions/gsd/forensics.ts @@ -343,6 +343,9 @@ export async function buildForensicReport(basePath: string): Promise | undefined)?.unitId as string | undefined, + unitId: e.data?.unitId as string | undefined, })); return { @@ -676,7 +679,7 @@ function detectJournalAnomalies(journal: JournalSummary | null, anomalies: Foren const spanMs = newest - oldest; if (spanMs > 0 && journal.flowCount > 10) { const avgMs = spanMs / journal.flowCount; - if (avgMs < 5000) { // Less than 5 seconds per iteration + if (avgMs < RAPID_ITERATION_THRESHOLD_MS) { anomalies.push({ type: "journal-rapid-iterations", severity: "warning",