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:
@@ -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-"));
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
#!/usr/bin/env node
|
||||
// Test-mode note (FN-5205):
|
||||
// Seeded prompt bodies (including WS-004 / browser-verification) are NOT
|
||||
// altered for test mode. Test-mode determinism is delivered at the provider
|
||||
// layer via the FN-5203 mock-provider script registry; the seeded prompt
|
||||
// remains the production canonical text. Do not branch seeded prompt bodies
|
||||
// on testMode.
|
||||
/**
|
||||
* Rollback prompts captured before replacement (from local worktree DB):
|
||||
* WS-004: not present in .fusion/fusion.db at capture time.
|
||||
|
||||
Reference in New Issue
Block a user