Files
OmniRoute/src/lib
小妍儿 ✨ 767c01d195 fix(db): invalidate LKGP pins when their provider connection is deleted (#8887) (#8935)
* test(db): RED for LKGP pin invalidation on provider connection delete (#8887)

* fix(db): invalidate LKGP pins when their provider connection is deleted (#8887)

setLKGP() persists { provider, connectionId } under the `lkgp` namespace of
key_value, but none of the three delete paths in db/providers.ts touched that
namespace, so a pin outlived the connection it referenced and became unbounded
stale state.

- Add deleteLKGPByConnectionIds() to its owning module src/lib/db/settings/lkgp.ts
  (no raw lkgp SQL inside providers.ts). Pins without a connectionId and legacy
  plain-string pins are left untouched.
- Wire it into deleteProviderConnection, deleteProviderConnections and
  deleteProviderConnectionsByProvider.
- Add invalidateCachedLKGP() to readCache.ts so the 5s in-memory lkgpCache cannot
  serve a pin that was just deleted; called via the lazy-import pattern already
  used there, so no import cycle (npm run check:cycles OK, 391 files).

No change to updateProviderConnection semantics, no session_model_history change,
no new API route, no migration.

---------

Co-authored-by: 千乘妍 (Xiaoyaner) <xiaoyaner0201@users.noreply.github.com>
Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
2026-08-13 07:54:20 -03:00
..
2026-06-19 06:49:01 -03:00
2026-07-29 15:18:55 -03:00
2026-06-30 06:54:29 -03:00
2026-07-02 10:47:13 -03:00
2026-06-30 06:54:29 -03:00
2026-06-29 16:51:03 -03:00
2026-07-13 09:12:40 -03:00
2026-07-29 15:18:55 -03:00
2026-07-13 09:12:40 -03:00
2026-06-27 09:07:12 -03:00
2026-07-29 15:18:55 -03:00
2026-07-04 13:00:30 -03:00
2026-07-29 15:18:55 -03:00
2026-07-02 10:47:13 -03:00
2026-06-29 16:51:03 -03:00
2026-06-30 06:54:29 -03:00
2026-07-07 13:14:06 -03:00
2026-07-29 15:18:55 -03:00
2026-08-05 21:43:16 -03:00
2026-07-29 15:18:55 -03:00
2026-07-29 15:18:55 -03:00
2026-07-02 10:47:13 -03:00
2026-06-30 06:54:29 -03:00
2026-06-30 06:54:29 -03:00
2026-07-29 15:18:55 -03:00
2026-07-29 15:18:55 -03:00
2026-07-29 15:18:55 -03:00
2026-07-29 15:18:55 -03:00
2026-06-20 14:55:24 -03:00
2026-07-29 15:18:55 -03:00
2026-07-29 15:18:55 -03:00
2026-06-29 16:51:03 -03:00
2026-05-29 12:44:29 -03:00
2026-06-17 02:43:21 -03:00
2026-07-29 15:18:55 -03:00
2026-07-29 15:18:55 -03:00
2026-05-29 12:44:29 -03:00
2026-05-29 12:44:29 -03:00
2026-07-29 15:18:55 -03:00
2026-06-26 02:51:06 -03:00
2026-06-29 08:40:06 -03:00
2026-06-29 08:40:06 -03:00
2026-07-29 15:18:55 -03:00
2026-07-29 15:18:55 -03:00
2026-05-26 23:51:47 -03:00
2026-07-29 15:18:55 -03:00
2026-04-30 01:27:03 -03:00
2026-06-29 08:40:06 -03:00
2026-06-29 16:51:03 -03:00
2026-07-29 15:18:55 -03:00
2026-06-13 17:27:40 -03:00
2026-06-20 14:55:24 -03:00
2026-07-02 10:47:13 -03:00
2026-06-09 15:56:24 -03:00
2026-07-29 15:18:55 -03:00