Repository navigation
fix(combos): purge combo-scoped proxy assignments when a combo is deleted (#14553) - #14562
Merged
diegosouzapw merged 1 commit intoSep 24, 2026
Conversation
…eted (diegosouzapw#14553) Deleting a combo removed the combos row and its LKGP pins, but left every proxy_assignments row with scope='combo' for that combo id behind. The proxy assignment API kept reporting an assignment for a combo that no longer exists, and the scope's rotation cursor in proxy_scope_rotation survived too. The delete transaction now drops the combo's proxy_assignments rows and its rotation state, mirroring the account-scope purge that runs on connection deletion (diegosouzapw#9232). When rows were purged the proxy registry generation bumps so cached resolutions are discarded. The proxy itself stays registered; other scopes that use it are untouched. Tests: tests/unit/14553-combo-delete-purges-proxy-assignments.test.ts covers the purge, survivor isolation, rotation-cursor cleanup, and the generation bump.
Owner
|
Clean fix, and mirroring the existing account-scope purge pattern from #9232 instead of |
diegosouzapw
merged commit Sep 24, 2026
c4d038f
into
diegosouzapw:release/v3.8.51
9 of 16 checks passed
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.
What
Fixes #14553. Deleting a combo left orphaned
proxy_assignmentsrows behind: the delete transaction insqliteComboRepository.tsremoved the combos row and the LKGP pins, but never touched the combo's proxy assignments or itsproxy_scope_rotationcursor. The dashboard hides the dangling rows (the combo is gone from the list), yetGET /api/settings/proxies/assignmentsstill reports an assignment for a scope_id that no longer exists, and the row counts toward active combo assignments.How
proxy_assignmentsrow withscope = 'combo'for the deleted id and clear the combo's rotation cursor viaclearRotationState(the existing shared helper fromproxies/rotation). This mirrors the account-scope purge thatproviders/deletion.tsruns on connection delete (fix(backend): deleteProviderConnection leaves proxy_assignments orphan rows #9232).Verification
tests/unit/14553-combo-delete-purges-proxy-assignments.test.ts, red-green verified: all 4 cases fail on the base (assignment survives the delete) and pass with the fix. Cases: purge on delete, survivor combo + proxy row untouched, rotation cursor dropped for the doomed combo only, registry generation bumps.prettier --checkclean on both files,eslintclean,npm run typecheck:coreexits 0.No changelog fragment, following the precedent of #14300 and #14291.
AI-assisted: this change was prepared with an AI coding assistant and reviewed line by line by the contributor.