Skip to content

cli: codedb_changes has no CLI command — 'codedb changes' parses as a root directory #578

@justrach

Description

@justrach

Problem

codedb changes prints the usage screen: an unknown first token parses as the ROOT in the [root] <command> grammar, so the command is empty. codedb_changes exists only as an MCP tool — the CLI bridge (runCliTool) can't serve it because it doesn't receive store (handleChanges reads the Store ledger, not the Explorer). From the 2026-06-10 re-audit error-UX sweep.

Failing Test

A test in src/test_mcp.zig (named after this issue once assigned): runCliTool(..., "changes", ...) currently returns null (unknown command); it must return a code with seq: output. Fails red on release/0.2.5825.

Fix

  • Thread store: *Store through runCliTool (call sites: main.zig runQuery fallthrough, tests)
  • Add the changes [since_seq] branch calling handleChanges
  • Register changes in cliIsQueryCmd and parsePositional's known-commands list so the grammar parses it as a command

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions