waygraph / runBranchRegression
Function: runBranchRegression()
runBranchRegression(
flow,context,mem?,options?):Promise<BranchRunResult[]>
Defined in: src/engine/flow/branch-regression.ts:96
Runs every path through flow's .branch() tree - by default in a CLONED session per branch point (see this file's own header), so one branch finishing doesn't consume another's chance to run. Each explored branch gets its own MemPage (via MemPage.clone, seeded further with seedMemStub for anything a route alone requires that the shared prefix didn't already set).
Parameters
flow
Flow<Checkpoint<string>>
context
BrowserContext
mem?
MemPage = ...
options?
Returns
Promise<BranchRunResult[]>
Example
ts
for (const r of await runBranchRegression(loginFlow, context)) {
console.log(r.path, r.status, r.error ?? "");
}