Add test for Windows colon sanitization in agent names #11
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR improves Windows compatibility by:
Background
Windows does not allow colons in file/directory names (except for drive letters like C:, D:). When agent names like "foundation:explorer" are used in session IDs that become directory paths, they must be sanitized.
The existing code already handles this correctly via regex → (line 76 in tracing.py), but we're adding a test to document this critical behavior.
Changes
Test Coverage (tests/test_tracing.py)
Documentation (context/IMPLEMENTATION_PHILOSOPHY.md)
Added comprehensive "Cross-Platform Development (Windows Compatibility)" section covering:
File I/O Encoding: Always specify encoding="utf-8" explicitly
Path Sanitization: Remove Windows-prohibited characters
Development Checklist: Pre-commit verification steps for cross-platform code
This guidance is automatically loaded by all agents via common-agent-base.md.
Issue Fixed
Prevents the error Windows users see when sub-sessions use agent names containing colons:
Related Work
Test Plan
🤖 Generated with Amplifier
Co-Authored-By: Amplifier 240397093+microsoft-amplifier@users.noreply.github.com