fix(server): preserve requests without valid prompt token IDs - #573
Merged
Zhiyuan He (hzy46) merged 2 commits intoAug 28, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes triplet deduplication so requests with missing or malformed prompt token IDs are preserved.
Changes:
- Deduplicates only non-empty integer token-ID lists.
- Mirrors deduplication semantics for VERL image alignment.
- Adds regression coverage for invalid IDs and valid last-wins behavior.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
agentlightning/server/routes/events.py |
Validates prompt keys before deduplication. |
agentlightning/verl/agl_rollout_manager.py |
Aligns images using matching deduplication rules. |
tests/server/test_endpoints.py |
Covers malformed IDs and repeated valid keys. |
tests/verl/test_agl_rollout_manager.py |
Covers image alignment with malformed IDs. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Rio Yu (rioyu123)
force-pushed
the
codex/fix-invalid-prompt-dedupe
branch
from
August 27, 2026 12:57
96f7e40 to
bf19304
Compare
Signed-off-by: Rio Yu <52408936+rioyu123@users.noreply.github.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.
Fixes #572.
What changed
Following the review, the two key helpers and superseded-index tracking have been removed. The early guard retains the request's index before
continue; otherwise the final inclusion filter would discard requests with no key. The integer-list check also prevents a truthy nested value such as[[1]]from raising while hashing the key.Valid prompt-token keys keep the existing last-wins behavior. For providers that omit prompt token IDs, this can increase the number of returned triplets because the server no longer guesses that successful calls are retries. Explicit request identity would be a better way to deduplicate those calls, but is outside this fix.
Verification
devandverl-cpudependencies: 92 tests passed, no skips.5518551ewith the updated tests overlaid, and pass with this fix.