Repository navigation
fix: preserve flag evaluations tracked during analytics flush - #284
pcbeingused333 wants to merge 3 commits into
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
There was a problem hiding this comment.
All reported issues were addressed across 2 files
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
|
Thanks for pointing out the synchronous submission failure. The follow-up restores the detached counts under the lock and merges them with evaluations recorded during submission before re-raising the exception. A regression test verifies that the next flush sends both sets of counts. Could you take another look at the updated behavior? This comment was drafted with Claude Code. |
Flag evaluations can be lost when they are recorded during an analytics submission, or when the submission raises synchronously after the pending batch has been detached.
Detach the current batch under a lock and submit it outside the lock so evaluations can continue while the request is being scheduled. If submission raises synchronously, add the detached counts back into the pending batch under the lock and propagate the exception. The next flush submits both the restored counts and the evaluations recorded during submission.
Testing and validation
python -m pytest -q tests/test_analytics.pyon the previous PR head with the new regression produced one failure and seven passes. All eight pass with the fix.Accept-Encodingheader assertions. The same six failures reproduce on upstream main in the local Python 3.15 environment, which also advertiseszstd.This change and its regression test were prepared with assistance from OpenAI Codex.