Skip to content

fix(config): load global config when HOME is missing on Windows #631

Description

@JohnsonRan

Problem

On Windows, Node/Pi can run without HOME (or with HOME empty). Global config writers already use process.env.HOME || os.homedir(), but resolveConfig and migrateUserMemoryConfigFiles only inspect env.HOME. A saved ~/.pi/agent/hindsight.json or hindsight.jsonc configuration is therefore ignored, and its legacy User Bank keys are not migrated.

Expected behavior

Resolve and migrate global hindsight.json/hindsight.jsonc using an explicit nonempty HOME, otherwise node:os homedir(). Preserve project and environment override precedence and migration backups.

Scope and acceptance

  • Align the two config-loading/migration paths with the existing writer fallback.
  • Add isolated regression coverage for missing/empty HOME, explicit HOME, project/env overrides and migration backups.
  • Run targeted tests, npm run check, npm run check:coverage and npm run typecheck:tsc. Document live-smoke availability and request cross-platform CI for this Windows-sensitive fix.

Existing local fix is being prepared as a focused PR; no package or lockfile changes.

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions