Skip to content

fix(combo): skip the redundant second LKGP write on matching combo key - #15432

Merged
diegosouzapw merged 1 commit into
cheaper-inference:release/v3.8.52from
maxmad64bis:fix/lkgp-intra-request-ttl
Oct 6, 2026
Merged

diegosouzapw merged 1 commit into
cheaper-inference:release/v3.8.52from
maxmad64bis:fix/lkgp-intra-request-ttl

Conversation

@maxmad64bis

@maxmad64bis maxmad64bis commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ base-red inherited: #15306

Summary

Combo runs that saved the provider choice twice when the combo id matched the combo name now save it once. The dropped write carried the same provider and connection but was never read back. Pinned combos resolve the same provider as before.

Related Issues

  • No linked issue — standalone duplicate write cleanup with no upstream report.

Validation

  • Change type: routing
  • Focused tests and category gates from the golden path
  • npm run lint
  • Reconciled with the current active release base; focused checks rerun afterward
  • Production-code changes include a new or updated automated test in this PR

Tests Added Or Updated

  • tests/unit/combo/record-lkgp-pin.test.ts — two new cases for matching id and missing id, each asserting a single combo-level write on the read key plus a read-back of the stored provider; the key assertion guards the direction of the fix because a count-only check passes with either key kept.

Coverage Notes

  • open-sse/services/combo/recordLkgpPin.ts — covered by tests/unit/combo/record-lkgp-pin.test.ts (existing distinct-keys case plus the two new matching-key cases).

Reviewer Notes

  • Behavior: When the normalized combo key matches the combo name, only the combo-level write is kept and the target-scoped write is skipped. The kept entry is the one every combo-level reader looks up, so the resolved pin is unchanged.
  • Follow-up: The shared normalization stays inline; a later change factors the repeated fallback into one helper.

@maxmad64bis
maxmad64bis force-pushed the fix/lkgp-intra-request-ttl branch from f709556 to fb08e61 Compare October 3, 2026 09:57
Two setLKGP calls per success became one when comboId matches comboName; proven by unit RED/GREEN plus a disposable-DB run.
@maxmad64bis
maxmad64bis force-pushed the fix/lkgp-intra-request-ttl branch from fb08e61 to 743f68f Compare October 3, 2026 10:40
@maxmad64bis
maxmad64bis marked this pull request as ready for review October 3, 2026 16:10
@diegosouzapw
diegosouzapw merged commit 84af48a into cheaper-inference:release/v3.8.52 Oct 6, 2026
110 of 154 checks passed
@maxmad64bis
maxmad64bis deleted the fix/lkgp-intra-request-ttl branch October 7, 2026 20:37
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