Problem
The library pipeline has no input validation: " " passes and is persisted as a scored attempt, and oversized input bypasses library callers. Only the API route checks length.
Where
lib/arena.ts (runAttempt goes straight to filter/agent/persist) vs app/api/attempt/route.ts (length check).
Acceptance
Add a failing test first calling runAttempt({input: " "}) and oversized input, expecting rejection before filter/agent/persist. Then fix.
Problem
The library pipeline has no input validation:
" "passes and is persisted as a scored attempt, and oversized input bypasses library callers. Only the API route checks length.Where
lib/arena.ts(runAttemptgoes straight to filter/agent/persist) vsapp/api/attempt/route.ts(length check).Acceptance
Add a failing test first calling
runAttempt({input: " "})and oversized input, expecting rejection before filter/agent/persist. Then fix.