Repository navigation
Commit 2330844
committed
fix(log-guard): make descendant matching case-sensitive via substr, not LIKE
Re-review found the LIKE form over-broad: SQLite LIKE is ASCII case-insensitive
by default, so 'hyper_util::%' also suppressed HYPER_UTIL::child. Rust target
paths are case-sensitive, and silently discarding a differently-cased target is
a wrong answer rather than a safe default.
substr(NEW.target, 1, N) = 'X::' is a plain case-sensitive comparison with no
wildcard metacharacters, which also removes the _/% hazard that LIKE needed an
ESCAPE clause to contain.
Documented the deliberate narrowing: upstream's raw prefix rule would also match
a sibling crate named hyper_utilities. Suppressing an unrelated crate's logs is
worse for a guard that silently discards rows, so this matches the
module-descendant relation instead; the existing regression pins hyper_utilities
as preserved, and HYPER_UTIL::child is now pinned alongside it.1 parent 017b9bc commit 2330844
2 files changed
Lines changed: 21 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
61 | 69 | | |
62 | 70 | | |
63 | 71 | | |
64 | 72 | | |
65 | 73 | | |
66 | | - | |
67 | | - | |
| 74 | + | |
| 75 | + | |
68 | 76 | | |
69 | 77 | | |
70 | 78 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
149 | 153 | | |
150 | 154 | | |
151 | 155 | | |
152 | 156 | | |
153 | 157 | | |
| 158 | + | |
154 | 159 | | |
155 | 160 | | |
156 | 161 | | |
| |||
0 commit comments