Automation

Windmill v1.889.1: SDK Flow Mocking, Timeouts, and Origin Hardening

Windmill v1.889.1 (released November 28, 2026) caps a month of production-hardening releases with origin-enforced browser session cookies, native TOTP two-factor authentication, SDK-driven flow testing (wmill.testFlow / test_flow) with subflow step overrides, flow-level execution timeouts, and live HashiCorp Vault secret references.

By 0xScorPionSon

10 min read

Windmill v1.889.1: SDK Flow Mocking, Timeouts, and Origin Hardening

Windmill v1.889.1 architecture showing SDK flow testing, flow-level timeouts, and security hardening

Executive Summary

  • Browser session and CLI hardening (v1.889.0–v1.889.1, November 28, 2026): State-changing requests authenticated by browser session cookies are now rejected unless their origin matches the Windmill instance (Sec-Fetch-Site, Origin, or Referer compared against Host, X-Forwarded-Host, and BASE_URL), while wmill dev now binds to 127.0.0.1 by default instead of all interfaces (Windmill Releases).
  • Programmatic flow testing from SDKs (v1.880.0, November 2026): Teams can test deployed flows in CI using wmill.testFlow (TypeScript) and wmill.test_flow (Python) to mock step return values or swap step logic with exported test functions, including nested subflow steps addressed via sub:inner paths (Windmill Changelog, Testing Flows Docs).
  • Whole-run flow timeouts (v1.861.0, November 2026): Flows now support an end-to-end execution timeout (Runtime > Execution policy > Timeout) that spans sleeps and human approval waits, operates independently of the instance TIMEOUT cap, and cancels running steps on expiration (Custom Timeout Docs).
  • External Vault references and auth controls (v1.856.0–v1.888.0): Enterprise workspaces can store $external:vault://... pointers instead of copying secret values into Windmill, while v1.887.0–v1.888.0 add native TOTP two-factor authentication, token introspection, and workspace-bound default tokens (Variables and Secrets Docs, Windmill Releases).

What Changed Across Windmill November 2026 Releases (v1.856.0–v1.889.1)

Windmill Labs shipped a rapid series of infrastructure, security, and testing updates throughout November 2026, culminating in v1.889.1 on November 28, 2026 (Windmill Releases). Rather than introducing a single headline UI feature, the November release train (v1.856.0 through v1.889.1) targets four operational failure modes common in self-hosted and multi-team workflow automation: untestable multi-step DAGs, unbounded approval/sleep runs, secret duplication across external vaults, and permissive default network or session boundaries.

flowchart LR
    A[CI / Test Script] -->|wmill.testFlow / test_flow| B[Flow Preview Copy]
    B -->|Override Value or Function| C[Mocked Step / sub:inner]
    B -->|Real Execution| D[Flow Execution Policy Timeout]
    D -->|Deadline Reached| E[Cancel Steps + Error Handler]
    F[Browser / Proxy Request] -->|Sec-Fetch-Site / Origin| G[Origin & TOTP Guard]
    G -->|Authorized Job| H[Worker Runtime]
    H -->|Live Read on Access| I[Vault Secret Reference]

1. SDK-Driven Flow Testing (wmill.testFlow and wmill.test_flow)

Previously, Windmill's step mocking and result pinning lived inside the visual Flow Editor, which made automated regression testing of complex DAGs awkward in Git-synced CI pipelines (Step Mocking Docs). Starting in v1.880.0, the TypeScript and Python clients expose testFlow / test_flow (and asynchronous variants testFlowAsync / test_flow_async) to run the latest deployed version of a flow as an isolated preview copy without modifying the deployed flow definition (Windmill Changelog, Testing Flows Docs).

Each entry in the steps override map accepts either a static mock value or a named, exported function from the test script itself. Nested subflow steps are addressed using colon-delimited step ID paths such as notify:post or a:b:c at arbitrary depth (Testing Flows Docs):

import * as wmill from 'windmill-client';

// Exported so the overridden step can invoke it by name
export function fakeFetch(url: string) {
  return { status: 200, source: url };
}

export async function main() {
  return await wmill.testFlow(
    'f/flows/sync',
    { user: 'a' },
    {
      fetch_users: fakeFetch, // replaces step logic with local function
      send_email: 'sent',     // returns static mocked payload
      'notify:post': 'ok'     // overrides step `post` inside subflow `notify`
    }
  );
}

In Python, the replacement function must be a named, top-level function in the same script file (Testing Flows Docs):

import wmill

def fake_fetch(url: str):
    return {"status": 200, "source": url}

def main():
    return wmill.test_flow(
        "f/flows/sync",
        {"user": "a"},
        steps={
            "fetch_users": fake_fetch,
            "send_email": "sent",
            "notify:post": "ok",
        },
    )

2. Whole-Run Flow-Level Timeouts (v1.861.0)

Before v1.861.0, Windmill timeouts operated at the individual step level and could not exceed the instance-wide TIMEOUT environment variable (Custom Timeout Docs). Because a step timeout only counts active script execution time, a flow paused on a sleep node or a human-in-the-loop approval prompt could remain open indefinitely.

The flow-level timeout (Runtime > Execution policy > Timeout) bounds the entire wall-clock duration of a flow run in seconds from start to finish, explicitly including time spent sleeping or waiting at an approval step (Windmill Changelog, Custom Timeout Docs).

3. Origin-Checked Cookies, TOTP 2FA, and Token Governance (v1.887.0–v1.889.1)

Between November 27 and November 28, 2026, Windmill tightened authentication and API exposure across several layers (Windmill Releases):

  • Origin validation for browser cookies (v1.889.0): State-changing requests authenticated via browser session cookies are accepted only from the instance's own origin. Windmill checks Sec-Fetch-Site, then Origin, then Referer, comparing against the request Host, X-Forwarded-Host, and BASE_URL. Bearer-token requests (Authorization header) are unaffected.
  • wmill dev localhost binding (v1.889.0): The local development server wmill dev now binds to 127.0.0.1 by default rather than exposing a listener on all network interfaces; containerized workflows must explicitly pass --host 0.0.0.0.
  • MCP and sync hardening (v1.889.0–v1.889.1): /api/w/{workspace}/resources/mcp_tools/{path} changed from GET to POST with read-scope enforcement (v1.889.1 commit 8ccb60c), each MCP call is bound to its own token, workspace, and route (v1.888.0), and !inline references in synced resources, flows, and apps must stay inside the sync directory.
  • TOTP 2FA and token hygiene (v1.887.0–v1.888.0): Password logins support (and can require) native TOTP two-factor authentication, newly minted API tokens default to workspace-bound and rights-free unless explicitly opted in, and superadmins gain a token introspection endpoint and risky-token review panel.

4. HashiCorp Vault Secret References (v1.856.0)

In Enterprise Edition, secret variables can now point to an existing HashiCorp Vault secret (Type: Vault reference) rather than storing an encrypted copy in Windmill's database (Variables and Secrets Docs). Windmill stores only the pointer string—such as $external:vault://secret/team/app#token—and reads the live value from Vault on every access.

Reliability, Timeout Semantics, and Security Analysis

Understanding the edge cases of these new primitives is essential before relying on them in production pipelines.

Step Timeout vs. Flow-Level Timeout Semantics

Flow-level timeouts are not simply a larger step timeout; they enforce different cancellation and error-recovery rules (Custom Timeout Docs):

Dimension Step-Level Timeout Flow-Level Timeout (v1.861.0+)
Clock scope Active execution time of that step's job only Entire run wall-clock time, including sleeps and approvals
Instance TIMEOUT cap Cannot exceed instance TIMEOUT env var Not bounded by instance TIMEOUT
Error handler recovery Flow error handler can recover if configured Runs error handler, then always ends as cancelled by timeout (even if recover: true)
Pending approvals Controlled by step/approval settings Abandoned even if continue on disapproval/timeout is enabled
Subflow behavior Step timeout applies to child call Flow timeout applies when invoked as subflow unless caller sets its own

Two operational details stand out in the documentation. First, Windmill notes that a timed-out flow run can finish up to about 10 seconds after the configured deadline, so downstream SLA monitors should not assume sub-second termination (Custom Timeout Docs). Second, because recover: true in an error handler cannot override a flow-level timeout, teams should treat the flow timeout as a hard circuit breaker for cleanup and alerting rather than a soft branch condition.

testFlow Execution Fidelity and Worker Constraints

While wmill.testFlow and wmill.test_flow dramatically improve CI coverage, test runs do not replicate every production runtime invariant (Testing Flows Docs):

  • Deadlock risk on single-worker setups: When a test script calls testFlow synchronously and waits for the result, a second worker must be free to execute the flow. On single-worker dev instances, synchronous testFlow calls will stall until timeout; use testFlowAsync or provision at least two workers.
  • Skipped preprocessors and disabled caching: The tested flow's preprocessor does not run—passed args represent the post-preprocessor payload—and result caching is turned off for the tested flow and any overridden subflow.
  • Subflow identity and worker version floor: Overridden subflows (and parent subflows along the path to an override) execute as the calling user rather than their configured run-on-behalf-of identity. Additionally, subflow overrides require every worker in the cluster to run 1.879.0 or later, and restarting a test run drops all overrides.
  • AI agent boundary: Individual tools attached to an AI agent step cannot be mocked directly; tests must override the AI agent step itself.

Vault References vs. Full Vault Secret Backends

Windmill now offers two distinct ways to integrate HashiCorp Vault, and their security boundaries differ (Variables and Secrets Docs):

  • Full Vault Secret Backend: Windmill writes and reads all workspace secrets to a dedicated KV v2 mount in Vault, keeping ciphertext out of the Windmill PostgreSQL database entirely. It is fail-closed if Vault is unreachable.
  • Vault Secret References ($external:vault://...): Windmill reads existing Vault paths managed by external teams (supporting KV v1 and v2, AppRole with VAULT_APPROLE_SECRET_ID, JWT auth via /.well-known/jwks.json, or static tokens). Because Windmill reads all references using its single configured Vault identity, superadmins must explicitly allowlist vault://<prefix> paths per workspace under Instance settings > Secret Storage > External secret references. Leaving workspaces empty on a prefix exposes that prefix to every workspace on the instance, and any admin of an allowed workspace can read secrets under that prefix within Windmill's Vault policy.

Confidence note: All behavioral details above are derived directly from Windmill's official documentation and GitHub release notes published through November 28, 2026; no independent third-party latency benchmarks for v1.889.1 were available at the time of writing (high confidence on functional behavior, N/A on independent throughput deltas).

Practical Implementation and Upgrade Trade-Offs

Upgrading Self-Hosted Instances to v1.889.1

Because v1.889.0 and v1.889.1 introduce stricter defaults at the HTTP and CLI layers, teams upgrading from v1.886.x or earlier should verify four configuration points before rolling out (Windmill Releases):

  1. Reverse Proxy Headers & BASE_URL: If Windmill runs behind Nginx, Caddy, Traefik, or an ingress controller over plain HTTP that rewrites the Host header, browser cookie mutations (POST, PUT, DELETE) will fail origin checks unless BASE_URL matches the public URL users open or the proxy forwards X-Forwarded-Host. Cross-origin browser apps that rely on session cookies must be explicitly listed in SESSION_COOKIE_TRUSTED_ORIGINS.
  2. Containerized Local Dev (wmill dev): CI or Docker Compose setups that run wmill dev inside a container and access it from the host must add --host 0.0.0.0, since v1.889.0 defaults to 127.0.0.1.
  3. MCP Tool Clients: Any custom script or integration calling /api/w/{workspace}/resources/mcp_tools/{path} via GET must switch to POST and ensure the caller token holds read scope.
  4. Git Sync !inline Paths: Verify that wmill sync repositories do not use !inline directives pointing outside the sync root directory, as v1.889.0 rejects out-of-tree inline references.

Choosing the Right Testing and Timeout Pattern

  • Use testFlow with static mocks when validating branching logic, error handlers, or data transforms in CI without touching external APIs. If running tests from outside Windmill (for example, a GitHub Actions runner calling the Windmill API), stick to static value mocks—function replacement only works when the test script itself runs inside Windmill (TypeScript Bun/Deno or Python with no extra attached files) (Testing Flows Docs).
  • Use testFlow with function overrides when you need dynamic assertions on step inputs (such as verifying the exact SQL query or webhook payload a previous step constructed) before returning a synthetic response.
  • Combine flow-level timeouts with loop failure thresholds (v1.887.0): In v1.887.0, Windmill added a failure threshold to stop loops early once a set number of iterations fail (#12686), complementing v1.884.0's ability to rerun only failed iterations of a parallel for-loop or branch-all (#12590) (Windmill Releases). Pairing loop failure thresholds with a flow-level timeout prevents runaway parallel fan-outs from burning worker capacity when an upstream API degrades.

Frequently Asked Questions

1. Does wmill.testFlow modify or redeploy my production flow?

No. testFlow and test_flow execute the latest deployed version of the flow as a preview copy with your step overrides applied in memory, leaving the deployed flow definition untouched (Testing Flows Docs).

2. Why did my synchronous wmill.testFlow call hang on a single-worker instance?

When a Windmill script calls testFlow or test_flow synchronously, it occupies one worker slot while waiting for the tested flow to finish. You need at least a second free worker to execute the flow itself, or you can call testFlowAsync / test_flow_async to receive the job ID immediately without blocking a worker (Testing Flows Docs).

3. Can a flow's error handler recover from a flow-level timeout?

No. When a flow-level timeout (Runtime > Execution policy > Timeout) expires, Windmill cancels running steps, invokes the error handler if one is configured, and still marks the overall run as cancelled by timeout—even if the error handler returns recover: true (Custom Timeout Docs).

4. Will v1.889.1 origin checks break API automation scripts using Bearer tokens?

No. The session-cookie origin enforcement (Sec-Fetch-Site, Origin, Referer) applies only to browser-cookie-authenticated state-changing requests; programmatic requests using an Authorization: Bearer <token> header are unaffected (Windmill Releases).

5. Do Vault secret references store copies of secrets in Windmill's database?

No. Windmill stores only the reference string (for example, $external:vault://secret/team/app#token) and fetches the secret from HashiCorp Vault on every read, so rotating or revoking the secret in Vault takes effect on the next access (Variables and Secrets Docs).

Sources

  1. Windmill Labs — Releases · windmill-labs/windmill (v1.882.0–v1.889.1) (November 22–28, 2026)
  2. Windmill Labs — Windmill Changelog (November 2026: v1.856.0–v1.880.0+) (November 2026)
  3. Windmill Labs — Testing Flows Documentation (wmill.testFlow / test_flow) (Accessed November 30, 2026)
  4. Windmill Labs — Custom Timeout for Steps and Flows Documentation (Accessed November 30, 2026)
  5. Windmill Labs — Variables and Secrets Documentation (Vault Secret References) (Accessed November 30, 2026)

More on Automation

Tell us what is not working

A thirty-minute call, no deck and no obligation. You will leave with a straight answer about whether this is worth building - including if that answer is no.

Start a project

Direct line

hello@codebumble.net
Dhaka, Bangladesh  :   local timeCalls in English or Bangla