Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
@greptileai @veria-ai Please review the current tip for release regressions, incompatible worker versions, unsafe upgrades, and missed failure paths |
|
bugbot run Please review the current tip for release regressions, incompatible worker versions, unsafe upgrades, and missed failure paths |
|
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 91644ec. Configure here.
Superseded by merged #44431, which fixes the same budget-settlement bug. The extra regression assertion remains in #44428
TLDR
Problem this solves:
How it solves it:
User Flow
Before: an analysis provider error becomes an internal error and leaves reserved spend behind
After: the provider error is preserved and reserved spend is released
Validation
Reproduced the regression on
fe683ea139against a fresh PostgreSQL database: a rate-limited request returned HTTP 500 instead of 429. The fixed database lifecycle suite passes all eight cases, including three repeated provider failures with zero retained budget and no fabricated model-completion stepsThe full Lens suite passes 200 tests.
make checkpasses on this branch and with the fix in the coordinated-release branch. Current-tip hosted checks pass, including Codecov coverage of every modified executable line. The eight PostgreSQL lifecycle cases also passed again against a fresh disposable databaseScreenshots / Proof of Fix
Both runs used the same local proxy at
http://127.0.0.1:4426, real PostgreSQL, and a real paid provider. Register an analysis model with explicit pricing and a limited worker key, create an investigation, and claim it. The IDs below are the values returned by those API calls. The success request body is{"purpose":"extract","prompt":"Return JSON only: {\"observations\":[]}"}. Then replace only that test deployment's provider credential with an invalid value and send the same request againBefore (fe683ea)
POST http://127.0.0.1:4426/lens/worker/<lens-id>/<job-id>/modelwith the worker token and request above: HTTP 200, actual cost$0.000274cannot access free variable 'response'GET http://127.0.0.1:4426/lens/<lens-id>: spend increases to$0.041398despite the failed requestAfter (91644ec)
POST http://127.0.0.1:4426/lens/worker/<lens-id>/<job-id>/modelwith the worker token and request above: HTTP 200, actual cost$0.000274GET http://127.0.0.1:4426/lens/<lens-id>after each failure: spend stays$0.000274and the one successful model step is preservedCompanion changes
Found during end-to-end release validation for #44428. This focused fix can merge independently; the release branch also contains it for combined validation
Pre-Submission checklist
Caveats
Low
Type
Bug fix