fix(cli): architecture rules select nothing on Windows — every path helper returns backslashes
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 68/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
Hướng nghiên cứu
Start in cli/tests/architecture/helpers.ts, especially sourceFiles() and the other helpers that return relative() paths; inspect how the 15 architecture test consumers use those paths. Run the architecture project on Windows, then verify that forward-slash matching works and that the 100 tests either pass or report genuine violations rather than selecting no files.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description
cli/tests/architecture/helpers.ts builds every path it hands to a rule with
relative(CLI_ROOT, full), which is platform-native. On Windows that yields
src\contexts\tools\..., while the rules themselves match on forward slashes —
startsWith("src/contexts/"), includes("/profiles/"), and similar.
Nothing throws. The rules simply select nothing, and 21 architecture tests fail on
Windows with messages that read like the repository drifted rather than like the
harness did: "the rule selects no file — its scope is stale", "no profile
directory found", "pattern matches nothing under src/".
The more serious half is not the noise, it is the silence on the other side: any
architecture rule a contributor adds is unverifiable on Windows, and a Windows
contributor cannot tell a real violation from a harness that selected zero files.
Affected file(s)
cli/tests/architecture/helpers.ts—sourceFiles(), and every helper returning a
relative()path- 15 of the 25 files under
cli/tests/architecture/, as consumers
Expected behaviour
The architecture project passes on Windows, or names a real violation when one exists.
Observed behaviour
On next at 126e88da, a pristine checkout, no local modification:
--project=architecture 21 failed | 79 passed (100)
The same commit is green in CI (cli CI: success), so this is platform-specific and
invisible to the pipeline.
Root cause, reproduced directly:
relative(CLI_ROOT, join(CLI_ROOT, "src", "contexts", "tools", "domain", "x.ts"))
// -> "src\contexts\tools\domain\x.ts"
// startsWith("src/contexts/tools") === false
// includes("/profiles/") === false
normalize is imported in the file but is not applied at this point.
Additional context
Found while implementing #862, and it is the same defect class: a path or shell
assumption that holds on Linux and macOS, breaks on Windows, and reports nothing.
#862 is one hook that never runs; this is 21 rules that never select. Both are
invisible to a Linux-only CI, which is what #707 exists to close.
Deliberately not fixed inside the #862 branch: normalising the separators would make
21 rules run on Windows for the first time, and some may then surface genuine
findings. That is a discovery task with an unbounded cost, and how this harness should
treat Windows is a maintainer decision.
| AI tool | Claude Code |
| aidd-cli version | 5.3.0 |
| OS | Windows 11 Pro (10.0.26100) |
| node | 24.12.0 |
I agree to follow this project's Code of Conduct.
- Ngôn ngữ chính
- TypeScript
- Star
- 481
- Fork
- 45
- Merge trung bình
- 17 giờ 40 phút
- Pull request đã merge (30 ngày)
- 106
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của ai-driven-dev/framework
-
refactor(aidd-orchestrator): the check zone says when to stop, and reviews its axes in one round Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
ai-driven-dev/framework#887 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
ai-driven-dev/framework#873 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
ai-driven-dev/framework#872 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
ai-driven-dev/framework#625 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
ai-driven-dev/framework#467 · 1 bình luận ·
Tất cả issue của ai-driven-dev/framework
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
[Bug]: Matrix progress drafts fail with "Matrix runtime not initialized" during tool activity Đang mởbug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Client support matrix inclusion Đang mởenhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
calcite-components needs triage refactor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Esri/calcite-design-system#15203 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
danielmiessler/LifeOS#2218 ·