Skip to content

WSL2 dev checkout: CLI uses installed daemon and version mismatch causes unreliable behavior #781

Description

@aquaherd

Summary

When running Hamster from a source checkout on WSL2, the CLI may connect to an already-running installed daemon (e.g. /usr/libexec/hamster/hamster-service) instead of the checkout context. This produces server/client version mismatch warnings and can lead to confusing or unreliable behavior during development.

Environment

  • WSL2
  • Session bus is valid (DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus)
  • Installed daemon processes were running from /usr/libexec/hamster/*

Reproduction

  1. Keep installed hamster daemons running.
  2. Run python3 src/hamster-cli.py list from a source checkout.
  3. Observe mismatch warning and checkout CLI talking to installed daemon.

Proposed fix

  • In dev mode (hamster.installed == False), detect daemon/client version mismatch and automatically use direct local DB access for CLI commands.
  • Keep an override (HAMSTER_CLI_FORCE_DBUS=1) for explicit D-Bus troubleshooting.
  • Preserve fallback for environments where session D-Bus is actually unavailable.

Attached branch

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions