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

Relationships

↔ sibling #3850↔ sibling #3848

#3853 Docs: --global-arg reference says values become strings; rule is strings unless :json, then schema coercion

Opened by reset · 10/23/2026· Shipped 10/23/2026

references/behavior/reference.md (line 156-161) shows --global-arg config.db.host=localhost --global-arg config.db.port=5432 producing { config: { db: { host: "localhost", port: "5432" } } } and says nothing else about typing. On swamp 20261020.024627.0-sha.26dc044f (macOS 27) a user creating an instance with --global-arg appId=480 against a z.number() field finds a YAML number in the definition and asks which rule applies.

In the source, parseKeyValueInputs (input_parser.ts, shared by behavior create --global-arg and behavior run --input) keeps every value a string unless the leaf key ends in :json, in which case the value is JSON.parsed; a leading @ reads a file. The create path then validates against the type's globalArguments schema, which is where a string reaches the declared type (inference from the create command's flow and from #315, closed as a duplicate of #316 which is no longer visible; the page's observation that appId=480 was written as a number is consistent with it).

Expected: the reference states the rule in one place: the value is a string, key:json=<json> passes a typed value ('tags:json=["a","b"]'), @path reads a file, and a string that the schema declares as a number or boolean is coerced at create so appId=480 is stored as 480. Actual: the only typing example in the reference shows a numeric-looking value stored as a string, and :json is documented for --input (line 446) but not for --global-arg.

Steps to reproduce:

  1. Read the "Dot notation creates nested objects" example in references/behavior/reference.md.
  2. swamp behavior create <type> x --global-arg port=5432 --json against a schema with port: z.number(); compare the stored models/<type>/x.yaml with the example.

Suggestion: add the three forms and the schema coercion sentence beside the dot-notation example, matching the --input paragraph.

02Bog Flow
✓OPEN✓TRIAGED✓IN PROGRESS✓SHIPPED+ 3 MOREISSUE_LINKED+ 5 MOREREVIEW+ 9 MOREPR_LINKED+ 2 MORESESSION_SUMMARIZED

Shipped

10/23/2026, 6:32:44 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack7210/23/2026, 5:34:32 PM
stack72 linked sibling of #385010/23/2026, 5:34:58 PM
stack72 linked sibling of #384810/23/2026, 5:35:02 PM
Editable. Press Enter to edit.

stack72 commented 10/23/2026, 6:32:53 PM

Thanks @reset for reporting this! We shipped: Docs-only fix to the bundled swamp skill for three linked reports: state the --global-arg typing rule (string, :json, @file, top-level schema coercion at create, nested leaves need :json) in behavior/reference.md (3853); replace the four-method-name pre-flight rule with the inferMethodKind rule in checks.md and the sibling pages that repeat it, including a wrong claim that sync skips checks (3850); mark fast-check deprecated and always awarded in quality/rubric.md and templates.md and drop deno doc --lint as a scored gate (3848).. The fix has been merged and a release is on its way. We appreciate your contribution to swamp.

Sign in to post a ripple.