Expand description
User-level install state (VIS-1109): what this machine’s Visdom setup
was last brought to, so a newer CLI knows to run its upgrade step once
(commands::upgrade), and the user’s Claude Code telemetry opt-out, so
nothing ever turns telemetry back on after --no-claude-telemetry.
Kept in ~/.config/tracevault/install-state.json, beside config.toml:
config.toml is rewritten from its struct by init --global, and a repo’s
.visdom/ does not exist in workspace mode.
Structs§
- Install
State - Lock
- Serialises whoever changes the telemetry settings together with this
state: the upgrade step and
telemetry on|off/init. Without it, an upgrade that read the state before an opt-out could turn telemetry back on and save its stale copy over the opt-out. Also keeps two sessions starting at once from both showing the notice. A lock older thanLock::STALEwas left by a killed process and is taken over. Released on drop. - Repo
State
Constants§
- CURRENT_
VERSION - This binary’s version.
Functions§
- is_
newer - Whether
currentis newer than therecordedversion. Nothing recorded (or something unparseable) counts as older, so the step runs; a recorded version newer thancurrent(a downgrade) does not. - load_in
- The state under
config_root; a missing or unreadable file is an empty state (every step then runs once, which is safe: each one is idempotent). - save_in
- Write
stateatomically (temp file + rename), creatingconfig_root. - state_
path_ in - update_
in - Load, apply
change, save.