a3e5a8c1b9267dc84ab934df5487e6a577579004
buildCorrectedFewShotExamples() (a getRecentCorrectedModerations(5) DB hit) was called inside the per-sub-batch buildContent closure in textBatchProcessor.ts — re-queried for every sub-batch (≈10× for a 200-msg burst) AND re-fired on each parse-error retry. mediaBatchProcessor already hoisted it once. Mirror that: fetch once per runTextOnlyBatch, reuse the cached string inside the closure. No behavior change — identical content, fewer identical DB reads. tsc + 129 tests + biome green. Co-Authored-By: Claude Opus 5 (Nous Research)
Description
Bete Discord moderation watcher
27 MiB
Languages
TypeScript
96.8%
Nix
1%
Shell
0.9%
CSS
0.5%
PLpgSQL
0.5%
Other
0.3%