Credentials tests created a fresh tempdir and immediately invoked encrypt/decrypt, but load_encryption_key reads <dir>/identity/node_key which did not exist, so every test failed with "node key not found". Add a test_dir_with_node_key() helper that writes a deterministic 32-byte key and switch all 8 call sites to it.