Skip to main content
← Back to list
01Issue
BugShippedSwamp CLI
Assigneesstack72

Relationships

#454 Workflow-scope report execution fails with `rawType.trim is not a function`

Opened by bixu · 5/26/2026· Shipped 5/26/2026

Summary

Workflow-scope reports fail with rawType.trim is not a function. The error message is persisted as the rendered report content; both markdown and json outputs contain only this single-line error. No stack trace is surfaced via swamp report get or in the workflow-run YAML.

Environment

  • swamp 20260526.145459.0-sha.335f9a2d (also reproduces on 20260525.222440.0-sha.6b09eef7)
  • macOS 25.4 (darwin), zsh.

Reproduction

  1. Run any workflow that triggers a workflow-scope report execution, where at least one step in the workflow failed (and other steps succeeded).
  2. swamp workflow run <name> --json returns {"name": "<report-name>", "scope": "workflow", "success": false, "error": "rawType.trim is not a function"}.
  3. swamp report get <report-name> --workflow <name> --json returns a persisted report whose markdown begins # Report Error: ... and whose json.message is rawType.trim is not a function.

The same report extension code produced a successful report on a swamp build from ~one week earlier (last known-good build observed: 2026-05-18).

Diagnosis attempted

  • Source: src/domain/models/model_type.ts:41 (static create(rawType: string) — the only .trim() invocation against a parameter named rawType in the framework).
  • Searched the full source for all ModelType.create(...) callsites — every call is either guarded by typeof === "string" or wrapped in try/catch, so the leaking callsite is not obvious from static analysis.
  • Workflow-scope report bundles for the affected report have no rawType.trim reference, so the throw appears framework-side, not extension-side.
  • The bug only manifests at report-execution time; the report extension execute() body cannot be reached without throwing.

Asks

  1. Is there a known regression in workflow-scope report execution between 20260518 and 20260526?
  2. Could the framework surface the underlying TypeError stack via the captured report error (rather than only the .message)? That would make this class of bug trivially diagnosable.
02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED+ 1 MOREASSIGNED+ 2 MOREREVIEW+ 3 MOREPR_MERGED+ 1 MORECONTRIBUTOR_NOTIFIED

Shipped

5/26/2026, 7:50:04 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack725/26/2026, 6:37:40 PM
Editable. Press Enter to edit.

stack72 commented 5/26/2026, 7:50:11 PM

Thanks @bixu for reporting this! The fix has been merged and a release is on its way. We appreciate your contribution to swamp.

Sign in to post a ripple.