Skip to content

BUG: doc delete by slug fails - only works with document ID #550

Closed

Description

@ajianaz

Description

uteke doc delete <SLUG> fails with "Document not found" error even when the document exists and is accessible via uteke doc get <SLUG>. However, deleting by document ID works correctly.

This affects all documents regardless of nesting level (root, child, grandchild).

Environment

  • Uteke version: 0.6.4
  • OS: Linux 6.8.0-1054-oracle (Oracle Cloud ARM)
  • Reproducibility: Consistent

Steps to Reproduce

# Create a doc
uteke doc create --namespace coo --title "Test Doc" --content "content" "test-doc"
# ✓ Document 'test-doc' created

# Verify it exists
uteke doc get --namespace coo "test-doc"
# Returns: full document with title "Test Doc" ✅

# Try to delete by slug
uteke doc delete --namespace coo "test-doc"
# Error: Document not found: test-doc ❌

# Try to delete by ID (the ID from get output)
uteke doc delete --namespace coo "94e492f7-a561-4f88-96be-a02a752063f8"
# {"deleted": "94e492f7-a561-4f88-96be-a02a752063f8", "subtree_size": 0} ✅

Expected Behavior

uteke doc delete <SLUG> should delete the document, just like uteke doc get <SLUG> retrieves it. The argument should accept both slug and ID (consistent with other doc commands).

Actual Behavior

  • Delete by slug: Error: Document not found: <slug>
  • Delete by ID: Works correctly, including cascade to children

Impact

  • Users cannot delete documents using the slug they see in doc list
  • Must copy the UUID from doc get --json output and use that instead
  • Poor CLI UX — inconsistent with doc get and doc create which both use slugs

Suggested Fix

Resolve the slug to document ID before performing the delete, matching the behavior of doc get which accepts both slug and ID.

Activity

  1. added
    bug
    scope:cli
    on Jul 3, 2026
  2. added 2 commits that reference this issue on Jul 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugpriority:mediumscope:cli

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions