-
由 Will Chen 提交于
## Summary - Add Python script to sanitize GitHub issue markdown (removes HTML comments, zero-width characters, excessive whitespace, details/summary tags) - Add unit tests with 5 golden input/output pairs plus additional inline tests - Update fix-issue.md to use sanitizer and proceed directly with implementation for straightforward plans (no remote session question) - Add goldens directory to format ignore to preserve test data ## Test plan - Run `python3 .claude/commands/dyad/scripts/test_sanitize_issue_markdown.py` to verify all 13 unit tests pass - Test the sanitizer directly: `echo "<!-- comment -->" | python3 .claude/commands/dyad/scripts/sanitize_issue_markdown.py` #skip-bugbot
🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- devin-review-badge-begin --> --- <a href="https://app.devin.ai/review/dyad-sh/dyad/pull/2337"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://static.devin.ai/assets/gh-open-in-devin-review-dark.svg?v=1"> <img src="https://static.devin.ai/assets/gh-open-in-devin-review-light.svg?v=1" alt="Open with Devin"> </picture> </a> <!-- devin-review-badge-end --> <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Adds a Python markdown sanitizer and integrates it into the fix-issue flow to clean GitHub issue content and enable direct local implementation for straightforward plans. - **New Features** - Added sanitizer script that removes HTML comments, invisible characters, excessive blank lines, and strips details/summary tags while keeping content; normalizes line endings and whitespace. - Updated fix-issue.md to run the sanitizer and let simple plans proceed directly to local implementation without the remote session prompt. - Included golden files and unit tests (13) to validate sanitizer behavior. - Added the goldens directory to formatter and Prettier ignore lists to preserve test fixtures. - **Bug Fixes** - Fixed shell injection risk in fix-issue.md by using printf in the sanitizer step. <sup>Written for commit 226f9436ba6f338efd6fb798aa327334459647aa. Summary will update on new commits.</sup> <!-- End of auto-generated description by cubic. --> --------- Co-authored-by:Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by:
claude[bot] <41898282+claude[bot]@users.noreply.github.com>