Replace base32-looking runs of >= 32 chars with ` ` (mirrors the CB-13D harness normalization: per-repository change identities are not state shapes).
(text: &str)
| 509 | /// CB-13D harness normalization: per-repository change identities are not |
| 510 | /// state shapes). |
| 511 | fn normalize_base32(text: &str) -> String { |
| 512 | let mut normalized = String::with_capacity(text.len()); |
| 513 | let mut run = String::new(); |
| 514 | for character in text.chars() { |
| 515 | let matches = character.is_ascii_uppercase() || ('2'..='7').contains(&character); |
| 516 | if matches { |
| 517 | run.push(character); |
| 518 | } else { |
| 519 | if run.len() >= 32 { |
| 520 | normalized.push_str("<state>"); |
| 521 | } else { |
| 522 | normalized.push_str(&run); |
| 523 | } |
| 524 | run.clear(); |
| 525 | normalized.push(character); |
| 526 | } |
| 527 | } |
| 528 | if run.len() >= 32 { |
| 529 | normalized.push_str("<state>"); |
| 530 | } else { |
| 531 | normalized.push_str(&run); |
| 532 | } |
| 533 | normalized |
| 534 | } |
| 535 | |
| 536 | /// AC-3 measurement: watcher-off equivalence through the real CLI. |
| 537 | /// |