Skip to main content
← Back to list
01Issue
BugClosedSwamp Club
AssigneesNone

Data instance name uniqueness is global across specs instead of per-spec

Opened by swampadmin · 8/1/2025

Description

When a factory model writes resources to two different resource specs using the same instance name, swamp rejects the output with:

Data output validation failed: Duplicate data instance name 'bixu'

This occurs when one spec (e.g. summary) uses a label like a username as the instance name, and another spec (e.g. repo) uses repo names — and one of the repo names happens to match the username.

Steps to Reproduce

  1. Create an extension model with two resource specs (e.g. summary and repo)
  2. In a method, write to the summary spec with instance name bixu
  3. In the same method, write to the repo spec with instance name bixu (a repo that happens to share the name)
  4. The method fails with a duplicate instance name error

Expected Behavior

Instance names should be namespaced per resource spec. Writing summary/bixu and repo/bixu should not conflict — they are different specs with different schemas.

Actual Behavior

Instance names appear to be validated globally across all specs for a single method execution, causing a false collision.

Workaround

Prefix the instance name on one of the specs to avoid collision (e.g. summary-bixu instead of bixu for the summary spec).

Environment

  • swamp version: latest (2026-03-09)
  • OS: macOS Darwin 25.3.0

Summary

This affects the data output validation layer in the method execution pipeline. The fix would involve scoping the duplicate instance name check to be per-spec rather than global across all specs in a single method return. The dataHandles array likely needs to key uniqueness on (specName, instanceName) pairs rather than instanceName alone.

02Bog Flow
OPENTRIAGEDIN PROGRESSCLOSED

Closed

No activity in this phase yet.

03Sludge Pulse

Sign in to post a ripple.