From bd51da51ebb148b1b7fe9e7c9e944fd5abae453c Mon Sep 17 00:00:00 2001
From: Christopher Willis-Ford <7019101+cwillisf@users.noreply.github.com>
Date: Tue, 3 Oct 2023 12:41:03 -0700
Subject: [PATCH] Revert "fix: disable metadata for now"

---
 src/engine/runtime.js     | 7 +++----
 test/integration/runId.js | 5 ++---
 2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/src/engine/runtime.js b/src/engine/runtime.js
index 0bfc25ac5..29c14d3aa 100644
--- a/src/engine/runtime.js
+++ b/src/engine/runtime.js
@@ -1,6 +1,6 @@
 const EventEmitter = require('events');
 const {OrderedMap} = require('immutable');
-// const uuid = require('uuid');
+const uuid = require('uuid');
 
 const ArgumentType = require('../extension-support/argument-type');
 const Blocks = require('./blocks');
@@ -2032,9 +2032,8 @@ class Runtime extends EventEmitter {
             return;
         }
 
-        // TODO: re-enable metadata
-        // const newRunId = uuid.v1();
-        // this.storage.scratchFetch.setMetadata(this.storage.scratchFetch.RequestMetadata.RunId, newRunId);
+        const newRunId = uuid.v1();
+        this.storage.scratchFetch.setMetadata(this.storage.scratchFetch.RequestMetadata.RunId, newRunId);
     }
 
     /**
diff --git a/test/integration/runId.js b/test/integration/runId.js
index 2a67a134e..cdc006b20 100644
--- a/test/integration/runId.js
+++ b/test/integration/runId.js
@@ -1,6 +1,6 @@
 const Worker = require('tiny-worker');
 const path = require('path');
-const test = require('tap');
+const test = require('tap').test;
 
 const VirtualMachine = require('../../src/index');
 const dispatch = require('../../src/dispatch/central-dispatch');
@@ -15,8 +15,7 @@ const project = readFileToBuffer(uri);
 // By default Central Dispatch works with the Worker class built into the browser. Tell it to use TinyWorker instead.
 dispatch.workerClass = Worker;
 
-// TODO: re-enable metadata
-test.skip('runId', async t => {
+test('runId', async t => {
     const guidRegex = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;
     const isGuid = data => guidRegex.test(data);