Relationships
#3302 swamp model edit silently renames the target when the piped body's name differs
Opened by stack72 · 10/12/2026· Shipped 10/12/2026
Summary
swamp model edit <name> applies the whole piped body, including the
name field. When the body's name differs from the addressed model, the
model gets silently renamed. No warning, no diff, no confirmation.
Repro
- Create a model named
foo. - Author a definition file whose own top-level
name:isbar. - Run
swamp model edit foo < bar.yaml. swamp model get foonow resolves to nothing.swamp model get barresolves to the model that used to befoo, with all its prior state intact under the new name.
Impact
Hit this for real on 2026-10-12. A shared, 105-record @swamp/software-factory
instance named platform-team got renamed to platform-team-template by a
routine model edit platform-team < factories/platform-team-template.yaml
call, whose only intent was refreshing globalArguments. The piped file's
own name: field happened to differ.
Every bare-name call against platform-team then failed to resolve. A
downstream auto-create-on-missing fallback in our own extension code
created a fresh, empty model under the freed name. Several webhook nudges
then wrote real work onto that decoy: classify, plan, and two rounds of
plan-review. Nobody caught the mismatch until later.
Suggested fix
model edit should refuse, or require an explicit --allow-rename flag,
when the piped body's name differs from the model_id_or_name argument
that named the target. A rename is a deliberate, identity-affecting
operation. It should never happen as a side effect of a content patch.
Automoved by swampadmin from https://github.com/swamp-club/swamp/issues/3020
Shipped
Click a lifecycle step above to view its details.
system commented 10/12/2026, 4:54:08 PM
Classified automatically when this issue was filed.
- Type: Bug
If you feel this classification is incorrect, add a ripple to tell us so.
Sign in to post a ripple.