fix: keep per-user data out of the Velopack install root #94

Merged
KofTwentyTwo merged 1 commits from fix/GH-91-data-root-2 into main 2026-10-10 19:30:48 +00:00
KofTwentyTwo commented 2026-10-10 19:23:27 +00:00 (Migrated from github.com)

What

Running any Setup.exe over an existing install wiped accounts.json, accounts.json.bak, settings.json and logs\ on the maintainer's machine (#91): Velopack uninstalls the previous version first and deletes the whole install root, and gclo stored its data in that same folder, %LOCALAPPDATA%\gclo.

  • Default data root is now %LOCALAPPDATA%\KofTwentyTwo\gclo (GcloPaths.DefaultDataRoot); the CLI's and the activity log's default follow. GCLO_DATA_DIR still overrides it.
  • No migration, as agreed: single user, single machine, green fields. The default vault scope is still unscoped, so the existing gclo:account:<id> Credential Manager entries keep working once accounts are re-added.
  • README, docs/CLI.md, the two store doc comments and the threat model (asset table + revision row) say where the data lives and why.
  • Tests: default root is the new path and is never under the install root; same for the log directory.

Closes #91 (blocks #67). Part of #62.

How it was tested

  • dotnet build -warnaserror 0 warnings; dotnet format --verify-no-changes clean.
  • gclo.Engine.Tests 425/425, gclo.Cli.Tests 129/129; line coverage 100% on gclo.Engine and gclo.ViewModels.

🤖 Generated with Claude Code

## What Running any `Setup.exe` over an existing install wiped `accounts.json`, `accounts.json.bak`, `settings.json` and `logs\` on the maintainer's machine (#91): Velopack uninstalls the previous version first and deletes the whole install root, and gclo stored its data in that same folder, `%LOCALAPPDATA%\gclo`. - Default data root is now `%LOCALAPPDATA%\KofTwentyTwo\gclo` (`GcloPaths.DefaultDataRoot`); the CLI's and the activity log's default follow. `GCLO_DATA_DIR` still overrides it. - **No migration**, as agreed: single user, single machine, green fields. The default vault scope is still unscoped, so the existing `gclo:account:<id>` Credential Manager entries keep working once accounts are re-added. - README, `docs/CLI.md`, the two store doc comments and the threat model (asset table + revision row) say where the data lives and why. - Tests: default root is the new path and is never under the install root; same for the log directory. Closes #91 (blocks #67). Part of #62. ## How it was tested - `dotnet build -warnaserror` 0 warnings; `dotnet format --verify-no-changes` clean. - `gclo.Engine.Tests` 425/425, `gclo.Cli.Tests` 129/129; line coverage 100% on `gclo.Engine` and `gclo.ViewModels`. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.