From 0b34af7e7af7e49160eab8b5933d41e0edf6de87 Mon Sep 17 00:00:00 2001 From: PJ Date: Fri, 5 Jun 2026 17:59:03 +0530 Subject: [PATCH] fix(folio): saturation-gate account creation in the spec The 2-3 step add-account loop outcompeted the 5-step transaction chain at every weighted re-draw, so runs filled with account creation and rarely exercised the balance properties. Stop offering add-account once three accounts exist; the renormalized weights then favor the transaction flow at every step of its chain. --- examples/folio/sanderling/spec.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/examples/folio/sanderling/spec.ts b/examples/folio/sanderling/spec.ts index 1e2f7a3..0c9d396 100644 --- a/examples/folio/sanderling/spec.ts +++ b/examples/folio/sanderling/spec.ts @@ -134,8 +134,15 @@ const login = actions(() => { const accountNames = from(["Checking", "Savings", "Travel", "Emergency Fund", "Investments"]); +// Saturation gate: a few accounts are enough to exercise every balance +// property. Without the gate the short add-account loop (2-3 steps, back to +// home) outcompetes the 5-step transaction chain at every re-draw and the +// run fills with account creation instead of transactions. +const ACCOUNTS_ENOUGH = 3; + const addAccount = whenRoute(route, ["home", "add-account"], () => { if (route.current === "home") { + if (accounts.current.length >= ACCOUNTS_ENOUGH) return []; const btn = addAccountButton.current; return btn ? [Tap({ on: btn })] : []; }