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).
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 incrates/kindling/tests/daemon.rs.Problem
build_clientis documented to honour--dbas 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+--dbtest is for import rejection. So daemon-backed commands given an explicit--dbare 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
--dbvalue into daemon-backed client construction and translate it into the daemon routing/project hint the API contract promises — or reject--via-daemonwith--dbfor 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).