fix(confidence-engine): correct experiment helper project root
This commit is contained in:
@@ -16,10 +16,12 @@
|
|||||||
|
|
||||||
// Use the standard environment loader already available to this Next repository.
|
// Use the standard environment loader already available to this Next repository.
|
||||||
// loadEnvConfig mutates process.env in-place (same semantics as previous bespoke parser).
|
// loadEnvConfig mutates process.env in-place (same semantics as previous bespoke parser).
|
||||||
|
const path = require("path");
|
||||||
|
const PROJECT_ROOT = path.resolve(__dirname, "..");
|
||||||
(function loadEnvironment() {
|
(function loadEnvironment() {
|
||||||
try {
|
try {
|
||||||
const { loadEnvConfig } = require("@next/env");
|
const { loadEnvConfig } = require("@next/env");
|
||||||
loadEnvConfig(__dirname, undefined, { logOutput: "none" }, false);
|
loadEnvConfig(PROJECT_ROOT, undefined, { logOutput: "none" }, false);
|
||||||
} catch {
|
} catch {
|
||||||
// loader unavailable — proceed with whatever is already set.
|
// loader unavailable — proceed with whatever is already set.
|
||||||
}
|
}
|
||||||
@@ -90,7 +92,7 @@ async function runStartCaseExperiment(scenarioInput, experimentInstruction) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const { startCase: _sc } = await import("../../lib/graph/orchestrator.js");
|
const { startCase: _sc } = await import(PROJECT_ROOT + "/lib/graph/orchestrator.js");
|
||||||
startCase = _sc;
|
startCase = _sc;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -135,7 +137,7 @@ async function runStartCaseExperiment(scenarioInput, experimentInstruction) {
|
|||||||
// Used only for deterministic apparatus verification of the import path.
|
// Used only for deterministic apparatus verification of the import path.
|
||||||
if (process.env.START_CASE_EXPERIMENT_HELPER_IMPORT_ONLY === "1") {
|
if (process.env.START_CASE_EXPERIMENT_HELPER_IMPORT_ONLY === "1") {
|
||||||
try {
|
try {
|
||||||
const mod = await import("../../lib/graph/orchestrator.js");
|
const mod = await import(PROJECT_ROOT + "/lib/graph/orchestrator.js");
|
||||||
const startCaseResolved = typeof mod.startCase === "function";
|
const startCaseResolved = typeof mod.startCase === "function";
|
||||||
const output = JSON.stringify({
|
const output = JSON.stringify({
|
||||||
success: true,
|
success: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user