fix(cloudflare): make flag log capture per-request under concurrent requests - #508
Open
vahidlazio wants to merge 5 commits into
Open
fix(cloudflare): make flag log capture per-request under concurrent requests#508vahidlazio wants to merge 5 commits into
vahidlazio wants to merge 5 commits into
Conversation
…uests Requests in the same isolate run concurrently and interleave at await points. Key the in-flight flag log by resolve id so each request's log stays isolated for its whole lifetime (including across the sticky-assignment suspend/resume), hand finished logs to the post-response queue send through a drained outbox, and skip unparseable queue messages instead of panicking the batch. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…w to outbox The host never called confidence_resolver::seed_rng, so every isolate generated the identical resolve-id sequence and ids collided across isolates — downstream consumers key on resolve id and misbehave on collisions. Seed once per isolate from host entropy at both worker entry points. At map capacity, flush pending entries to the outbox (still delivered, at worst without telemetry) instead of discarding them. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
flags:applyclaims its entries via a key diff around the synchronousapply_flagscall (the token's resolve id isn't known to the handler upfront)Vec, and send/serialize errors are loggedTest plan
🤖 Generated with Claude Code