Skip to content

CLI contribution commands read local SQLite only — blind to Nexus session data #473

@windoliver

Description

@windoliver

Problem

Most contribution CLI commands open local SQLite stores via createSqliteStores() and never consult Nexus. When a grove is Nexus-managed, session contributions live in the Nexus VFS (session-scoped paths), so these commands operate on an empty/stale local DB:

  • reproduce, discuss, review, goal (writes go to local SQLite, not Nexus)
  • log, frontier, tree, search, thread, threads (read empty local DB)

Observed during #211 E2E: after a live review-loop session, grove log / grove frontier returned count: 0 while the session had 3 contributions in Nexus.

This is the CLI side of the documented data-path split (server/MCP already resolve Nexus stores when GROVE_NEXUS_URL is set; the CLI does not).

Already done (#211)

grove eval is now Nexus-aware. A reusable resolver was added:

  • src/cli/utils/nexus-stores.ts
    • resolveNexusParams(groveDir, groveRoot) → URL + API key + namespace from env / nexus.yaml / .state.json / namespace file, or undefined for local-only.
    • openNexusStores(params)NexusContributionStore / NexusClaimStore / NexusCas (mirrors src/mcp/serve.ts), auto-scoping to the latest session when GROVE_SESSION_ID is unset.

handleEval prefers Nexus stores when available, falls back to local SQLite. See pattern in src/cli/commands/eval.ts.

Proposed

Adopt the same resolver across the contribution CLI commands (likely via a shared initCliDeps / context path so query commands get it for free), so the CLI reflects live Nexus session state.

Notes / edge

  • Running from inside a git worktree subdir (e.g. an agent workspace under .grove/workspaces/) can resolve a different/empty scope than the grove root; commands are expected to run from the grove root or with GROVE_SESSION_ID set.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions