You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Registry gap: wc not auto-rewritten despite rtk wc existing #1682
wc is a high-frequency read-only command (counting lines in logs, source files, output piping) and produces 100% replaceable output — rtk wc strips the path-padding noise that wastes tokens on every call.
Likely fix
Add the rewrite rule in src/discover/registry.rs alongside the existing ls/grep/find/tail entries. Should be EC=0 (auto-allow) per the precedent in #1232.
I checked current develop while looking for a small contribution. This appears to be fixed already: src/discover/rules.rs now has a ^wc(\s|$) rule mapping to rtk wc, and src/discover/registry.rs includes regression tests for classifying and rewriting wc -l src/main.rs and multi-file wc invocations.
Relevant tests I found in current develop:
test_classify_wc_supported
test_classify_wc_multi_file
test_rewrite_wc
test_rewrite_wc_multi_file
So this issue may be ready to close unless there is a remaining release-version concern.
This is fixed on develop: the rewrite registry now has a wc rule, and rtk rewrite "wc -l file.txt" returns rtk wc -l file.txt (auto-allow) instead of exiting 1. Multi-file invocations such as wc -lwc *.md are rewritten too, with regression tests covering both. Please reopen or comment if wc is still skipped on the latest version.
Activity
pszymkowiak commentedon May 27, 2026
🔍 Automated Triage
buglowSummary
Registry missing rewrite rule for
wcdespitertk wcexisting; add entry in registry.rs alongside other built-ins.📁 Relevant files
src/discover/registry.rsTriaged automatically by wshm · This is an automated analysis, not a human review.
bte808 commentedon Jun 5, 2026
I checked current
developwhile looking for a small contribution. This appears to be fixed already:src/discover/rules.rsnow has a^wc(\s|$)rule mapping tortk wc, andsrc/discover/registry.rsincludes regression tests for classifying and rewritingwc -l src/main.rsand multi-filewcinvocations.Relevant tests I found in current
develop:test_classify_wc_supportedtest_classify_wc_multi_filetest_rewrite_wctest_rewrite_wc_multi_fileSo this issue may be ready to close unless there is a remaining release-version concern.
KuSh commentedon Sep 5, 2026
This is fixed on develop: the rewrite registry now has a
wcrule, andrtk rewrite "wc -l file.txt"returnsrtk wc -l file.txt(auto-allow) instead of exiting 1. Multi-file invocations such aswc -lwc *.mdare rewritten too, with regression tests covering both. Please reopen or comment ifwcis still skipped on the latest version.