Skip to content
This repository was archived by the owner on Sep 4, 2026. It is now read-only.
This repository was archived by the owner on Sep 4, 2026. It is now read-only.

fix(storage): never fall back to launch-directory database #237

Description

@ElbertePlinio

Problem

src-tauri/src/lib.rs falls back to relative pickforge.db when pickforge_home(None) fails. A release-binary smoke launched from an environment without a usable home directory created pickforge.db, pickforge.db-shm, and pickforge.db-wal in the release worktree root.

Normal installed/isolated launches with HOME set still resolve to ~/.pickforge/pickforge.db, so this is not the current v0.1.10 release gate. The fallback still violates the workspace storage rule: a process launch directory must never silently become its data directory.

Acceptance

  • Remove the relative launch-directory fallback
  • Resolve to a documented safe user-data location or fail with an actionable startup error
  • Preserve explicit automation/config overrides
  • Add path-resolution coverage for missing/unusable home state
  • Smoke normal startup and prove the source tree stays clean

Evidence

  • Source: src-tauri/src/lib.rs:37-40
  • Reproduction: release binary launched with no usable home context created the three SQLite files in the worktree root
  • Files were removed after capture; no user data was involved

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions