diff --git a/workflows/adapters/differ-adapter.ts b/workflows/adapters/differ-adapter.ts index aae8695..497c0ce 100644 --- a/workflows/adapters/differ-adapter.ts +++ b/workflows/adapters/differ-adapter.ts @@ -23,10 +23,7 @@ export function createDifferAdapter( throw new Error("differ: office step not found in ctx.steps (invariant violation)"); } - const officeMeta = officeStep.meta as { mode: string; outputDocx: string; sourceDocx: string | null }; - if (officeMeta.mode !== "edit" || officeMeta.sourceDocx === null) { - throw new Error("differ: office step is not in edit mode"); - } + const officeMeta = officeStep.meta as { outputDocx: string; sourceDocx: string }; const { outputDocx, sourceDocx } = officeMeta; const reportPath = join(dirname(outputDocx), "diff_report.html"); @@ -40,7 +37,6 @@ export function createDifferAdapter( if (!result.ok) { const e = result.error; if (e.kind === "non_zero_exit" && e.exitCode === 1) { - // exit 1 means "documents differ" — the normal success case for docx-diff } else if (e.kind === "non_zero_exit") { throw new Error(`differ: docx-diff failed (exit ${e.exitCode}): ${e.stderr}`); } else if (e.kind === "timeout") {