Commit c51d7a6
committed
review(lifecycle): drop double-truncation of persisted hook output
stdoutBuf and stderrBuf are each lifecycleCappedBuffer-backed and
already append "\n...<truncated>" when they hit
lifecycleMaxOutputBytes, so the combined string is already bounded.
The outer truncateLifecycleOutputInternal call sliced at a fixed
byte boundary, which could land mid-UTF-8 codepoint and corrupt the
persisted output. Drop the call (and the now-unused helper + its
test); rely on the buffers.
The combined ceiling is now ~2× lifecycleMaxOutputBytes (stdout +
separator + stderr) which is fine — pre_deploy_last_run_output is
TEXT in both Postgres and SQLite.
Greptile review on getarcaneapp#2782.1 parent ca9dd56 commit c51d7a6
2 files changed
Lines changed: 5 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
176 | | - | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
177 | 181 | | |
178 | 182 | | |
179 | 183 | | |
| |||
673 | 677 | | |
674 | 678 | | |
675 | 679 | | |
676 | | - | |
677 | | - | |
678 | | - | |
679 | | - | |
680 | | - | |
681 | | - | |
682 | | - | |
683 | 680 | | |
684 | 681 | | |
685 | 682 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | 8 | | |
10 | 9 | | |
11 | 10 | | |
| |||
218 | 217 | | |
219 | 218 | | |
220 | 219 | | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | 220 | | |
232 | 221 | | |
233 | 222 | | |
| |||
0 commit comments