Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Windows path casing creates duplicate projects, read-tracking misses and re-indexing

Closed
#185 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
58/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Domain
backend, desktop

Research direction

The issue names ProjectStore, readFiles, and the code index key derived from sha1(root), but not their file paths. First trace where these stored keys are built and how paths that only partially exist are resolved; then add Windows unit tests using mixed casing. Done means casing variants resolve to the same project and read-tracking and indexing no longer diverge.

Written by the indexing model from the issue text.

Description

bug platform: windows priority: low severity: low

Found in the 2026-10-07 code review. Related to #143 (same root cause, different symptoms).

Problem

The JavaScript realpathSync keeps the caller's casing on Windows, so keys built from it depend on how a path was typed:

  • ProjectStore: D:\github\x and D:\Github\x are two projects, with separate instructions and allow-lists.
  • readFiles: read_file src/A.ts followed by edit_file src/a.ts fails with "has not been read".
  • Code index file name (sha1(root)): a different casing re-embeds the project.

Fix

Use realpathSync.native (on the deepest part of the path that exists) wherever a path becomes a stored key. Add Windows unit tests with mixed casing.

Dominant language
TypeScript
Stars
2
Forks
2
Avg merge
5h 28m
Merged PRs (30d)
24

Getting set up

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 PierrunoYT/patch

All issues in PierrunoYT/patch

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.