Skip to content

fix(db): reconcile legacy reasoning cache migration - #1734

Merged
diegosouzapw merged 4 commits into
cheaper-inference:release/v3.7.4from
dhaern:fix/migration-032-compat-v373
Apr 28, 2026
Merged

diegosouzapw merged 4 commits into
cheaper-inference:release/v3.7.4from
dhaern:fix/migration-032-compat-v373

Conversation

@dhaern

@dhaern dhaern commented Apr 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add migration compatibility for legacy 032_create_reasoning_cache records that now belong to 033_create_reasoning_cache.
  • Add a regression test proving 032_apikey_lifecycle is no longer shadowed by the stale tracking row.

Why

Some databases can have _omniroute_migrations tracking 032 | create_reasoning_cache from an earlier release. Current builds ship 032_apikey_lifecycle.sql and 033_create_reasoning_cache.sql, so the version-only tracking makes the runner skip the real 032_apikey_lifecycle migration and emit a critical renumbering warning on startup.

This fix rehomes the legacy reasoning-cache tracking row to 033, freeing version 032 so the API key lifecycle migration can apply normally. This corrects the migration state instead of hiding the warning.

Validation

  • node --import tsx/esm --test tests/unit/db-migration-runner.test.ts
  • npm run typecheck:core

@dhaern
dhaern requested a review from diegosouzapw as a code owner April 28, 2026 17:12

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a compatibility entry in the migration runner to rehome the legacy 'create_reasoning_cache' migration from version 032 to 033. This change ensures that the new 'apikey_lifecycle' migration can occupy version 032 without conflicts. Additionally, a regression test was added to verify that the rehoming logic correctly updates the migration history and applies new migrations without re-executing rehomed SQL. I have no feedback to provide as the changes are well-implemented and the existing review comments were purely explanatory.

@diegosouzapw diegosouzapw mentioned this pull request Apr 28, 2026
Introduce a dedicated dashboard changelog page with separate news and
release note views so users can discover updates without leaving the
app.

Also surface active announcements in version metadata for the home page,
add release note parsing utilities and tests, and enforce API key policy
checks on image edit requests to keep route behavior aligned with other
image endpoints.
@diegosouzapw
diegosouzapw changed the base branch from main to release/v3.7.4 April 28, 2026 23:01
@diegosouzapw

Copy link
Copy Markdown
Collaborator

Thanks for this great contribution! 🎉 It's now officially merged into the release/v3.7.4 branch and will be part of the next release. We appreciate your effort!

@diegosouzapw
diegosouzapw merged commit 2aaed03 into cheaper-inference:release/v3.7.4 Apr 28, 2026
1 check passed
@diegosouzapw

Copy link
Copy Markdown
Collaborator

Thanks for this great contribution! 🎉 It's now officially merged into the release/v3.7.4 branch and will be part of the next release. We appreciate your effort!

diegosouzapw added a commit that referenced this pull request Apr 28, 2026
* chore(release): v3.7.4 — version bump, openapi and changelog sync

