rtk-ai/rtk

bug(telemetry): salt file not auto-created on macOS — device hash shows '(no salt file)'

Open

#1656 aperta il 1 mag 2026

Vedi su GitHub
 (4 commenti) (0 reazioni) (0 assegnatari)Rust (2914 fork)batch import
area:clibugeffort-smallgood first issueplatform:macospriority:medium

Metriche repository

Star
 (48.085 star)
Metriche merge PR
 (Merge medio 11g 1h) (45 PR mergiate in 30 g)

Descrizione

Description

On macOS, rtk telemetry status shows device hash: (no salt file) even after running commands that should trigger generate_device_hash() (e.g. rtk gain).

Root cause

The salt_file_path() function uses dirs::data_local_dir(), which on macOS resolves to ~/Library/Application Support/not ~/.local/share/ (Linux convention). However, the auto-creation logic in get_or_create_salt() silently fails, leaving no salt file and no error message.

The telemetry status command reads the salt file path correctly (from ~/Library/Application Support/rtk/.device_salt), but since the file was never created, it falls back to (no salt file).

Steps to reproduce

  1. Fresh install via brew install rtk on macOS
  2. Run rtk gain or any command
  3. Run rtk telemetry status
  4. Observe: device hash: (no salt file)
  5. Check ~/.local/share/rtk/ — directory doesn't exist
  6. Check ~/Library/Application Support/rtk/.device_salt not present

Workaround

cp <some-salt> ~/Library/Application\ Support/rtk/.device_salt

After placing the file in the correct macOS path, rtk telemetry status shows the device hash correctly.

Expected behavior

The salt file should be auto-created at ~/Library/Application Support/rtk/.device_salt on first use on macOS.

Environment

  • OS: macOS (Darwin 25.4.0)
  • RTK version: 0.38.0
  • Installed via: Homebrew

Guida contributor