Commit ae17e14
committed
fix(retention): dedupe contributor-decision-pack to latest-only, not a preserved series
contributor-decision-pack was excluded from LATEST_ONLY_SIGNAL_SNAPSHOT_TYPES on the
theory that it's a bounded trend/change series read by history, with volume "a fraction
of" its three contributor-* neighbors that already dedupe. Both claims were wrong:
- src/services/decision-pack.ts's only reader calls listSignalSnapshots(...)[0] -- the
exact same latest-only contract as contributor-evidence-graph/outcome-history/strategy,
which already dedupe correctly.
- Measured against a live export of the hosted D1: 18,549 rows, 6.3 GB, ~350 KB/row --
71% of the database's entire 8.96 GB file size, and roughly 750x the combined size of
the three types it was assumed to dwarf.
Every row is still inside the 90-day RETENTION_POLICY age window (the database itself is
only ~65 days old), so age-based pruning had not removed a single one, and the type has
accumulated ~700-1,300 rows/day since 2026-07-06 -- large enough to refill the 10 GB cap
from empty in 3-4 weeks on its own, even with #9415's five-table fix applied (that PR
addressed other tables totaling well under 1 GB combined).
queue-health is the one signal type genuinely read as a historical series
(maintainer-slop-duplicate-trend.ts shapes multiple weeks into a trend card) and stays
excluded, unchanged.
Refs #94351 parent 7ed3531 commit ae17e14
2 files changed
Lines changed: 48 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
195 | | - | |
196 | | - | |
197 | | - | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
| |||
205 | 205 | | |
206 | 206 | | |
207 | 207 | | |
208 | | - | |
209 | | - | |
210 | | - | |
| 208 | + | |
| 209 | + | |
211 | 210 | | |
212 | 211 | | |
213 | 212 | | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
214 | 227 | | |
215 | 228 | | |
216 | 229 | | |
| |||
230 | 243 | | |
231 | 244 | | |
232 | 245 | | |
233 | | - | |
234 | | - | |
| 246 | + | |
| 247 | + | |
235 | 248 | | |
236 | 249 | | |
237 | 250 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
438 | 438 | | |
439 | 439 | | |
440 | 440 | | |
441 | | - | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
442 | 444 | | |
443 | 445 | | |
444 | 446 | | |
| |||
447 | 449 | | |
448 | 450 | | |
449 | 451 | | |
| 452 | + | |
450 | 453 | | |
451 | 454 | | |
452 | 455 | | |
453 | 456 | | |
454 | 457 | | |
455 | 458 | | |
456 | | - | |
| 459 | + | |
457 | 460 | | |
458 | 461 | | |
459 | 462 | | |
| |||
509 | 512 | | |
510 | 513 | | |
511 | 514 | | |
512 | | - | |
| 515 | + | |
513 | 516 | | |
514 | | - | |
515 | | - | |
516 | 517 | | |
517 | 518 | | |
518 | 519 | | |
519 | 520 | | |
520 | 521 | | |
521 | | - | |
522 | 522 | | |
523 | 523 | | |
524 | 524 | | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
525 | 546 | | |
526 | 547 | | |
527 | 548 | | |
| |||
0 commit comments