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
- Keep installed hamster daemons running.
- Run
python3 src/hamster-cli.py list from a source checkout.
- 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
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
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus)/usr/libexec/hamster/*Reproduction
python3 src/hamster-cli.py listfrom a source checkout.Proposed fix
hamster.installed == False), detect daemon/client version mismatch and automatically use direct local DB access for CLI commands.HAMSTER_CLI_FORCE_DBUS=1) for explicit D-Bus troubleshooting.Attached branch
70c83824