Skip to content

Skill publish slugs still collide globally despite publisher scoping #2363

@Patrick-Erichsen

Description

@Patrick-Erichsen

Problem

Skill publishing still treats slug as globally unique in the write path, even though the schema now has publisher-scoped ownership/indexing.

A user publishing baoyu-diagram under their own publisher can be blocked by an existing /other-owner/baoyu-diagram row with:

Slug is already taken. Choose a different slug.

Current behavior

In convex/skills.ts, insertVersion first resolves the incoming slug with the global skills.by_slug index:

ctx.db.query("skills").withIndex("by_slug", (q) => q.eq("slug", normalizedSlug)).unique()

If that row belongs to a different ownerPublisherId, the code enters the owner-migration path and throws slug-taken unless the caller has source authority plus migrateOwner: true.

Why this matters

Publisher-scoped URLs imply that these should be separate publish targets:

  • /alice/example-skill
  • /bob/example-skill

But today, the first publisher to claim example-skill can block everyone else from publishing the same slug under their own publisher. This also creates a squatting problem for copied skills.

Expected behavior

Publishing should look up existing skills by (ownerPublisherId, slug) for normal version creation. A same-slug row owned by another publisher should not block publishing unless the caller is explicitly trying to reclaim/migrate that existing row.

Code pointers

  • convex/schema.ts has by_owner_publisher_slug on skills.
  • convex/skills.ts still uses global by_slug during insertVersion.
  • The cross-publisher case currently falls into the migration guard and throws slug-taken.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.bugSomething isn't workingclawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:not-repro-on-mainClawSweeper found high-confidence evidence that this issue no longer reproduces on main.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.issue-rating: 🦪 silver shellfishThin issue quality; more reproduction proof or environment detail is needed.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    In progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions