Skip to main content
← Back to list
01Issue
BugShippedSwamp CLIPublic
Assigneeszack

Relationships

#3708 model.method in a workflow guard fails with 'Do not know how to serialize a BigInt' when its inputs hold an int

Opened by zack · 10/21/2026· Shipped 10/21/2026

Description

A workflow guard or assert that calls model.method with an integer in its inputs fails with:

InvalidExpressionError: Invalid expression: Do not know how to serialize a BigInt

cel-js evaluates CEL ints as JavaScript bigint. The inputs map reaches the model.method delegate in WorkflowExecutionService (src/domain/workflows/execution_service.ts, the method: delegate that builds a synthetic step via StepTask.model(modelName, methodName, inputs)) with bigints still in it. Somewhere downstream the synthetic step's inputs are JSON-serialized, which throws on a bigint. Nested values (ints in lists or maps) are affected too.

String and boolean inputs work. Doubles (2.5) work.

This is on main today (option off). The typed-secrets design (Phase 3.5, design/enablers/typed-secrets.md Section 4.5 item 3) also hands the delegate "a plain copy, ints as cel-js's bigints", so the typed path inherits the failure; integration/typed_local_behavior_test.ts only passes string inputs, so it does not catch it.

Related, but a different path: #830 (data query --select BigInt serialization).

Steps to reproduce

  1. swamp repo init --tool none
  2. Create a command/shell behavior sh1 with method execute and run: "echo hi".
  3. Create a workflow with a step whose guard is:
    guard: "${{ model.method('sh1', 'execute', {'n': 1}).command.contains('hi') }}"
  4. swamp workflow run <name>

Expected: the guard runs sh1.execute with input n = 1 and evaluates. Actual: the step fails with InvalidExpressionError: Invalid expression: Do not know how to serialize a BigInt.

The same guard with {'n': 'one'} works.

Environment

  • swamp built from main (also reproduced on branch issue-3628)
  • Linux, Deno 2.9.7
02Bog Flow
✓OPEN✓TRIAGED✓IN PROGRESS✓SHIPPED+ 1 MOREASSIGNED+ 5 MOREREVIEW+ 7 MOREPR_MERGED+ 2 MORESESSION_SUMMARIZED

Shipped

10/21/2026, 4:34:56 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
zack assigned zack10/21/2026, 2:34:38 PM

Sign in to post a ripple.