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

Relationships

#3411 Telemetry records swamp behavior and swamp model invocations under different command names

Opened by zack · 10/13/2026· Shipped 10/14/2026

Summary

swamp behavior run and swamp model method run run the same code, but telemetry records them under different command / subcommand values. A comment in the code says swamp-club scores XP and quests on those fields, so a user who follows the preferred spelling may be scored differently from one who uses the legacy spelling. The swamp-club side was not checked; this needs confirming there.

Found in an audit of the two command groups (see also swamp-club#3409). This is the only place the audit found where the two spellings behave differently rather than just read differently.

What is recorded

  1. Typed spelling is kept in command / subcommand. swamp behavior run … records command: "behavior", subcommand: "run" (or "behaviour" for the alias). swamp model method run … records command: "model", subcommand: "method". Only commandPath is canonicalised. See the doc comment on the resolver in src/cli/telemetry_invocation.ts: "command, subcommand and the command words in args keep the spelling as typed, because swamp-club scores XP and quests on command/subcommand and an alias can score differently from its canonical name." This is pinned in src/cli/telemetry_invocation_test.ts.
  2. Synthetic entries are always model-spelled. Runs recorded for workflow steps and for serve-executed runs use command: "model", subcommand: "method", commandPath: ["model", "method", "run"], whichever spelling the user typed (src/libswamp/workflows/telemetry_bridge.ts, src/serve/telemetry.ts).

So one logical action, "run a method", can arrive as model/method, behavior/run or behaviour/run.

To confirm

  • Does swamp-club score behavior/run and behaviour/run the same as model/method, for XP and for quests that count model method runs?
  • The same question for the other twins: behavior create|get|edit|delete|validate|evaluate|search|cancel|describe|history|output|type against their model forms.

Possible fixes

  • Server side: treat the behavior spellings as equivalent when scoring.
  • Client side: send a canonical command name for scoring, keeping the typed spelling in a separate field if it is still wanted.

The OTEL span attribute swamp.args also differs: swamp model output get <id> records get, while swamp behavior output get <id> records <REDACTED>. A comment in src/cli/telemetry_integration.ts (behaviorArgSchemas) says this is deliberate, because behavior output <name> and behavior history <name> are shorthands that take a name first. It affects span attributes only, not recorded telemetry.

Acceptance

  • A method run is scored the same whether typed as swamp model method run, swamp behavior run or swamp behaviour run, and the same holds for the other twin commands.
  • The decision (server-side equivalence or client-side canonical name) is recorded where the telemetry contract is documented.
02Bog Flow
✓OPEN✓TRIAGED✓IN PROGRESS✓SHIPPEDTRIAGE+ 2 MOREREVIEW+ 10 MOREPR_MERGED+ 2 MORESESSION_SUMMARIZED

Shipped

10/14/2026, 12:44:21 AM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack7210/13/2026, 10:35:27 PM

Sign in to post a ripple.