You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] Cross-type version contamination when querying ai_resource_version by name #14836
When querying version list for a prompt (or skill), if an agentspec with the same name exists, its versions are also returned in the result. This is because the internal listAll() method queries ai_resource_version table only by namespace_id and name, without filtering by the type column.
How to Reproduce
Create a prompt named "test-abc"
Create an agentspec also named "test-abc" with a different version
Open the prompt detail page for "test-abc"
The version list incorrectly shows the agentspec version as well
Root Cause
PromptOperationServiceImpl.loadAllVersionRows() and SkillOperationServiceImpl use AiResourceVersionPersistService.listAll() which generates SQL like:
SELECT*FROM ai_resource_version WHERE namespace_id = ? AND name = ?
Missing the AND type = ? condition, causing all resource types with the same name to be returned.
Expected behavior
Version queries should be isolated by type. Each resource type (prompt / skill / agentspec) should only see its own versions.
Activity