Skip to content

Commit f36d146

Browse files
committed
Add comment explaining env var design decision
1 parent 4a14def commit f36d146

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/runner/client.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@ async function executeClient(
2727
let stderr = '';
2828
let timedOut = false;
2929

30-
// Build environment with scenario name and optional context
30+
// Build environment with scenario name and optional context.
31+
// We use separate env vars rather than putting scenario in context because:
32+
// 1. Scenario is always set, context is only set when there's scenario-specific data
33+
// 2. Simpler to read a string vs parsing JSON just to get the scenario name
34+
// 3. Semantic separation: scenario identifies "which test", context provides "test data"
3135
const env = { ...process.env };
3236
env.MCP_CONFORMANCE_SCENARIO = scenarioName;
3337
if (context) {

0 commit comments

Comments
 (0)