Skip to content

fix(api): prevent silent lost updates on concurrent settings writes (#7784) - #8587

Merged
diegosouzapw merged 1 commit into
cheaper-inference:release/v3.8.49from
Prudhvivuda:fix/7784-settings-cas
Jul 27, 2026
Merged

diegosouzapw merged 1 commit into
cheaper-inference:release/v3.8.49from
Prudhvivuda:fix/7784-settings-cas

Conversation

@Prudhvivuda

@Prudhvivuda Prudhvivuda commented Jul 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add monotonic settingsRevision with ETag on GET/PATCH /api/settings and opt-in optimistic concurrency via expectedRevision (body) or If-Match (header).
  • Return 409 SETTINGS_REVISION_CONFLICT when a stale writer would clobber map keys like providerStrategies / wildcardAliases instead of silently dropping concurrent changes.
  • Wire the dashboard read-modify-write paths for provider routing overrides and wildcard aliases to send expectedRevision.

Test plan

  • node --import tsx/esm --test tests/unit/settings-cas-7784.test.ts — reproduces maintainer A/B race; stale writer gets 409 and first change is preserved
  • node --import tsx/esm --test tests/unit/settings-api.test.ts tests/unit/api/settings-audit.test.ts — existing settings routes still pass

Closes #7784

…heaper-inference#7784)

Add opt-in settingsRevision / If-Match optimistic concurrency so stale
PATCH writers get 409 instead of silently clobbering map settings.
@Prudhvivuda
Prudhvivuda force-pushed the fix/7784-settings-cas branch from 8a2c396 to db46a89 Compare July 25, 2026 15:49
@diegosouzapw
diegosouzapw merged commit 4d24c0c into cheaper-inference:release/v3.8.49 Jul 27, 2026
5 checks passed
@diegosouzapw diegosouzapw mentioned this pull request Jul 28, 2026
HouMinXi pushed a commit to HouMinXi/OmniRoute that referenced this pull request Aug 2, 2026
…heaper-inference#7784) (cheaper-inference#8587)

Add opt-in settingsRevision / If-Match optimistic concurrency so stale
PATCH writers get 409 instead of silently clobbering map settings.
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
…heaper-inference#7784) (cheaper-inference#8587)

Add opt-in settingsRevision / If-Match optimistic concurrency so stale
PATCH writers get 409 instead of silently clobbering map settings.
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.

fix(api): prevent silent lost updates from concurrent dashboard and API settings writers

2 participants