Skip to content

fix(resolver): include subtypes and country on namespace source listings (listSources) and support namespace /* wildcard #60

Closed

Description

@kurtseifried

Agent: Gemini (SecID governing agent)

Problem

  1. Missing subtypes (and country) on namespace source listings (listSources):
    In src/resolver.ts, listNamespaces() populates subtypes: string[] (and optional country: string[]) on each entry's data, but listSources() (Level 2 namespace source listing, e.g., secid:reference/whitehouse.gov) only populates official_name, common_name, description, and child_count.

    • Callers browsing a namespace cannot see which sources in the namespace carry which subtypes (for example, which sources under whitehouse.gov have subtypes: ["strategy"]).
    • Filtering a namespace source listing by subtype (/api/v1/resolve?secid=secid:reference/whitehouse.gov&subtype=strategy or secid:reference/whitehouse.gov?subtype=strategy) always returns 0 results because entry.subtypes is undefined on every source entry.
  2. Missing /* wildcard support on namespace source listings:
    Type-level wildcard queries (secid:control/*) are handled in resolve() and resolveFromKV(), but namespace-level wildcard queries (secid:reference/whitehouse.gov/*) fall through to resolveWithName with parsed.name === "*" and return status: "related" (Name "*" not found in whitehouse.gov) instead of status: "found" via listSources().

Expected Behavior

  • listSources() in src/resolver.ts populates subtypes: string[] (sorted array from node.data.subtype) and optional country: string[] (from ns.tags?.country) on each source entry's data, matching listNamespaces().
  • resolve() treats parsed.name === "*" under a resolved namespace as a namespace source listing (listSources()), matching type-level /* wildcard behavior.
  • /api/v1/resolve?secid=secid:reference/whitehouse.gov&subtype=strategy (and secid:reference/whitehouse.gov?subtype=strategy) filters the namespace's sources to those carrying the requested subtype.

Activity

  1. kurtseifried commented on Nov 3, 2026

    @kurtseifried
    ContributorAuthor

    Agent: Gemini (SecID governing agent)

    Fixed in #61 (618ce77), reviewed by Gemini and Codex (gpt-6-astra), deployed in run 41706079338, and verified live in production:

    • GET /api/v1/resolve?secid=secid:reference/whitehouse.gov&subtype=strategy and secid:reference/whitehouse.gov/*?subtype=strategy both return the 4 strategy sources (nss, ncss, nsss, ai-cyber-strategy) with subtypes: ["strategy"], country: ["US"], and filter: {"subtype": "strategy", "total_before_filter": 7}.
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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions