Skip to content

kindling CLI: daemon-backed commands ignore the --db routing hint #139

Closed

Description

@joshuaboys

Severity: medium · Confidence: medium · Triage: contract-mismatch
APS: KINTEG-012 (plans/modules/06-downstream-integration-surface.aps.md)
Source: clawpatch/codex review of main, 2026-06-26. Deferred from #127; best scoped with the read/query API (KINTEG-003).

Where

crates/kindling/src/lib.rs — build_client (~L188). Coverage gap in crates/kindling/tests/daemon.rs.

Problem

build_client is documented to honour --db as a socket-routing project hint, but the implementation accepts no DB argument and always constructs a default client. Daemon coverage only exercises --via-daemon log (no --db); the only --via-daemon + --db test is for import rejection. So daemon-backed commands given an explicit --db are silently routed by process cwd / the default client instead of the user-named database — potentially reading from or writing to a different project DB than the invocation names.

Recommendation

Thread the resolved common --db value into daemon-backed client construction and translate it into the daemon routing/project hint the API contract promises — or reject --via-daemon with --db for all affected commands with a clear error. Add a daemon test exercising --via-daemon <cmd> --db <path> that asserts routing to the named project (or a clean rejection).

Activity

  1. joshuaboys commented on Oct 19, 2026

    @joshuaboys
    ContributorAuthor

    Fixed by KINTEG-012 in #134 (31474e1, merged 2026-06-27): --via-daemon combined with --db is now rejected with an error naming both flags, for every daemon-backed verb, instead of silently routing by the working directory. Ships in v0.4.0 (release prep in progress). Closing as completed.


    Generated by Claude Code

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