@vostride/agent-qa-dashboard 0.1.11 → 0.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -2395,6 +2395,7 @@ var DashboardReporter = class {
2395
2395
  if (!artifact || artifact.finalizedAt) return;
2396
2396
  const memoryLog = this.redactValue(result.memoryLog);
2397
2397
  if (memoryLog) {
2398
+ this.db.updateRun(runId, { memoryLog: JSON.stringify(memoryLog) });
2398
2399
  this.db.stageRunArtifact(runId, { memory: { log: memoryLog } });
2399
2400
  }
2400
2401
  this.db.finalizeRunArtifact(runId);
@@ -2537,9 +2538,22 @@ var DashboardReporter = class {
2537
2538
  childRunIds: []
2538
2539
  };
2539
2540
  for (const child of children) {
2540
- if (!child.memoryLog) continue;
2541
+ let rawLog = null;
2542
+ if (child.memoryLog) {
2543
+ try {
2544
+ rawLog = JSON.parse(child.memoryLog);
2545
+ } catch {
2546
+ rawLog = null;
2547
+ }
2548
+ }
2549
+ if (!rawLog) {
2550
+ const childArtifact = this.db.getRunArtifact(child.id);
2551
+ const memory = childArtifact?.payload.memory;
2552
+ rawLog = isRecord(memory) ? memory.log : null;
2553
+ }
2554
+ if (!isRecord(rawLog)) continue;
2541
2555
  try {
2542
- const log = JSON.parse(child.memoryLog);
2556
+ const log = rawLog;
2543
2557
  aggregate.added += log.added ?? 0;
2544
2558
  aggregate.confirmed += log.confirmed ?? 0;
2545
2559
  aggregate.deprecated += log.deprecated ?? 0;