Skip to content

Fix Windows compatibility and Telegram streaming edge cases#147

Open
liuh886 wants to merge 6 commits into
PleasePrompto:mainfrom
liuh886:codex/upstream-fixes
Open

Fix Windows compatibility and Telegram streaming edge cases#147
liuh886 wants to merge 6 commits into
PleasePrompto:mainfrom
liuh886:codex/upstream-fixes

Conversation

@liuh886

@liuh886 liuh886 commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR collects small Windows/runtime compatibility fixes found while dogfooding on Windows:

  • provider tests now pin platform assumptions where command shape differs on Windows
  • MIME/file tag fallback behavior is deterministic on Windows
  • Windows PID liveness and NVM service paths are normalized
  • Matrix media tests patch the module-level DownloadError
  • Telegram streaming no longer duplicates already-sent content when an HTML split overflow happens
  • Dockerized Claude on Windows keeps stdin open so stdin-fed prompts reach the CLI

Most visible on

  • Windows developer/test machines
  • Windows service installs using NVM-managed Node paths
  • Telegram streaming replies that cross Telegram's message length limit
  • Dockerized Claude runs on Windows, where the prompt is intentionally sent via stdin

Fix

  • Stabilize platform-sensitive provider tests.
  • Add deterministic MIME/image fallbacks in file tag handling.
  • Improve PID liveness checks and service path normalization on Windows.
  • Adjust Telegram streaming overflow handling so unsealed raw/tool state is flushed before sealing and continuation.
  • Pass interactive=_IS_WINDOWS to Claude's Docker wrapper for both normal and streaming calls.

Behaviour

  • No behavior change on non-Windows Claude host runs.
  • Dockerized Claude receives the same prompt payload as host Claude on Windows; stdin is simply kept open through docker exec -i.
  • Telegram streaming still edits/splits normally; the change only prevents already-rendered content from being re-rendered into continuation messages after overflow.
  • MIME/path changes are deterministic fallbacks for platform differences.

Tests

  • pytest tests/cli/test_claude_provider.py tests/cli/test_codex_provider.py tests/cli/test_providers.py tests/cli/test_auth.py tests/messenger/telegram/test_sender.py tests/messenger/telegram/test_edit_streaming.py tests/files/test_tags.py tests/infra/test_pidlock.py tests/infra/test_service_linux.py tests/infra/test_service_macos.py tests/messenger/matrix/test_media.py -q -> 392 passed
  • ruff check ductor_bot/cli/claude_provider.py tests/cli/test_claude_provider.py tests/cli/test_providers.py

@liuh886 liuh886 changed the title Fix Windows compatibility issues in tests, files, and infra Fix Windows compatibility and Telegram streaming edge cases Jun 3, 2026
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