Skip to content

crossplat: Windows/Mac compat fix + CI matrix#2

Open
Lingnik wants to merge 3 commits intomainfrom
crossplat
Open

crossplat: Windows/Mac compat fix + CI matrix#2
Lingnik wants to merge 3 commits intomainfrom
crossplat

Conversation

@Lingnik
Copy link
Copy Markdown
Owner

@Lingnik Lingnik commented Apr 8, 2026

Summary

  • Fix format_workspace so the new WORKSPACE column works on Windows (PurePosixPath doesn't treat \ as a separator). String normalization handles both \ and / regardless of host OS, plus trailing separators, empty, and None.
  • Add 8 unit tests in tests/test_formatters.py::TestFormatWorkspace.
  • Add .github/workflows/ci.yml matrix: ubuntu/macos/windows x py3.10/3.13, fail-fast: false. Runs just install && just check.
  • Add .gitattributes enforcing LF line endings across the repo (protects test fixtures and new contributions from CRLF drift on Windows).
  • Mechanical follow-up commit renormalizes existing CRLF files in the repo to LF. Empty under git diff --ignore-cr-at-eol.

Why

After #1, the WORKSPACE column defaulted on for cchat list but returned the full path string on Windows instead of the basename. Fixing that exposed a broader need: we want cchat to stay healthy on both Windows and macOS as it evolves, so CI is the enforcement mechanism going forward.

Test plan

  • just check passes locally on Windows (pytest 412 passed; ruff clean; ty shows 3 pre-existing unresolved-import warnings for optional fastapi/uvicorn deps, unchanged by this PR)
  • CI matrix green on ubuntu-latest / macos-latest / windows-latest for py3.10 and py3.13
  • Manual smoke test on macOS: just install && just check && cchat list renders WORKSPACE column correctly

Lingnik and others added 3 commits April 7, 2026 17:13
- format_workspace now handles both Windows (\) and POSIX (/) paths
  regardless of host OS, via string normalization instead of PurePosixPath
- Add 8 unit tests covering Windows, POSIX, trailing separators, empty,
  None, relative, and single-name inputs
- Add GitHub Actions matrix: ubuntu/macos/windows x py3.10/3.13
- Add .gitattributes enforcing LF line endings across the repo

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Mechanical CRLF->LF conversion on files that were committed with CRLF
under Windows' core.autocrlf. No content changes; diff is empty under
`git diff --ignore-cr-at-eol`.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Python 3.10's datetime.fromisoformat rejects ISO strings with a
trailing "Z" (that was added in 3.11). cchat JSONL timestamps from
Claude Code often include the "Z" suffix, so on 3.10 format_timestamp
was silently returning em-dash for those values, which broke
test_sort_newest_oldest and degraded `cchat list` output.

Normalize "Z" to "+00:00" before parsing. Add a regression test.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

1 participant