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
- Typed spelling is kept in
command/subcommand.swamp behavior run …recordscommand: "behavior",subcommand: "run"(or"behaviour"for the alias).swamp model method run …recordscommand: "model",subcommand: "method". OnlycommandPathis canonicalised. See the doc comment on the resolver insrc/cli/telemetry_invocation.ts: "command,subcommandand the command words inargskeep the spelling as typed, because swamp-club scores XP and quests oncommand/subcommandand an alias can score differently from its canonical name." This is pinned insrc/cli/telemetry_invocation_test.ts. - 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/runandbehaviour/runthe same asmodel/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|typeagainst theirmodelforms.
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.
Related, not a defect
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 runorswamp 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.
Shipped
Click a lifecycle step above to view its details.
Sign in to post a ripple.