Add batch-llm module: 100,000 synthetic tickets classified by a ChatClient in a Spring Batch 6 chunk step with Resilience4j rate limiting and retry, skip-and-record for malformed JSON, restart after kill -9 in a second JVM, and a per-chunk cost ledger. The model is a deterministic simulated ChatModel; prices are configurable placeholders. No provider called.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017ic4b4VQVEJWetTT1dYzyJ
This commit is contained in:
2026-10-29 06:10:22 +00:00
co-authored by Claude Sonnet 5.5
parent aa8b1604ed
commit 6d792f00e0
48 changed files with 2093 additions and 0 deletions
@@ -0,0 +1,13 @@
# A model regression, the skip limit, and a restart with a fixed model
Execution 1: simulated model returns invalid JSON for 50% of tickets, no re-ask, skip limit 50, 2,000 tickets.
status / reason FAILED / org.springframework.batch.core.step.FatalStepExecutionException: Unable to process chunk
tickets read 200 of 2000
calls the provider billed before the step stopped: 200 (a full run needs about 2,000)
committed results 52 skipped rows 50
Execution 2: same job parameters, same database, model fixed, skip limit 1000.
status COMPLETED
tickets read this time 1900 (execution 1 had committed 100, so the reader resumed after them)
committed results 1942 skipped rows 58 classified + skipped = 2000
tickets present in BOTH tables: 0 (stale skip rows from execution 1 are deleted when the ticket is classified)