feat(FN-5205): add workflow-step test mode dispatch and routing for mock pr

Implements workflow step test mode (FN-5205) by wiring mock dispatch, context forwarding, and routing through executor, merger, and mock provider, plus adding corresponding tests and docs. Also adds broad-scope triage heuristics to improve task-scope detection, touching triage.ts, triage-broad-scope

Fusion-Task-Id: FN-5205

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
Fusion-Task-Id: FN-5205
This commit is contained in:
gsxdsm
2026-05-23 02:15:36 -07:00
parent b22112af89
commit 76bd3a7d90
19 changed files with 808 additions and 23 deletions

View File

@@ -1,6 +1,6 @@
import test from "node:test";
import assert from "node:assert/strict";
import { mkdtempSync, rmSync } from "node:fs";
import { mkdtempSync, rmSync, readFileSync } from "node:fs";
import { tmpdir } from "node:os";
import { join, resolve } from "node:path";
import { execFileSync, spawnSync } from "node:child_process";
@@ -81,6 +81,12 @@ test("replaces seeded workflow prompts and remains idempotent", async () => {
}
});
test("pins FN-5205 test-mode rationale comment", () => {
const source = readFileSync(scriptPath, "utf8");
assert.match(source, /FN-5205/);
assert.match(source, /Do not branch seeded prompt bodies\s*\n\/\/ on testMode\./);
});
test("reports skipped when seeded rows are absent", () => {
ensureCoreDist();
const tempDir = mkdtempSync(join(tmpdir(), "fn4493-script-empty-"));