* fix: preserve previous_response_id and conversation_id fields on empty input array (#1729)

* fix: bypass UI validation block for optional API keys and fix string fallback typing (#1721)

* fix(proxy): disable HTTP keep-alive and pipelining in Undici proxy dispatcher to prevent socket hang up

* feat(proxy): implement bulk proxy import via pipe-delimited parser with update-or-create logic

* docs: update changelog for v3.7.4 fixes and proxy features

* test: update responses store expectations for empty input arrays

* feat(pwa): add fullscreen installable PWA with manifest, service worker, and cross-platform app icons. (#1728)

Integrated into release/v3.7.4

* Fix image provider validation and Stability image requests (#1726)

Integrated into release/v3.7.4

* docs: add PR 1726 and PR 1728 to v3.7.4 changelog

* fix(security): replace insecure Math.random with crypto.getRandomValues for fallback UUID generation

* fix(migrations): intercept 007 migration to use IF NOT EXISTS logic on fresh installs

Fixes #1733

* test: fix typescript compilation errors in unit tests

* fix(db): reconcile legacy reasoning cache migration

* chore(release): bump to v3.7.4 — changelog, docs, version sync

* fix(cc-compatible): preserve Claude Code system skeleton (#1740)

Integrated into release/v3.7.4

* docs(changelog): update for PR #1740 merge

* docs(changelog): include workflow updates

* fix(db): reconcile legacy reasoning cache migration (#1734)

Integrated into release/v3.7.4

* Add endpoint tunnel visibility settings (#1743)

Integrated into release/v3.7.4

* Normalize max reasoning effort for Codex routing (#1744)

Integrated into release/v3.7.4

* Fix Claude Code gateway config helper (#1745)

Integrated into release/v3.7.4

* Refresh CLI fingerprint provider profiles (#1746)

Integrated into release/v3.7.4

* Integrated into release/v3.7.4 (PR #1742)

* docs(changelog): update for PRs 1742-1746

---------

Co-authored-by: diegosouzapw <diegosouzapw@users.noreply.github.com>
Co-authored-by: Yash Ghule <y.ghule77@gmail.com>
Co-authored-by: backryun <bakryun0718@proton.me>
Co-authored-by: dhaern <manker_lol@hotmail.com>
Co-authored-by: Randi <55005611+rdself@users.noreply.github.com>
Co-authored-by: Duncan L <leungd@gmail.com>
HouMinXi pushed a commit to HouMinXi/OmniRoute that referenced this pull request Aug 2, 2026
* chore(release): v3.7.4 — version bump, openapi and changelog sync

* fix: preserve previous_response_id and conversation_id fields on empty input array (cheaper-inference#1729)

* fix: bypass UI validation block for optional API keys and fix string fallback typing (cheaper-inference#1721)

* fix(proxy): disable HTTP keep-alive and pipelining in Undici proxy dispatcher to prevent socket hang up

* feat(proxy): implement bulk proxy import via pipe-delimited parser with update-or-create logic

* docs: update changelog for v3.7.4 fixes and proxy features

* test: update responses store expectations for empty input arrays

* feat(pwa): add fullscreen installable PWA with manifest, service worker, and cross-platform app icons. (cheaper-inference#1728)

Integrated into release/v3.7.4

* Fix image provider validation and Stability image requests (cheaper-inference#1726)

Integrated into release/v3.7.4

* docs: add PR 1726 and PR 1728 to v3.7.4 changelog

* fix(security): replace insecure Math.random with crypto.getRandomValues for fallback UUID generation

* fix(migrations): intercept 007 migration to use IF NOT EXISTS logic on fresh installs

Fixes cheaper-inference#1733

* test: fix typescript compilation errors in unit tests

* fix(db): reconcile legacy reasoning cache migration

* chore(release): bump to v3.7.4 — changelog, docs, version sync

* fix(cc-compatible): preserve Claude Code system skeleton (cheaper-inference#1740)

Integrated into release/v3.7.4

* docs(changelog): update for PR cheaper-inference#1740 merge

* docs(changelog): include workflow updates

* fix(db): reconcile legacy reasoning cache migration (cheaper-inference#1734)

Integrated into release/v3.7.4

* Add endpoint tunnel visibility settings (cheaper-inference#1743)

Integrated into release/v3.7.4

* Normalize max reasoning effort for Codex routing (cheaper-inference#1744)

Integrated into release/v3.7.4

* Fix Claude Code gateway config helper (cheaper-inference#1745)

Integrated into release/v3.7.4

* Refresh CLI fingerprint provider profiles (cheaper-inference#1746)

Integrated into release/v3.7.4

* Integrated into release/v3.7.4 (PR cheaper-inference#1742)

* docs(changelog): update for PRs 1742-1746

---------

Co-authored-by: diegosouzapw <diegosouzapw@users.noreply.github.com>
Co-authored-by: Yash Ghule <y.ghule77@gmail.com>
Co-authored-by: backryun <bakryun0718@proton.me>
Co-authored-by: dhaern <manker_lol@hotmail.com>
Co-authored-by: Randi <55005611+rdself@users.noreply.github.com>
Co-authored-by: Duncan L <leungd@gmail.com>
Poid-ZA pushed a commit to Poid-ZA/OmniRoute that referenced this pull request Aug 5, 2026
* chore(release): v3.7.4 — version bump, openapi and changelog sync

* fix: preserve previous_response_id and conversation_id fields on empty input array (cheaper-inference#1729)

* fix: bypass UI validation block for optional API keys and fix string fallback typing (cheaper-inference#1721)

* fix(proxy): disable HTTP keep-alive and pipelining in Undici proxy dispatcher to prevent socket hang up

* feat(proxy): implement bulk proxy import via pipe-delimited parser with update-or-create logic

* docs: update changelog for v3.7.4 fixes and proxy features

* test: update responses store expectations for empty input arrays

* feat(pwa): add fullscreen installable PWA with manifest, service worker, and cross-platform app icons. (cheaper-inference#1728)

Integrated into release/v3.7.4

* Fix image provider validation and Stability image requests (cheaper-inference#1726)

Integrated into release/v3.7.4

* docs: add PR 1726 and PR 1728 to v3.7.4 changelog

* fix(security): replace insecure Math.random with crypto.getRandomValues for fallback UUID generation

* fix(migrations): intercept 007 migration to use IF NOT EXISTS logic on fresh installs

Fixes cheaper-inference#1733

* test: fix typescript compilation errors in unit tests

* fix(db): reconcile legacy reasoning cache migration

* chore(release): bump to v3.7.4 — changelog, docs, version sync

* fix(cc-compatible): preserve Claude Code system skeleton (cheaper-inference#1740)

Integrated into release/v3.7.4

* docs(changelog): update for PR cheaper-inference#1740 merge

* docs(changelog): include workflow updates

* fix(db): reconcile legacy reasoning cache migration (cheaper-inference#1734)

Integrated into release/v3.7.4

* Add endpoint tunnel visibility settings (cheaper-inference#1743)

Integrated into release/v3.7.4

* Normalize max reasoning effort for Codex routing (cheaper-inference#1744)

Integrated into release/v3.7.4

* Fix Claude Code gateway config helper (cheaper-inference#1745)

Integrated into release/v3.7.4

* Refresh CLI fingerprint provider profiles (cheaper-inference#1746)

Integrated into release/v3.7.4

* Integrated into release/v3.7.4 (PR cheaper-inference#1742)

* docs(changelog): update for PRs 1742-1746

---------

Co-authored-by: diegosouzapw <diegosouzapw@users.noreply.github.com>
Co-authored-by: Yash Ghule <y.ghule77@gmail.com>
Co-authored-by: backryun <bakryun0718@proton.me>
Co-authored-by: dhaern <manker_lol@hotmail.com>
Co-authored-by: Randi <55005611+rdself@users.noreply.github.com>
Co-authored-by: Duncan L <leungd@gmail.com>
tkgo11 pushed a commit to tkgo11/OmniRoute that referenced this pull request Sep 23, 2026
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
* chore(release): v3.7.4 — version bump, openapi and changelog sync

* fix: preserve previous_response_id and conversation_id fields on empty input array (cheaper-inference#1729)

* fix: bypass UI validation block for optional API keys and fix string fallback typing (cheaper-inference#1721)

* fix(proxy): disable HTTP keep-alive and pipelining in Undici proxy dispatcher to prevent socket hang up

* feat(proxy): implement bulk proxy import via pipe-delimited parser with update-or-create logic

* docs: update changelog for v3.7.4 fixes and proxy features

* test: update responses store expectations for empty input arrays

* feat(pwa): add fullscreen installable PWA with manifest, service worker, and cross-platform app icons. (cheaper-inference#1728)

Integrated into release/v3.7.4

* Fix image provider validation and Stability image requests (cheaper-inference#1726)

Integrated into release/v3.7.4

* docs: add PR 1726 and PR 1728 to v3.7.4 changelog

* fix(security): replace insecure Math.random with crypto.getRandomValues for fallback UUID generation

* fix(migrations): intercept 007 migration to use IF NOT EXISTS logic on fresh installs

Fixes cheaper-inference#1733

* test: fix typescript compilation errors in unit tests

* fix(db): reconcile legacy reasoning cache migration

* chore(release): bump to v3.7.4 — changelog, docs, version sync

* fix(cc-compatible): preserve Claude Code system skeleton (cheaper-inference#1740)

Integrated into release/v3.7.4

* docs(changelog): update for PR cheaper-inference#1740 merge

* docs(changelog): include workflow updates

* fix(db): reconcile legacy reasoning cache migration (cheaper-inference#1734)

Integrated into release/v3.7.4

* Add endpoint tunnel visibility settings (cheaper-inference#1743)

Integrated into release/v3.7.4

* Normalize max reasoning effort for Codex routing (cheaper-inference#1744)

Integrated into release/v3.7.4

* Fix Claude Code gateway config helper (cheaper-inference#1745)

Integrated into release/v3.7.4

* Refresh CLI fingerprint provider profiles (cheaper-inference#1746)

Integrated into release/v3.7.4

* Integrated into release/v3.7.4 (PR cheaper-inference#1742)

* docs(changelog): update for PRs 1742-1746

---------

Co-authored-by: diegosouzapw <diegosouzapw@users.noreply.github.com>
Co-authored-by: Yash Ghule <y.ghule77@gmail.com>
Co-authored-by: backryun <bakryun0718@proton.me>
Co-authored-by: dhaern <manker_lol@hotmail.com>
Co-authored-by: Randi <55005611+rdself@users.noreply.github.com>
Co-authored-by: Duncan L <leungd@gmail.com>
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