FOLLOWUP

lib/galaxy/managers/tool_source.py:31 dedupes solely by source hash and source class, but the row also carries tool_id, tool_version, and dynamic_tool_id. The dedupe migration does the same at lib/galaxy/model/migrations/alembic/ versions_gxy/29fe58dda936_add_tool_source_hash_source_class_uq.py:39. If two dynamic/user tools have identical source text but distinct dynamic tool rows, the second request can reuse the first row and later queue with the wrong dynamic_tool. Either include identity in the uniqueness rule, or split immutable source content from per-execution tool identity.