Commit 2099c17
committed
fix(review): address 4 issues from independent code review
Issue 1 (post-edit-guard suppressor bypass): vg_filter_suppressed now
tracks backtick template-literal depth and triple-double-quote string
depth across lines. A disable comment inside a multiline string/template
literal is ignored, closing the suppressor-bypass vector.
Issue 2 (learn-evaluator tail-1000 truncation): removed the tail -1000
cap on the vg-helper path. The 30-minute cutoff is already enforced
inside vg-helper session-metrics; the cap caused under-counting on busy
sessions that produce >1000 log events per 30-minute window.
Issue 3 (session_metrics.rs missing fields): Rust implementation now
writes top_edited_files, avg_duration_ms, and slow_ops to match the
Python reference (hooks/_lib/session_metrics.py:196-198). Downstream
consumers (gc-scheduled.sh:369) no longer silently drop hot-file data.
Issue 4 (CI over-broad token): removed workflow-level contents:write /
pull-requests:write. Shell-heavy validate-and-test job now runs with
contents:read only. Benchmark reporting is isolated to a new
benchmark-report job that declares the write permissions it needs and
receives bench-output.json via upload-artifact/download-artifact rather
than inheriting a write token from the broad workflow scope.
Constraint: GitHub Actions does not support per-step permission scopes,
so job-level isolation via a separate job is the minimum granularity.
Tested: cargo check clean; 88/88 hook regression tests pass.1 parent bb362fe commit 2099c17
File tree
4 files changed
+75
-12
lines changed- .github/workflows
- hooks
- vg-helper/src
4 files changed
+75
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
| 10 | + | |
12 | 11 | | |
13 | 12 | | |
14 | 13 | | |
| |||
158 | 157 | | |
159 | 158 | | |
160 | 159 | | |
161 | | - | |
| 160 | + | |
162 | 161 | | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
163 | 192 | | |
164 | 193 | | |
165 | 194 | | |
| |||
171 | 200 | | |
172 | 201 | | |
173 | 202 | | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
33 | 35 | | |
34 | 36 | | |
35 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
46 | 58 | | |
47 | | - | |
| 59 | + | |
| 60 | + | |
48 | 61 | | |
49 | 62 | | |
50 | 63 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| 103 | + | |
103 | 104 | | |
104 | 105 | | |
105 | 106 | | |
| |||
116 | 117 | | |
117 | 118 | | |
118 | 119 | | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
119 | 124 | | |
120 | 125 | | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
121 | 133 | | |
122 | 134 | | |
123 | 135 | | |
| |||
248 | 260 | | |
249 | 261 | | |
250 | 262 | | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
251 | 272 | | |
252 | 273 | | |
253 | 274 | | |
| |||
256 | 277 | | |
257 | 278 | | |
258 | 279 | | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
259 | 283 | | |
260 | 284 | | |
261 | 285 | | |
| |||
0 commit comments