test: add coverage for resolveStorePaths Windows absolute-path handling

Open Beginner friendly
#1,288 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
86/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript
Domain
testing

Research direction

Start in packages/opencode/src/altimate/native/connections/registry.ts at resolveStorePaths around line 128, then inspect packages/opencode/test/ for the existing test conventions. Make the function or a thin wrapper testable and add coverage for a C:\... global-config path, verifying it remains absolute; run the relevant test file and confirm it passes on a non-Windows OS.

Written by the indexing model from the issue text.

Description

Summary

#1238's Windows-path fix in packages/opencode/src/altimate/native/connections/registry.ts:128 (resolveStorePaths, using path.isAbsolute() || path.win32.isAbsolute()) is explicitly documented in its own commit message as "by-inspection only — no Windows CI." resolveStorePaths is currently unexported and has zero test references anywhere in packages/opencode/test/registry-env-loading.test.ts doesn't cover Windows paths either.

path.win32.isAbsolute() behavior is deterministic and fully testable on any OS (no Windows runner required) — this is a cheap gap to close.

Proposed fix

Export resolveStorePaths (or a thin testable wrapper) and add a unit test asserting a C:\...-style global-config path is left absolute rather than mangled by path.resolve, per the gap the #1238 commit already identified in its own message.

Provenance

Found during the v0.11.0 stable release's Tech Lead persona review.

Dominant language
TypeScript
Stars
813
Forks
134
Avg merge
2d 5h
Merged PRs (30d)
62

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from AltimateAI/altimate-code

All issues in AltimateAI/altimate-code

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.