refactor: improve guest UUID generation and docs#950
Merged
Conversation
7 tasks
ShGKme
approved these changes
Jun 18, 2026
Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: Josh <josh.t.richards@gmail.com>
susnux
approved these changes
Jul 20, 2026
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #950 +/- ##
==========================================
- Coverage 70.00% 64.36% -5.64%
==========================================
Files 4 4
Lines 80 87 +7
Branches 23 24 +1
==========================================
Hits 56 56
- Misses 19 26 +7
Partials 5 5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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
Some polishing of
lib/guest.tsto improve the UUID helper implementation and docs:randomUUID()fallback behavior by usingcrypto.getRandomValues()(available even in Insecure Contexts like HTTP) before falling back as last resort toMath.random()randomUUID()incorrect/misleading documentation (crypto.randomUUIDis the preferred/best/most secure method)getGuestUser()(it does not returnnull)This change preserves the API while making the UUID fallback logic more robust and the inline documentation more accurate.
🤖 AI (if applicable)