fix(configs): make environment variable name suggestions deterministic#3142
Conversation
Signed-off-by: StandingMan <jmtangcs@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3142 +/- ##
=============================================
- Coverage 73.29% 56.03% -17.26%
Complexity 943 943
=============================================
Files 1126 1124 -2
Lines 98435 88411 -10024
Branches 75608 65024 -10584
=============================================
- Hits 72148 49542 -22606
- Misses 23683 36288 +12605
+ Partials 2604 2581 -23
🚀 New features to boost your workflow:
|
|
Hi @numinnex, would you mind helping to trigger the CI when convenient? |
|
hey, thanks for ping. PR looks good good. we're currently busy with release, so we merge PRs less often. |
Got it, thanks! No worries at all — happy to wait. I’m curious — do I need to @ a maintainer to help trigger the CI tests every time I submit a PR? |
|
@Standing-Man once your first PR gets merged, CI will be automatically run on the PRs you create. manual approval from maintainers is required only for first-time-contributors. |
Thanks for your explanation, and I really appreciate all the maintainers’ reviews! |
Which issue does this PR close?
Closes #
Rationale
This PR makes environment variable suggestions deterministic in TypedEnvProvider.
When multiple candidate env vars have the same Levenshtein distance to an unknown variable, the previous implementation could return them in non-deterministic order (due to HashSet iteration). This change adds a stable tie-breaker so suggestions are consistently ordered.
What changed?
Sorting logic now:
Added test
find_similar_vars_has_deterministic_order_for_same_distancethat verifies stable output order for same-distance candidates.Local Execution
Passed
ran
AI Usage
I used codex to check the code I wrote.