Conversation
| def build_default_output_model(evaluator_id: str) -> str: | ||
| base = evaluator_id.lower().replace("_", "-") | ||
| return f"{base}-rft" | ||
| uuid_suffix = str(uuid.uuid4())[:4] |
There was a problem hiding this comment.
Bug: UUID Truncation: A Collision Course
Taking only the first 4 characters from uuid.uuid4() provides only 65,536 possible values (16^4), which creates a high collision risk. The birthday paradox means collisions become likely after just a few hundred model creations, reintroducing the "output model exists" errors this change aims to prevent. Using uuid.uuid4().hex[:8] or the full hex would provide better uniqueness.
xzrderek
approved these changes
Nov 10, 2025
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.
execute the create RFT again, users will see the issue of output model exists, adding a uuid based suffix to differentiate
name: Pull Request
about: Propose changes to the codebase
title: "Brief description of changes"
labels: ''
assignees: ''
Description
Please include a summary of the change and which issue is fixed or feature is implemented. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes # (issue)
Implements # (issue)
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.
Test Configuration:
Checklist:
black .,isort .,flake8 .)Screenshots (if applicable)
If applicable, add screenshots to help showcase your changes.
Additional context
Add any other context about the PR here.
Note
Add a short UUID suffix to the default RFT output model name and export the helper.
build_default_output_modelto append a 4-char UUID suffix (viauuid.uuid4()) to"{base}-rft-..."to avoid name collisions.build_default_output_modeland_map_api_host_to_app_hostto__all__.uuid.Written by Cursor Bugbot for commit 3861ecb. This will update automatically on new commits. Configure here.