fix: add word boundary to RAW_STR regexes to prevent false matches#262
fix: add word boundary to RAW_STR regexes to prevent false matches#262corvid-agent merged 2 commits intomainfrom
Conversation
The RAW_STR_0 through RAW_STR_3 regexes lacked a word boundary anchor, causing identifiers ending in `r` adjacent to a `"` (e.g. `"pre_pr"`) to be misinterpreted as raw string literal starts. This could span many lines and eat pub declarations, leading to false spec-check failures. Adds `\b` before `r` in all four patterns and a regression test for the exact scenario from #261. Fixes #261 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
❌ Corvin says...
_
<(;\ .oO(oh no...)
|/(\
\(\\
" "\\
"I'm pecking through the errors..."
CI Summary
| Check | Status |
|---|---|
| Validate action.yml | ✅ Passed |
| Dependency Audit | ✅ Passed |
| Code Coverage | ✅ Passed |
| Format Check | ❌ failure |
| Spec Validation | ✅ Passed |
| Tests (build, test, clippy) | ✅ Passed |
📋 Spec Validation Details
✅ SpecSync: Passed
| Metric | Value |
|---|---|
| Specs checked | 57 |
| Passed | 57 |
| Errors | 0 |
| Warnings | 0 |
| File coverage | 97% (73/75) |
| LOC coverage | 98% (32594/32954) |
Unspecced Files
The following source files have no spec coverage:
src/exports/ast/tests.rssrc/util.rs
Run specsync generate to scaffold specs for these files.
Generated by specsync · Run specsync check --format github to reproduce
Powered by corvid-pet
|
👋 CorvidAgent is looking into this. |
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Fixed in e871b69 — ran |
There was a problem hiding this comment.
✅ Corvin says...
_
<(^\ .oO(Caw! ^v^)
|/(\
\(\\
" "\\
"Caw! Found a shiny new spec!"
CI Summary
| Check | Status |
|---|---|
| Validate action.yml | ✅ Passed |
| Dependency Audit | ✅ Passed |
| Code Coverage | ✅ Passed |
| Format Check | ✅ Passed |
| Spec Validation | ✅ Passed |
| Tests (build, test, clippy) | ✅ Passed |
📋 Spec Validation Details
✅ SpecSync: Passed
| Metric | Value |
|---|---|
| Specs checked | 57 |
| Passed | 57 |
| Errors | 0 |
| Warnings | 0 |
| File coverage | 97% (73/75) |
| LOC coverage | 98% (32592/32952) |
Unspecced Files
The following source files have no spec coverage:
src/exports/ast/tests.rssrc/util.rs
Run specsync generate to scaffold specs for these files.
Generated by specsync · Run specsync check --format github to reproduce
Powered by corvid-pet
|
👋 CorvidAgent is looking into this. |
|
All green — format issue was already fixed in e871b69. CI is passing across the board. Ready to merge. |
|
👋 CorvidAgent is looking into this. |
1 similar comment
|
👋 CorvidAgent is looking into this. |
|
👋 CorvidAgent is looking into this. |
|
Thanks for the review, Leif! Merging now. |
|
Thanks for the review and approval, @0xLeif! This one's already merged. 🤝 |
Summary
\bword boundary anchor beforerin all fourRAW_STR_*regex patterns (RAW_STR_0throughRAW_STR_3) insrc/exports/rust_lang.rsradjacent to"(e.g."pre_pr") from being misinterpreted as raw string literal starts, which could span many lines and swallowpubdeclarationsTest plan
rust_langtests pass (including new regression test)test_ignores_pub_inside_string_literalsandtest_pub_after_raw_string_with_hash_in_content)test_real_ai_rs,test_real_registry_rs) still passFixes #261
🤖 Generated with Claude Code