Skip to content

CLI topics verb lacks direct session topic streaming and relies on hand-rolled memory filters #103

Open

Description

@MoonCaves

Problem Description

In internal/cli/cmd_topics.go and internal/agentproto/topics.go, session topic listing was implemented with custom in-memory string splitting, regex filtering, and speculative multi-database fallback loops.

Issues Identified

  1. Fallback loops attempt to open alternate database scopes on every miss, causing unindexed disk I/O.
  2. Custom string-splitting logic for session IDs duplicates existing catalog lookup methods.

Upstream Prior Art Ignored

  • GitHub CLI (cli/cli pkg/cmd/issue/list/list.go L48-L95 @ 707514fdaea01d51886a99d2941bd8ad62d84234): Demonstrates clean entity scoping via standard CLI flags (--repo / --session) without ad-hoc string parsing or speculative multi-store fallback logic.

Proposed Remediation

  1. Stream topic segments in order directly from the store (TopicsForSession) using a single indexed query.
  2. Remove compound in-memory filtering loops.

Activity

  1. MoonCaves commented on Nov 17, 2026

    @MoonCaves
    OwnerAuthor

    Restoring the intended open status after the documentation merge in #167. Its description contained a closing keyword next to this issue reference inside a negated sentence; the issue closed seconds after that merge. The description now avoids that keyword form. The merged change records historical measurements only. Residual session-lookup miss fallback and the indexing policy question remain outside that change.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions