Skip to content

v0.2.1

Choose a tag to compare

@romerramos romerramos released this 11 Oct 14:42
· 9 commits to main since this release
456f14c

Jev my PR now has an open JSON API: send any diff, get Jev's verdict back, with no sign-in.

New

  • Open API: POST /api/verdicts takes a diff as JSON (title, description, branches and the files with their patches) and returns the verdict (human, llm or none), how sure Jev is, a verdict for each file, and whether patches were left out. It needs no sign-in, cookie or API key. The README's Open API section documents the request, the response and every error.
  • Free repeats: the same diff sent again within 7 days returns its saved verdict without asking Jev.

Improved

  • Limits for the API, per IP address: 1 call every 2 minutes and 10 new verdicts in any 24 hours.
  • The API gets a quarter of the monthly budget. Once it has spent that, it pauses until the 1st while signed-in use carries on.
  • Request bodies over 2 MB are refused before they're read.
  • Clear errors: limits and pauses return a plain JSON error with Retry-After.

Privacy

  • Patches and IP addresses aren't stored for API calls. Only the diff's hash, its file names and the verdicts are kept, in the cache for 7 days.
  • A keyed hash of each caller's IP address is kept for 2 days so the daily limit can be counted, then deleted.

Upgrade notes

  • One migration (jev_requests.source and jev_requests.ip_digest), which bin/update runs.
  • New hourly job (config/recurring.yml) that forgets IP hashes older than 2 days.
  • No new secrets or settings.
  • Behind a proxy: make sure the real client IP reaches Rails (X-Forwarded-For from a trusted proxy). Otherwise every API caller shares one limit.