Skip to content

fix: use load sentinel and injected config in AliasResolver#874

Merged
vdusek merged 1 commit intomasterfrom
fix/alias-resolver-load-sentinel-and-config-consistency
Apr 21, 2026
Merged

fix: use load sentinel and injected config in AliasResolver#874
vdusek merged 1 commit intomasterfrom
fix/alias-resolver-load-sentinel-and-config-consistency

Conversation

@vdusek
Copy link
Copy Markdown
Contributor

@vdusek vdusek commented Apr 20, 2026

Summary

AliasResolver had two consistency issues:

  • Empty-dict sentinel. if not cls._alias_map conflated an empty dict with 'not yet loaded', so every alias lookup re-hit the default KVS with get_record until the first alias was persisted.
  • Mixed configuration sources. is_at_home was read from the global Configuration while the KVS client was built from self._configuration, so a caller-injected config could silently skip writes or target the wrong KVS.

Fix

  • Add a _alias_map_loaded sentinel so an empty KVS response counts as 'loaded'.
  • Use the injected configuration consistently for both is_at_home gating and KVS client construction.
  • Add regression tests for both paths.

`AliasResolver._get_alias_map` used `not cls._alias_map` as a 'not loaded'
sentinel, conflating an empty dict with 'not yet loaded' and re-hitting the
default KVS on every lookup until the first alias was persisted. It also
gated `is_at_home` on `Configuration.get_global_configuration()` while the
KVS client was built from `self._configuration`, so an injected custom
configuration could silently skip writes or target the wrong KVS.

Introduce a `_alias_map_loaded` sentinel and use the injected configuration
consistently for both gating and client construction.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vdusek vdusek added adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team. labels Apr 20, 2026
@vdusek vdusek self-assigned this Apr 20, 2026
@github-actions github-actions Bot added this to the 139th sprint - Tooling team milestone Apr 20, 2026
@github-actions github-actions Bot added the tested Temporary label used only programatically for some analytics. label Apr 20, 2026
@vdusek vdusek requested a review from Pijukatel April 20, 2026 15:01
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.73%. Comparing base (737b0dd) to head (4277720).
⚠️ Report is 4 commits behind head on master.

❗ There is a different number of reports uploaded between BASE (737b0dd) and HEAD (4277720). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (737b0dd) HEAD (4277720)
integration 1 0
Additional details and impacted files
@@             Coverage Diff             @@
##           master     #874       +/-   ##
===========================================
- Coverage   86.57%   75.73%   -10.84%     
===========================================
  Files          48       48               
  Lines        2920     2922        +2     
===========================================
- Hits         2528     2213      -315     
- Misses        392      709      +317     
Flag Coverage Δ
e2e 37.88% <40.00%> (+<0.01%) ⬆️
integration ?
unit 75.73% <100.00%> (+0.42%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@vdusek vdusek merged commit 2d129ad into master Apr 21, 2026
30 of 31 checks passed
@vdusek vdusek deleted the fix/alias-resolver-load-sentinel-and-config-consistency branch April 21, 2026 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team. tested Temporary label used only programatically for some analytics.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants