Feature/product platform foundation v0.62 #1

Merged
robbond merged 683 commits from feature/product-platform-foundation-v0.62 into feature/emergent-unknowns-v0.5 2026-09-09 07:58:20 +01:00
2 changed files with 30 additions and 3 deletions
Showing only changes of commit 5878ce45ec - Show all commits
+12 -3
View File
@@ -8,6 +8,7 @@
* Usage:
* node scripts/start-case-experiment-helper.cjs "<scenario text>"
* node scripts/start-case-experiment-helper.cjs --file scenario.json
* node scripts/start-case-experiment-helper.cjs --reconstruction-only --file scenario.json
*
* Exit codes:
* 0 — success (structured result printed to stdout)
@@ -86,7 +87,7 @@ async function runStartCaseExperiment(scenarioInput, experimentInstruction, opti
if (!startCase && isMock) {
// Deterministic mode: skip environment checks and use inline test double.
startCase = async (body) => {
startCase = async (_body, dependencies) => {
// Deterministic inline test double — no live model calls.
const shouldFail = process.env.START_CASE_EXPERIMENT_HELPER_FORCE_FAIL === "1";
if (shouldFail) {
@@ -98,7 +99,12 @@ async function runStartCaseExperiment(scenarioInput, experimentInstruction, opti
assessment: { phase: "initial", progress: 0 },
selectedQuestion: null,
summary: null,
diagnostics: { validationStatus: "mock", modelName: "inline-test-double", graphReferenceValidation: { valid: true, errors: [] } },
diagnostics: {
validationStatus: "mock",
modelName: "inline-test-double",
reconstructionOnly: dependencies.reconstructionOnly === true,
graphReferenceValidation: { valid: true, errors: [] },
},
};
};
} else if (!startCase) {
@@ -197,7 +203,10 @@ if (require.main === module) {
}
const scenarioInput = readScenarioInput(process.argv);
const result = await runStartCaseExperiment(scenarioInput, experimentInstruction);
const reconstructionOnly = process.argv.includes("--reconstruction-only");
const result = await runStartCaseExperiment(scenarioInput, experimentInstruction, {
reconstructionOnly,
});
console.log(JSON.stringify(result, null, 2));
process.exit(result.success ? 0 : 1);
@@ -141,6 +141,24 @@ describe("start-case-experiment-helper.cjs apparatus", () => {
});
});
describe("B.1 — reconstruction-only CLI option", () => {
it("passes reconstructionOnly through the startCase seam without selecting OpenAI", async () => {
const result = await runHelper(["--reconstruction-only", "Scenario text"]);
expect(result.exitCode).toBe(0);
const parsed = parseOutput(result);
expect(parsed.diagnostics).toMatchObject({
modelName: "inline-test-double",
reconstructionOnly: true,
});
});
it("composes reconstruction-only with file input", async () => {
const result = await runHelper(["--reconstruction-only", "--file", tmpFile]);
expect(result.exitCode).toBe(0);
expect(parseOutput(result).diagnostics.reconstructionOnly).toBe(true);
});
});
// ── C — Environment loading ─────────────────────────────────────
describe("C — environment loading", () => {