Skip to content

fix(windows): support Unicode repository paths - #1816

Open
z2250389 wants to merge 1 commit into
DeusData:mainfrom
z2250389:codex-z2250389/fix-windows-unicode-git-root
Open

fix(windows): support Unicode repository paths#1816
z2250389 wants to merge 1 commit into
DeusData:mainfrom
z2250389:codex-z2250389/fix-windows-unicode-git-root

Conversation

@z2250389

@z2250389 z2250389 commented Aug 24, 2026

Copy link
Copy Markdown

What does this PR do?

Fixes #1240.

Windows still passed UTF-8 repository paths to narrow CRT filesystem APIs at three boundaries:

  • Git root existence checks used stat(), so valid Unicode repositories reported root_exists=false.
  • The Graph UI browser used opendir() / readdir(), so Unicode folders were omitted or could not be opened.
  • Daemon session-context and background-index admission used stat(), so UI indexing failed even after navigation succeeded.

This replaces those calls with the existing UTF-8-aware filesystem helpers (cbm_is_dir, cbm_opendir, cbm_readdir, and cbm_closedir) and adds reproduce-first regression tests for Git discovery, UI browsing, MCP session context, and UI indexing.

Validation

  • ASan/UBSan targeted suites: daemon_application httpd git_context — 113 passed, 6 Windows platform skips
  • Security audit: passed
  • Graph UI production build: 738 modules built; 0 npm vulnerabilities
  • Windows UI smoke test: browsed C:/Users/〈Path to folder〉/道具箱/〈repo〉, indexed successfully, and detected branch main
  • Live graph result: 4,560 nodes / 23,863 edges

The full Windows cppcheck sweep was timeboxed after 35 minutes; it reported four pre-existing findings on untouched lines and no finding on the changed lines.

Checklist

  • Every commit is signed off (git commit -s) — required, CI rejects unsigned commits (DCO, see CONTRIBUTING.md)
  • Tests pass locally (make -f Makefile.cbm test) — targeted affected suites pass; the full Windows suite has existing platform failures
  • Lint passes (make -f Makefile.cbm lint-ci) — diff-scoped checks pass; full Windows cppcheck reports existing findings and exceeded the 35-minute local timebox
  • New behavior is covered by a test (reproduce-first for bug fixes)

Signed-off-by: Daichi Matsumoto <222130627+z2250389@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown

Thanks for opening this — it has been seen, and it is queued.

This note is automated, but it is not a brush-off: it exists so you know where your PR stands instead of having to guess from silence.

Current review status: working through a backlog. 0.9.1-rc.1 is out, so the release freeze that held reviews is over — but it left a large queue of open pull requests behind it, and we are reading through them oldest-first. The background is in discussion #1144.

What that means for this PR, concretely:

  • It will not be closed for inactivity. No stale bot touches pull requests here.
  • It may still sit a while before a human reads it. That is on us, not on you.
  • Older PRs are read first, so a recent one is not being skipped — it is behind a queue.

Things that will genuinely speed it up whenever review does happen:

  • Keep it rebased on main — the tree is moving quickly right now, and a conflicting branch cannot be reviewed as the diff you intended.
  • Get CI green, or say which failures you believe are pre-existing.
  • Keep the change to one claim. Bundled features and refactors get split before they get merged, which costs you a round trip.
  • Every commit needs a sign-off (git commit -s) — CI enforces DCO.

If this fixes a bug, a reproduction we can run is worth more than a description of the symptom.

Thanks for contributing, and sorry in advance for the wait.

@DeusData DeusData added bug Something isn't working windows Windows-specific issues ux/behavior Display bugs, docs, adoption UX priority/high Needs near-term maintainer attention; high-impact bug, regression, safety issue, or release blocker. labels Aug 24, 2026
@DeusData

Copy link
Copy Markdown
Owner

Thank you for the careful Windows work and the focused regression coverage. I checked this against current main: src/git/git_context.c still computes root_exists through narrow stat(), src/ui/http_server.c still uses opendir() and readdir(), and daemon root admission still uses stat() on canonical paths. That grounds the Unicode-path failure at the three boundaries described here.

I have labeled this as a high-priority Windows UX bug and routed it for focused review. Since the PR remains a draft, we will treat “ready for review” as the contributor handoff. The current CI matrix is green. Our review queue is full, so detailed review may take a little time, but this is now classified and visible. Thanks again for isolating the platform boundaries and covering them separately.

@z2250389
z2250389 marked this pull request as ready for review August 24, 2026 15:00
@z2250389
z2250389 requested a review from DeusData as a code owner August 24, 2026 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working priority/high Needs near-term maintainer attention; high-impact bug, regression, safety issue, or release blocker. ux/behavior Display bugs, docs, adoption UX windows Windows-specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows: Git discovery fails for valid repository at Unicode path

2 participants