Skip to content

fix!: replace makeKeyFn with delimiter to strengthen guarantee of proper escaping#601

Open
wschurman wants to merge 1 commit into
05-13-fix_prevent_collision_in_companion_when_entities_share_same_name_or_same_table_namefrom
05-14-fix_replace_makekeyfn_with_delimiter_to_strengthen_guarantee_of_proper_escaping
Open

fix!: replace makeKeyFn with delimiter to strengthen guarantee of proper escaping#601
wschurman wants to merge 1 commit into
05-13-fix_prevent_collision_in_companion_when_entities_share_same_name_or_same_table_namefrom
05-14-fix_replace_makekeyfn_with_delimiter_to_strengthen_guarantee_of_proper_escaping

Conversation

@wschurman
Copy link
Copy Markdown
Member

@wschurman wschurman commented May 14, 2026

Why

Since cache key construction function is application-supplyable, there's potential that it doesn't escape properly, causing potential cache collisions.

How

Change the API to only allow specifying the delimiter, and hoist code into the package to handle delimiter escape.

Test Plan

Run new test to ensure no collisions on something that would've previously collided.

Copy link
Copy Markdown
Member Author

wschurman commented May 14, 2026

@codecov
Copy link
Copy Markdown

codecov Bot commented May 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (55cb75e) to head (8fb1efe).

Additional details and impacted files
@@                                                     Coverage Diff                                                     @@
##           05-13-fix_prevent_collision_in_companion_when_entities_share_same_name_or_same_table_name      #601   +/-   ##
===========================================================================================================================
  Coverage                                                                                     100.00%   100.00%           
===========================================================================================================================
  Files                                                                                            109       109           
  Lines                                                                                          17614     17623    +9     
  Branches                                                                                        1514      1518    +4     
===========================================================================================================================
+ Hits                                                                                           17614     17623    +9     
Flag Coverage Δ
integration 28.69% <100.00%> (+0.03%) ⬆️
unittest 94.56% <100.00%> (+<0.01%) ⬆️

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants