Hmbown/CodeWhale · warning · Error

pipeline(): max 1000 items per call

Error message

pipeline(): max 1000 items per call

What it means

Startup warning: tui.toml exists but does not parse as TOML - the raw file is re-parsed as toml::Value after TuiPrefs::load already fell back to defaults. The TUI starts with default UI preferences and surfaces this warning instead of silently dropping the configuration.

Solutions

  1. Fix the syntax error at the position given by the ({e}) message
  2. Validate with a TOML parser/linter before relaunching
  3. If unsure, regenerate the file from defaults and re-apply the preferences

Example fix

# before (tui.toml)
[scrollback
lines = 10_000
# after
[scrollback]
lines = 10000
Defensive patterns

Strategy: validation

Validate before calling

// Same guard for UI prefs: parse tui.toml before launch.
let raw = std::fs::read_to_string(tui_prefs_path)?;
toml::from_str::<toml::Value>(&raw)?;

Prevention

When it happens

Trigger: TOML syntax errors in tui.toml: unclosed strings or tables, duplicate keys, merge-conflict markers, or truncated writes.

Common situations: Manual edits with typos; git merge conflicts; a sync tool truncating the file while copying dotfiles between machines.

Related errors


AI-assisted analysis of Hmbown/CodeWhale@0c42157ee5 (2026-08-20). Data as JSON: /api/errors/011bbf01fd6b2657. Report an issue: GitHub.

Appendix: source

Thrown at crates/workflow-js/src/vm.rs:1098

        return Promise.resolve(typeof thunk === "function" ? thunk() : thunk).catch((err) => {
          if (isFatalTaskError(err)) throw err;
          hostLog("parallel(): dropped a failed slot as null: " + String((err && err.message) || err));
          return null;
        });
      } catch (err) {
        if (isFatalTaskError(err)) return Promise.reject(err);
        hostLog("parallel(): dropped a failed slot as null: " + String((err && err.message) || err));
        return null;
      }
    }));
  };

  globalThis.pipeline = (items, ...stages) => {
    if (!Array.isArray(items)) {
      throw new TypeError("pipeline(): expected an array of items");
    }
    if (items.length > MAX_ITEMS) {
      throw new Error("pipeline(): max " + MAX_ITEMS + " items per call");
    }
    return Promise.all(items.map(async (item, index) => {
      let value = item;
      for (const stage of stages) {
        try {
          value = await stage(value, item, index);
        } catch (err) {
          if (isFatalTaskError(err)) throw err;
          hostLog("pipeline(): dropped item " + index + " as null: " + String((err && err.message) || err));
          return null;
        }
      }
      return value;
    }));
  };

  globalThis.log = (message) => {
    hostLog(typeof message === "string" ? message : (JSON.stringify(message) ?? String(message)));

View on GitHub (pinned to 0c42157ee5)