Commit 1fced7a
committed
fix(agent): clarify at-most-once emit semantics and harden rtk binary extraction
Rename rtkSavingsEmitted -> rtkSavingsAttempted (the flag is set before the
await, so a failed attempt still prevents retries; the name now says so).
Move emitRtkSavings after updateTaskRun on the error path so the "failed"
status lands before the up-to-5s rtk gain probe. Extract the cached rtk binary
atomically via a temp dir + rename so a killed build cannot leave a partial
binary that existsSync accepts on subsequent runs. Add explicit maxBuffer to
the execFileAsync call to make the 10 MB cap intentional. Add readability
comments to the double-cleanup test.
Generated-By: PostHog Code
Task-Id: b86391cc-4634-4a2b-ae34-fe1f9c0626a01 parent 4e5352d commit 1fced7a
4 files changed
Lines changed: 35 additions & 14 deletions
File tree
- packages/agent
- build
- src/server
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
| 11 | + | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
| 15 | + | |
13 | 16 | | |
14 | 17 | | |
15 | 18 | | |
| |||
183 | 186 | | |
184 | 187 | | |
185 | 188 | | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
192 | 204 | | |
193 | 205 | | |
194 | 206 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
517 | 517 | | |
518 | 518 | | |
519 | 519 | | |
| 520 | + | |
| 521 | + | |
520 | 522 | | |
521 | 523 | | |
522 | 524 | | |
| 525 | + | |
| 526 | + | |
523 | 527 | | |
524 | 528 | | |
525 | 529 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
305 | 305 | | |
306 | 306 | | |
307 | 307 | | |
308 | | - | |
| 308 | + | |
309 | 309 | | |
310 | 310 | | |
311 | 311 | | |
| |||
2840 | 2840 | | |
2841 | 2841 | | |
2842 | 2842 | | |
2843 | | - | |
2844 | | - | |
2845 | | - | |
2846 | | - | |
2847 | | - | |
2848 | 2843 | | |
2849 | 2844 | | |
2850 | 2845 | | |
| |||
2854 | 2849 | | |
2855 | 2850 | | |
2856 | 2851 | | |
| 2852 | + | |
| 2853 | + | |
| 2854 | + | |
| 2855 | + | |
| 2856 | + | |
2857 | 2857 | | |
2858 | 2858 | | |
2859 | 2859 | | |
| |||
3390 | 3390 | | |
3391 | 3391 | | |
3392 | 3392 | | |
3393 | | - | |
3394 | | - | |
| 3393 | + | |
| 3394 | + | |
| 3395 | + | |
| 3396 | + | |
3395 | 3397 | | |
3396 | 3398 | | |
3397 | 3399 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
55 | 58 | | |
56 | 59 | | |
57 | 60 | | |
| |||
0 commit comments