ruvnet/ruflo · error · GasTownError

INVALID_ARGUMENTS

INVALID_ARGUMENTS

Error message

Missing required variables: ${missing.join(', ')}

What it means

validateVariables() collected every formula variable that is required, absent from the caller's vars, and has no default — and found at least one. The INVALID_ARGUMENTS error lists all missing variable names so the caller can supply them in one fix.

Source

Thrown at v3/plugins/gastown-bridge/src/formula/executor.ts:1423

    return formula;
  }

  /**
   * Validate required variables are provided
   */
  private validateVariables(formula: Formula, vars: Record<string, string>): void {
    if (!formula.vars) return;

    const missing: string[] = [];

    for (const [name, varDef] of Object.entries(formula.vars)) {
      if (varDef.required && !(name in vars) && !varDef.default) {
        missing.push(name);
      }
    }

    if (missing.length > 0) {
      throw new GasTownError(
        `Missing required variables: ${missing.join(', ')}`,
        GasTownErrorCode.INVALID_ARGUMENTS,
        { missing }
      );
    }
  }

  /**
   * Resolve step dependencies using WASM or JS fallback
   */
  private resolveStepDependencies(steps: Step[]): Step[] {
    const loader = this.wasmLoader.isInitialized() ? this.wasmLoader : this.jsFallback;
    return loader.resolveStepDependencies(steps);
  }

  /**
   * Get ordered execution units (steps or legs) from formula
   */

View on GitHub (pinned to fa13ee4ad6)

Solutions

  1. Provide all required parameters listed in the message.
  2. Validate required fields before dispatch and report the full set of missing fields at once.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at v3/plugins/gastown-bridge/src/formula/executor.ts:1423 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of ruvnet/ruflo@fa13ee4ad6 (2026-08-18). Data as JSON: /api/errors/9b3095964a892aec. Report an issue: GitHub.