Skip to content

πŸ› [BUG] namespace=None defaults to 'default' instead of 'all namespaces'Β #222

Closed

Description

@ajianaz

Description

4 tag operations use namespace.unwrap_or(DEFAULT_NAMESPACE) which treats None as "default namespace only":

  • tags_with_counts(None) β†’ only counts tags in "default" namespace
  • rename_tag("old", "new", None) β†’ only renames in "default" namespace
  • delete_tag("tag", None) β†’ only deletes from "default" namespace
  • count_by_tag("tag", None) β†’ only counts in "default" namespace

This is inconsistent with unique_tags(None) which correctly returns tags across ALL namespaces.

Affected Code

  • crates/uteke-core/src/memory/tags.rs lines 46, 78, 137, 188

Fix

Use conditional SQL construction (like unique_tags does) β€” separate queries for Some(ns) vs None.

Found by Cora v0.4.4 scan.

Activity

  1. added
    bug
    scope:core
    priority:high
    cora-scan
    on Jun 7, 2026
  2. ajianaz commented on Jun 7, 2026

    @ajianaz
    CollaboratorAuthor

    Fixed in v0.0.11 (PR #234)

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

    bugcora-scanpriority:highscope:core

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions