Skip to content

fix: use current OpenCode paths on Windows - #74

Merged
iHildy merged 5 commits into
mainfrom
ian/fix-windows-xdg-paths
Aug 31, 2026
Merged

fix: use current OpenCode paths on Windows#74
iHildy merged 5 commits into
mainfrom
ian/fix-windows-xdg-paths

Conversation

@iHildy

@iHildy iHildy commented Aug 31, 2026

Copy link
Copy Markdown
Owner

Summary

  • use USERPROFILE as the Windows home and match current OpenCode XDG defaults:
    • config: ~/.config/opencode
    • data: ~/.local/share/opencode
    • state: ~/.local/state/opencode
  • preserve explicit XDG_CONFIG_HOME, XDG_DATA_HOME, and XDG_STATE_HOME overrides
  • use explicit path.win32 semantics whenever Windows is injected, including sync-plan and repository paths
  • add exact cross-host Windows regressions plus a real windows-latest path-test job without changing the existing Ubuntu check

This is a narrow replacement for the already-closed #68. It does not include that PR's package, repository, workflow-fork, portable-state, or frontier-selector changes.

Upstream evidence

  • current upstream OpenCode uses xdg-basedir for config, data, and state roots
  • local OpenCode 1.18.23 opencode debug paths reports .config/opencode, .local/share/opencode, and .local/state/opencode
  • the plugin does not model OpenCode cache, bin, or log roots, so this PR does not add them

Verification

  • focused path suite: 25 tests passed
  • bun run check
  • bun test: 107 tests passed, 233 assertions
  • bun run build
  • live windows-latest: 25 path tests and 60 assertions passed using Bun 1.3.2 against an authenticated source archive pinned to head 9acb43a8640382c1ff16c7d4f9acad75617b9349
  • existing Ubuntu Check and PR-title validation passed
  • full isolated GitHub E2E passed: machine A init and two pushes, machine B link and pull, source tree unchanged, and ephemeral repository deleted
  • synthetic merge with updated fix: resolve relative extra paths from config root #72: 115 tests passed and build passed
  • synthetic merge with repaired fix: portable paths in extra-manifest for cross-platform sync #58: 140 tests passed and build passed

The Windows job uses the exact-head GitHub source archive because Windows Git cannot materialize the repository's existing Unix-only .mise/tasks/lint:fix filename. The isolated harness emitted its known warnings: password-free loopback servers, duplicate sandbox skill discovery, and machine B's live AGENTS.md not refreshing even though its sync clone contained the second sentinel and confirmed repository replication.

Closes #59

@iHildy
iHildy merged commit 4c013dc into main Aug 31, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows paths is changed

1 participant