From 36fde6583bef6b455d2217d65eaaee2f66c08e81 Mon Sep 17 00:00:00 2001 From: Christophe Besson Date: Sat, 22 Aug 2026 11:32:46 +0200 Subject: fix: meshbay-node init creates the keystore, status never does MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - `init` now writes config AND creates the keystore (interactive password or unlock.key/env var). Idempotent: skips either step if already done. - `status` uses load_keystore instead of load_or_create_keystore — a read-only command should never silently create identity keys. - Stub getpass in test_cli_dispatch to prevent test hangs when no keystore exists. Co-Authored-By: Claude Opus 4.6 --- packages/meshbay-node/tests/test_cli_dispatch.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'packages/meshbay-node/tests') diff --git a/packages/meshbay-node/tests/test_cli_dispatch.py b/packages/meshbay-node/tests/test_cli_dispatch.py index 62dfe13..fdcd82e 100644 --- a/packages/meshbay-node/tests/test_cli_dispatch.py +++ b/packages/meshbay-node/tests/test_cli_dispatch.py @@ -74,6 +74,8 @@ def stub_daemon(monkeypatch, tmp_path): # No interactive prompt left to hang on. monkeypatch.setattr("builtins.input", lambda *a: "n") + import getpass + monkeypatch.setattr(getpass, "getpass", lambda *a, **kw: "test-password") # `reload` looks for a real daemon and signals it. Without this the test # SIGHUPs whatever node happens to be running on the machine — which it did, -- cgit v1.2.3