Enforce runtime report contracts and recoverable session exports
This commit is contained in:
@@ -60,6 +60,17 @@ function lastFrame(ws) {
|
||||
return frame;
|
||||
}
|
||||
|
||||
test("runPipeline sends an explicit output_format and leaves legacy launches unchanged", async () => {
|
||||
const { repo, ws } = connected();
|
||||
ws.reply = (frame) => ({ id: frame.id, type: "run_started", run_detail: { id: 1 } });
|
||||
for (const outputFormat of ["", "html", "markdown"]) {
|
||||
await repo.runPipeline({ pipelineId: 2, version: 1, prompt: "report", workspace: "/scratch", outputFormat });
|
||||
const frame = lastFrame(ws);
|
||||
assert.equal(frame.output_format, outputFormat || undefined);
|
||||
assert.deepEqual(frame.input, { prompt: "report" });
|
||||
}
|
||||
});
|
||||
|
||||
test("listTemplates sends exactly {type:'list_templates'} and returns the catalogue", async () => {
|
||||
const { repo, ws } = connected();
|
||||
ws.reply = (frame) => ({
|
||||
|
||||
Reference in New Issue
Block a user