fix: updating metric library - #111
Conversation
|
| Filename | Overview |
|---|---|
| app/services/signup_reference_codes.py | Implements reference-code validation and consumption, but the previously reported concurrent overuse path remains. |
| app/api/v1/routes/metric_studio.py | Adds the Metrics Studio API; explicit retries still accept active results and dispatch overlapping workers. |
| app/workers/tasks/evaluate_studio_run_item.py | Evaluates Studio results and persists scores, but has no stale-task ownership guard to prevent an older worker from overwriting a retry. |
| app/api/v1/routes/call_imports.py | Expands call-import validation, retry handling, telephony checks, and manual audio upload and append support. |
| app/api/v1/routes/auth.py | Adds gated signup and active-organization enforcement while retaining the non-atomic reference-code consumption flow. |
Reviews (2): Last reviewed commit: "feat: updating some of the changes" | Re-trigger Greptile
| row = ( | ||
| db.query(SignupReferenceCode) | ||
| .filter(SignupReferenceCode.code_hash == code_hash) | ||
| .first() | ||
| ) |
There was a problem hiding this comment.
Non-atomic signup code consumption
If concurrent signup requests use the final available reference-code slot, each request reads the same use_count before the later increment and all pass validation, causing more accounts to be created than max_uses permits. Make validation and consumption a single locked or atomic conditional operation. How this was verified: The signup path performs an unlocked read and a later ORM increment with no database constraint or atomic update enforcing the limit.
|
Too many files changed for review (126 files, 100 file limit). Bypass the limit by tagging |
Resolve merge conflicts by combining metric-library feature changes with main import audit metadata and PDF report caching updates. Co-authored-by: Cursor <cursoragent@cursor.com>
b770d30 to
aa9c3f8
Compare
No description provided.